From: Martti Rannanjärvi Date: Fri, 29 Sep 2017 10:47:22 +0000 (+0300) Subject: master: Flip disallow_root in drop_privileges() X-Git-Tag: 2.3.9~2322 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2047bbce87d1a1adc281a875814390bdc9532946;p=thirdparty%2Fdovecot%2Fcore.git master: Flip disallow_root in drop_privileges() --- diff --git a/src/master/service-process.c b/src/master/service-process.c index cdcc46520e..6de8cbb77b 100644 --- a/src/master/service-process.c +++ b/src/master/service-process.c @@ -170,7 +170,7 @@ static void drop_privileges(struct service *service) { struct restrict_access_settings rset; - bool disallow_root; + bool allow_root; size_t len; if (service->vsz_limit != 0) @@ -192,9 +192,9 @@ drop_privileges(struct service *service) restrict_access_set_env(&rset); if (service->set->drop_priv_before_exec) { - disallow_root = service->type == SERVICE_TYPE_LOGIN; + allow_root = service->type != SERVICE_TYPE_LOGIN; restrict_access(&rset, - disallow_root ? 0 : RESTRICT_ACCESS_FLAG_ALLOW_ROOT, + allow_root ? RESTRICT_ACCESS_FLAG_ALLOW_ROOT : 0, NULL); } }