summaryrefslogtreecommitdiff
path: root/contrib/sepgsql/proc.c
diff options
context:
space:
mode:
authorRobert Haas2013-03-28 19:38:35 +0000
committerRobert Haas2013-03-28 19:41:38 +0000
commit0f05840bf4c256b838eca8f1be9d7b5be82ccd0e (patch)
tree33f506bd41aad831419e63885a63a2200706344a /contrib/sepgsql/proc.c
parentae7f1c3ef2eef9584e3c9a42c395eb0c0e59a5ed (diff)
Allow sepgsql labels to depend on object name.
The main change here is to call security_compute_create_name_raw() rather than security_compute_create_raw(). This ups the minimum requirement for libselinux from 2.0.99 to 2.1.10, but it looks like most distributions will have picked that up before 9.3 is out. KaiGai Kohei
Diffstat (limited to 'contrib/sepgsql/proc.c')
-rw-r--r--contrib/sepgsql/proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/sepgsql/proc.c b/contrib/sepgsql/proc.c
index 53b941d855..afc37553f2 100644
--- a/contrib/sepgsql/proc.c
+++ b/contrib/sepgsql/proc.c
@@ -95,7 +95,8 @@ sepgsql_proc_post_create(Oid functionId)
tcontext = sepgsql_get_label(NamespaceRelationId,
proForm->pronamespace, 0);
ncontext = sepgsql_compute_create(scontext, tcontext,
- SEPG_CLASS_DB_PROCEDURE);
+ SEPG_CLASS_DB_PROCEDURE,
+ NameStr(proForm->proname));
/*
* check db_procedure:{create (install)} permission