diff options
author | Robert Haas <rhaas@postgresql.org> | 2011-07-20 13:18:24 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2011-07-20 13:18:24 -0400 |
commit | 463f2625a5fb183b6a8925ccde98bb3889f921d9 (patch) | |
tree | f64c17891383a1867946c82215321b6aa42f1a42 /src/backend/commands/user.c | |
parent | cacd42d62cb2ddf32135b151f627780a5509780f (diff) | |
download | postgresql-463f2625a5fb183b6a8925ccde98bb3889f921d9.tar.gz postgresql-463f2625a5fb183b6a8925ccde98bb3889f921d9.zip |
Support SECURITY LABEL on databases, tablespaces, and roles.
This requires a new shared catalog, pg_shseclabel.
Along the way, fix the security_label regression tests so that they
don't monkey with the labels of any pre-existing objects. This is
unlikely to matter in practice, since only the label for the "dummy"
provider was being manipulated. But this way still seems cleaner.
KaiGai Kohei, with fairly extensive hacking by me.
Diffstat (limited to 'src/backend/commands/user.c')
-rw-r--r-- | src/backend/commands/user.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 871bda7cc59..0367b200fef 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -24,6 +24,7 @@ #include "catalog/pg_db_role_setting.h" #include "commands/comment.h" #include "commands/dbcommands.h" +#include "commands/seclabel.h" #include "commands/user.h" #include "libpq/md5.h" #include "miscadmin.h" @@ -1000,9 +1001,10 @@ DropRole(DropRoleStmt *stmt) systable_endscan(sscan); /* - * Remove any comments on this role. + * Remove any comments or security labels on this role. */ DeleteSharedComments(roleid, AuthIdRelationId); + DeleteSharedSecurityLabel(roleid, AuthIdRelationId); /* * Remove settings for this role. |