aboutsummaryrefslogtreecommitdiff
path: root/contrib/sepgsql/hooks.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2011-01-23 22:47:16 -0500
committerRobert Haas <rhaas@postgresql.org>2011-01-23 22:48:22 -0500
commit194c8f713aa62a528afa4ce4274b80aaff9eb264 (patch)
treef00353f6087df8306040da3ba3c692c77eaa76f0 /contrib/sepgsql/hooks.c
parent968bc6fac91d6aaca594488ab85c179b686cbbdd (diff)
downloadpostgresql-194c8f713aa62a528afa4ce4274b80aaff9eb264.tar.gz
postgresql-194c8f713aa62a528afa4ce4274b80aaff9eb264.zip
First round of cleanup of sepgsql code and documentation.
Robert Haas, with a few suggestions from Thom Brown
Diffstat (limited to 'contrib/sepgsql/hooks.c')
-rw-r--r--contrib/sepgsql/hooks.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/sepgsql/hooks.c b/contrib/sepgsql/hooks.c
index 6b55e484cfd..bc7ce51cf15 100644
--- a/contrib/sepgsql/hooks.c
+++ b/contrib/sepgsql/hooks.c
@@ -91,7 +91,7 @@ sepgsql_client_auth(Port *port, int status)
if (getpeercon_raw(port->sock, &context) < 0)
ereport(FATAL,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("selinux: failed to get the peer label")));
+ errmsg("SELinux: unable to get peer label")));
sepgsql_set_client_label(context);
@@ -318,7 +318,7 @@ sepgsql_utility_command(Node *parsetree,
{
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("SELinux: LOAD is not allowed anyway.")));
+ errmsg("SELinux: LOAD is not permitted")));
}
break;
default:
@@ -352,8 +352,8 @@ _PG_init(void)
*/
if (IsUnderPostmaster)
ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("Not allowed to load SE-PostgreSQL now")));
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("sepgsql must be loaded via shared_preload_libraries")));
/*
* Check availability of SELinux on the platform.
@@ -414,7 +414,7 @@ _PG_init(void)
if (getcon_raw(&context) < 0)
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("selinux: unable to get security label of server")));
+ errmsg("SELinux: failed to get server security label")));
sepgsql_set_client_label(context);
/* Security label provider hook */