summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Grubb <sgrubb@redhat.com>2011-08-01 14:28:27 -0400
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-08-11 10:54:45 +0100
commit70fb675a108dbf660d384150429c9af085b0c48e (patch)
treed656fcd5cc76d6c20629b8d1fadfe85b160f90ec
parent93731e6c9cda388e3b29e910081295be649a8c8d (diff)
capng: Drop supplemental groups when switching to daemon user
This patch ensures the daemon process doesn't inherit any supplemental groups for the root user from an administrator login via an init script. This is only an issue for pre-systemd systems. https://bugzilla.redhat.com/show_bug.cgi?id=726953
-rw-r--r--bus/selinux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bus/selinux.c b/bus/selinux.c
index e94d8a8e..36287e9f 100644
--- a/bus/selinux.c
+++ b/bus/selinux.c
@@ -1055,7 +1055,7 @@ _dbus_change_to_daemon_user (const char *user,
capng_clear (CAPNG_SELECT_BOTH);
capng_update (CAPNG_ADD, CAPNG_EFFECTIVE | CAPNG_PERMITTED,
CAP_AUDIT_WRITE);
- rc = capng_change_id (uid, gid, 0);
+ rc = capng_change_id (uid, gid, CAPNG_DROP_SUPP_GRP);
if (rc)
{
switch (rc) {