From: Aki Tuomi Date: Wed, 19 Oct 2016 16:02:22 +0000 (+0300) Subject: lib-program-client: Try drop setuid root by default X-Git-Tag: 2.2.26~87 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d457281aa12f4b23d009740e0d417b69bc7ce4d;p=thirdparty%2Fdovecot%2Fcore.git lib-program-client: Try drop setuid root by default But not if root privileges are asked for. --- diff --git a/src/lib-program-client/program-client-local.c b/src/lib-program-client/program-client-local.c index c5037139d9..bfb7433714 100644 --- a/src/lib-program-client/program-client-local.c +++ b/src/lib-program-client/program-client-local.c @@ -244,6 +244,11 @@ int program_client_local_connect(struct program_client *pclient) } } + /* 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);