From: Jeremy Allison Date: Wed, 11 Jul 2012 04:13:03 +0000 (-0700) Subject: Fix bug #9034 - Typo in set_re_uid() call when USE_SETRESUID selected in configure. X-Git-Tag: samba-3.5.17~2 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=20c85976db84a49ab13e057f51b10597c133a649 Fix bug #9034 - Typo in set_re_uid() call when USE_SETRESUID selected in configure. Previous code only set the real euid, not the effective one. This is not a security issue as this is *only* used in the quota code, and only between code that brackets it with save_re_uid()/restore_re_uid(), Also this is not used on most platforms (we use USE_SETREUID by preference) but it's better to have this right. (cherry picked from commit ceed322622b46be3745b32a5f6a02e634bfe1789) (cherry picked from commit a224e4cc1dbb2578813ccffb80e88d9ec92516ce) --- diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c index d7984ac9996..b90a6f972e2 100644 --- a/source3/lib/util_sec.c +++ b/source3/lib/util_sec.c @@ -334,7 +334,7 @@ int set_re_uid(void) uid_t uid = geteuid(); #if USE_SETRESUID - setresuid(geteuid(), -1, -1); + setresuid(uid, uid, -1); #endif #if USE_SETREUID