Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9049:6dec24ec8218 HEAD
expire-tool: Fix to previous change to actually use the mail_gid.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 17 May 2009 20:05:36 -0400 |
parents | cc484a16bbe4 |
children | c09602d2820c |
files | src/plugins/expire/auth-client.c |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/expire/auth-client.c Sun May 17 20:02:37 2009 -0400 +++ b/src/plugins/expire/auth-client.c Sun May 17 20:05:36 2009 -0400 @@ -17,10 +17,6 @@ const char *const *fields, *key, *value; unsigned int i, count; - if (reply->gid != (gid_t)-1 && getegid() != reply->gid) { - env_put(t_strconcat("RESTRICT_SETGID=", - dec2str(reply->gid), NULL)); - } if (reply->chroot != NULL) env_put(t_strconcat("RESTRICT_CHROOT=", reply->chroot, NULL)); @@ -44,6 +40,11 @@ return; } + if (reply->gid != (gid_t)-1 && getegid() != reply->gid) { + env_put(t_strconcat("RESTRICT_SETGID=", + dec2str(reply->gid), NULL)); + } + if (reply->uid != current_uid && current_uid != 0) { /* we're changing the UID, switch back to root */ if (seteuid(0) != 0)