Mercurial > dovecot > core-2.2
changeset 20722:bf8fbf7fcc6a
lib-storage: Fixed accessing user as root when user has no uid.
This shouldn't normally be done, but might as well fix it. Fixes:
Fatal: mail-storage-service: seteuid(4294967295) failed: Invalid argument
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Fri, 09 Sep 2016 14:07:11 +0300 |
parents | 6e339cbdeaf5 |
children | 2b03d8ab6ae1 |
files | src/lib-storage/mail-storage-service.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mail-storage-service.c Fri Sep 09 00:59:53 2016 +0300 +++ b/src/lib-storage/mail-storage-service.c Fri Sep 09 14:07:11 2016 +0300 @@ -610,7 +610,7 @@ } if (keep_setuid_root) { - if (current_euid != rset.uid) { + if (current_euid != rset.uid && rset.uid != (uid_t)-1) { if (current_euid != 0) { /* we're changing the UID, switch back to root first */