diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2016-09-03 15:54:15 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2016-09-03 15:54:15 +0000 |
commit | 4d105d2a64758d01d646f182cd1bfc5e65e35142 (patch) | |
tree | 7276375b13684f5c772faa30891ffa106f0abe1c /usr.sbin/smtpd/lka.c | |
parent | 17c83ba4d5b4b274af76d413318833c28ed6d845 (diff) |
in lka specifically, use initgroups() so that users may share files between
smtpd and another daemon by adding supplementary groups
ok eric@
Diffstat (limited to 'usr.sbin/smtpd/lka.c')
-rw-r--r-- | usr.sbin/smtpd/lka.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c index 703a97a8795..7ca46e90184 100644 --- a/usr.sbin/smtpd/lka.c +++ b/usr.sbin/smtpd/lka.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka.c,v 1.194 2016/09/01 10:54:25 eric Exp $ */ +/* $OpenBSD: lka.c,v 1.195 2016/09/03 15:54:14 gilles Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -419,7 +419,7 @@ lka(void) config_process(PROC_LKA); - if (setgroups(1, &pw->pw_gid) || + if (initgroups(pw->pw_name, pw->pw_gid) || setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) || setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) fatal("lka: cannot drop privileges"); |