Mercurial > dovecot > core-2.2
changeset 20914:1d87b03c23d4
lib-program-client: Try drop setuid root by default
But not if root privileges are asked for.
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Wed, 19 Oct 2016 19:02:22 +0300 |
parents | c3ac9a0de205 |
children | 53daed51ffec |
files | src/lib-program-client/program-client-local.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-program-client/program-client-local.c Wed Oct 19 18:44:35 2016 +0300 +++ b/src/lib-program-client/program-client-local.c Wed Oct 19 19:02:22 2016 +0300 @@ -244,6 +244,11 @@ } } + /* if we want to allow root, then we will not drop + root privileges */ + pclient->set.restrict_set.drop_setuid_root = + !pclient->set.allow_root; + restrict_access(&pclient->set.restrict_set, pclient->set.home, !pclient->set.allow_root);