diff options
author | Jeremy Allison <jra@samba.org> | 2012-07-10 16:50:51 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-07-10 16:50:51 -0700 |
commit | b25619175f9ed3a62210b5b9f9cda7c4cde4f0db (patch) | |
tree | 9adbc5a64da2d5c047ef8f38cb7002a0ae836d32 | |
parent | 6d903bf1899987adaeaaf6608ac318aca4588590 (diff) | |
download | samba-b25619175f9ed3a62210b5b9f9cda7c4cde4f0db.tar.gz samba-b25619175f9ed3a62210b5b9f9cda7c4cde4f0db.tar.bz2 samba-b25619175f9ed3a62210b5b9f9cda7c4cde4f0db.zip |
Fix typo we've had for a long time in set_re_uid() in the USE_SETRESUID case.
We 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. Bug to follow to get this
fixed in 3.6.next and 3.5.next.
-rw-r--r-- | source3/lib/util_sec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c index 7c05f17de5..36d2a2b253 100644 --- a/source3/lib/util_sec.c +++ b/source3/lib/util_sec.c @@ -337,7 +337,7 @@ int set_re_uid(void) uid_t uid = geteuid(); #if defined(USE_SETRESUID) || defined(USE_LINUX_THREAD_CREDENTIALS) - samba_setresuid(geteuid(), -1, -1); + samba_setresuid(uid, uid, -1); #endif #if USE_SETREUID |