aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/acl.c
Commit message (Collapse)AuthorAge
...
* Add new palloc0 call as merge of palloc and MemSet(0).Bruce Momjian2002-11-13
|
* Back out use of palloc0 in place if palloc/MemSet. Seems constant lenBruce Momjian2002-11-11
| | | | to MemSet is a performance boost.
* Merge palloc()/MemSet(0) calls into a single palloc0() call.Bruce Momjian2002-11-10
|
* Change default privileges for languages and functions to be PUBLIC USAGETom Lane2002-09-24
| | | | | and PUBLIC EXECUTE, respectively. Per discussion about easing updates from prior versions.
* pgindent run.Bruce Momjian2002-09-04
|
* Arrange for the default permissions on a database to allow temp tableTom Lane2002-09-03
| | | | | | | creation to world, but disallow temp table creation in template1. Per latest round of pghackers discussion. I did not force initdb, but the permissions lockdown on template1 will not take effect unless you do one (or manually REVOKE TEMP ON DATABASE template1 FROM public).
* This patches replaces a few more usages of strcpy() and sprintf() whenBruce Momjian2002-08-27
| | | | | | | | copying into a fixed-size buffer (in this case, a buffer of NAMEDATALEN bytes). AFAICT nothing to worry about here, but worth fixing anyway... Neil Conway
* Modify array operations to include array's element type OID in theTom Lane2002-08-26
| | | | | | | | | | array header, and to compute sizing and alignment of array elements the same way normal tuple access operations do --- viz, using the tupmacs.h macros att_addlength and att_align. This makes the world safe for arrays of cstrings or intervals, and should make it much easier to write array-type-polymorphic functions; as examples see the cleanups of array_out and contrib/array_iterator. By Joe Conway and Tom Lane.
* has_table_privilege spawns scions has_database_privilege, ↵Tom Lane2002-08-09
| | | | | | | | | | | has_function_privilege, has_language_privilege, has_schema_privilege to let SQL queries test all the new privilege types in 7.3. Also, add functions pg_table_is_visible, pg_type_is_visible, pg_function_is_visible, pg_operator_is_visible, pg_opclass_is_visible to test whether objects contained in schemas are visible in the current search path. Do some minor cleanup to centralize accesses to pg_database, as well.
* Update copyright to 2002.Bruce Momjian2002-06-20
|
* Restructure aclcheck error reporting to make permission-failureTom Lane2002-04-27
| | | | | | | messages more uniform and internationalizable: the global array aclcheck_error_strings[] is gone in favor of a subroutine aclcheck_error(). Partial implementation of namespace-related permission checks --- not all done yet.
* Add current_schema() and current_schemas() inquiry functions.Tom Lane2002-04-26
| | | | | Update has_table_privilege functions to cope with schema-qualified names in the same way as nextval() and others.
* Restructure AclItem representation so that we can have more than eightTom Lane2002-04-21
| | | | | | | | | different privilege bits (might as well make use of the space we were wasting on padding). EXECUTE and USAGE bits for procedures, languages now are separate privileges instead of being overlaid on SELECT. Add privileges for namespaces and databases. The GRANT and REVOKE commands work for these object types, but we don't actually enforce the privileges yet...
* pg_class has a relnamespace column. You can create and access tablesTom Lane2002-03-26
| | | | | | in schemas other than the system namespace; however, there's no search path yet, and not all operations work yet on tables outside the system namespace.
* Change the aclchk.c routines to uniformly use OIDs to identify theTom Lane2002-03-21
| | | | | | objects to be privilege-checked. Some change in their APIs would be necessary no matter what in the schema environment, and simply getting rid of the name-based interface entirely seems like the best way.
* Commit to match discussed elog() changes. Only update is that LOG isBruce Momjian2002-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | now just below FATAL in server_min_messages. Added more text to highlight ordering difference between it and client_min_messages. --------------------------------------------------------------------------- REALLYFATAL => PANIC STOP => PANIC New INFO level the prints to client by default New LOG level the prints to server log by default Cause VACUUM information to print only to the client NOTICE => INFO where purely information messages are sent DEBUG => LOG for purely server status messages DEBUG removed, kept as backward compatible DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added DebugLvl removed in favor of new DEBUG[1-5] symbols New server_min_messages GUC parameter with values: DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC New client_min_messages GUC parameter with values: DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC Server startup now logged with LOG instead of DEBUG Remove debug_level GUC parameter elog() numbers now start at 10 Add test to print error message if older elog() values are passed to elog() Bootstrap mode now has a -d that requires an argument, like postmaster
* Privileges on functions and procedural languagesPeter Eisentraut2002-02-18
|
* IsSystemRelationName() treats TOAST relations as system relations.Tom Lane2001-11-16
| | | | | | | | This seems the right thing for most usages, but I notice two places where it is the wrong thing. One is that the default permissions on TOAST rels should be no-access, not world-readable; the other is that PrepareForTupleInvalidation doesn't really need to spend time looking at tuples of TOAST relations.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* has_table_privilege functions from Joe Conway (with some kibitzing fromTom Lane2001-06-14
| | | | | | Tom Lane). For the moment, only the OID/name variants are provided. I didn't force initdb, but the additions to the 'privileges' regress test won't pass until you do one.
* Back out has_table_privilege patch.Bruce Momjian2001-06-12
|
* OK -- here's take #5.Bruce Momjian2001-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | It "make"s and "make check"s clean against current cvs tip. There are now both Text and Name variants, and the regression test support is rolled into the patch. Note that to be complete wrt Name based variants, there are now 12 user visible versions of has_table_privilege: has_table_privilege(Text usename, Text relname, Text priv_type) has_table_privilege(Text usename, Name relname, Text priv_type) has_table_privilege(Name usename, Text relname, Text priv_type) has_table_privilege(Name usename, Name relname, Text priv_type) has_table_privilege(Text relname, Text priv_type) /* assumes current_user */ has_table_privilege(Name relname, Text priv_type) /* assumes current_user */ has_table_privilege(Text usename, Oid reloid, Text priv_type) has_table_privilege(Name usename, Oid reloid, Text priv_type) has_table_privilege(Oid reloid, Text priv_type) /* assumes current_user */ has_table_privilege(Oid usesysid, Text relname, Text priv_type) has_table_privilege(Oid usesysid, Name relname, Text priv_type) has_table_privilege(Oid usesysid, Oid reloid, Text priv_type) For the Text based inputs, a new internal function, get_Name is used (shamelessly copied from get_seq_name in sequence.c) to downcase if not quoted, or remove quotes if quoted, and truncate. I also added a few test cases for the downcasing, quote removal, and Name based variants to the regression test. Joe Conway
* Allow GRANT/REVOKE to/from more than one user per invocation. Command tagPeter Eisentraut2001-06-09
| | | | | | | | for GRANT/REVOKE is now just that, not "CHANGE". On the way, migrate some of the aclitem internal representation away from the parser and build a real parse tree instead. Also add some 'const' qualifiers.
* Correct permissions-checking bugs associated with ancient decision toTom Lane2001-06-05
| | | | | | copy PUBLIC access rights into each newly created ACL entry. Instead treat each ACL entry as independent flags. Also clean up some ugliness in acl.h API.
* Make UPDATE and DELETE privileges distinct. Add REFERENCES and TRIGGERPeter Eisentraut2001-05-27
| | | | | privileges. INSERT and COPY FROM now require INSERT (only). Add privileges regression test.
* pgindent run. Make it all clean.Bruce Momjian2001-03-22
|
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-24
|
* Make aclcontains() do something that's at least vaguely reasonable:Tom Lane2001-01-14
| | | | | it now returns true if the aclitem argument exactly matches any one of the elements of the aclitem[] argument. Per complaint from Wolff 1/10/01.
* Ensure that all uses of <ctype.h> functions are applied to unsigned-charTom Lane2000-12-03
| | | | | values, whether the local char type is signed or not. This is necessary for portability. Per discussion on pghackers around 9/16/00.
* aclitemout() shouldn't coredump when it finds an ACL itemTom Lane2000-11-28
| | | | | for a now-vanished group. Instead, display the numeric group ID, same as it does for vanished users.
* Change SearchSysCache coding conventions so that a reference count isTom Lane2000-11-16
| | | | | | | maintained for each cache entry. A cache entry will not be freed until the matching ReleaseSysCache call has been executed. This eliminates worries about cache entries getting dropped while still in use. See my posting to pg-hackers of even date for more info.
* Fix bug reported by bobson: aclinsert3 would delete the 'world' entryTom Lane2000-11-03
| | | | | from an ACL list if it had no permissions remaining, which confused aclcheck terribly. Also clean up code a little.
* Remove NO_SECURITY define.Bruce Momjian2000-10-16
|
* Arrange that no database accesses are attempted during parser() --- thisTom Lane2000-10-07
| | | | | | | | | | | | | | | took some rejiggering of typename and ACL parsing, as well as moving parse_analyze call out of parser(). Restructure postgres.c processing so that parse analysis and rewrite are skipped when in abort-transaction state. Only COMMIT and ABORT statements will be processed beyond the raw parser() phase. This addresses problem of parser failing with database access errors while in aborted state (see pghackers discussions around 7/28/00). Also fix some bugs with COMMIT/ABORT statements appearing in the middle of a single query input string. Function, operator, and aggregate arguments/results can now use full TypeName production, in particular foo[] for array types. DROP OPERATOR and COMMENT ON OPERATOR were broken for unary operators. Allow CREATE AGGREGATE to accept unquoted numeric constants for initcond.
* Make default ACL be consistent --- ie, starting point for ChangeAclTom Lane2000-10-02
| | | | | is the same as the access permissions granted when a relation's relacl field is NULL, ie, owner=all rights, world=no rights.
* Make acl-related functions safe for TOAST. Mark pg_class.relacl asTom Lane2000-07-31
| | | | | compressible but not externally storable (since we're not sure about whether creating a toast relation for pg_class would work).
* Big warnings cleanup for Solaris/GCC. Down to about 40 now, butPeter Eisentraut2000-06-14
| | | | | | | | | | | we'll get there one day. Use `cat' to create aclocal.m4, not `aclocal'. Some people don't have automake installed. Only run the autoconf rule in the top-level GNUmakefile if the invoker specified `make configure', don't run it automatically because of CVS timestamp skew.
* Latest round of fmgr updates. All functions with bool,char, or int2Tom Lane2000-06-05
| | | | | | | inputs have been converted to newstyle. This should go a long way towards fixing our portability problems with platforms where char and short parameters are passed differently from int-width parameters. Still more to do for the Alpha port however.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Add:Bruce Momjian2000-01-26
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Add pg_statistic index, add missing Hiroshi file.Bruce Momjian1999-11-24
|
* Add system indexes to match all caches.Bruce Momjian1999-11-22
| | | | | | | Make all system indexes unique. Make all cache loads use system indexes. Rename *rel to *relid in inheritance tables. Rename cache names to be clearer.
* Drive a stake through the heart of the last use of MAX_PARSE_BUFFERTom Lane1999-10-18
| | | | | in the backend. Still a few stragglers, but we're getting closer to being rid of query length limits...
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Final cleanup.Bruce Momjian1999-07-16
|
* Change #include's to use <> and "" as appropriate.Bruce Momjian1999-07-15
|
* Fix for ACL length problem on different platforms.Bruce Momjian1999-07-09
|
* pgindent run over code.Bruce Momjian1999-05-25
|
* I am sorry, I misinterpreted the still failing trigger regression test.Bruce Momjian1999-05-12
| | | | | | | | | | | | | | | | | The offending code has been removed, the action is now always dependent :-) I suggest the following patch, to finally make trigger regression happy again: <<refint1.patch>> After that you can remove the following from TODO: Remove ERROR: check_primary_key: even number of arguments should be specified Trigger regression test fails Andreas
* This patch fixes the bug that made it impossible to grant permissions toBruce Momjian1999-03-21
| | | | | | a user such as "www-data". Oliver