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.
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