From 952e54f00bec461e5ad8f5bce507ac96dd0ab75c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 10 Jul 2012 21:13:03 -0700 Subject: [PATCH] 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. --- source3/lib/util_sec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c index d7984ac..b90a6f9 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 -- 1.7.9.5