summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rpcbind.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rpcbind.c b/src/rpcbind.c
index 24e069b..9a0504d 100644
--- a/src/rpcbind.c
+++ b/src/rpcbind.c
@@ -236,6 +236,10 @@ main(int argc, char *argv[])
syslog(LOG_ERR, "setgid to '%s' (%d) failed: %m", id, p->pw_gid);
exit(1);
}
+ if (setgroups(0, NULL) == -1) {
+ syslog(LOG_ERR, "dropping supplemental groups failed: %m");
+ exit(1);
+ }
if (setuid(p->pw_uid) == -1) {
syslog(LOG_ERR, "setuid to '%s' (%d) failed: %m", id, p->pw_uid);
exit(1);