Browse Source

use geteuid syscall as well

pull/30/head 1.2.1
Antonio SJ Musumeci 11 years ago
parent
commit
3b6c74878c
  1. 8
      src/ugid_linux.hpp

8
src/ugid_linux.hpp

@ -36,10 +36,10 @@ namespace mergerfs
SetResetGuard(const uid_t _newuid,
const gid_t _newgid)
{
olduid = ::geteuid();
oldgid = ::getegid();
newuid = _newuid;
newgid = _newgid;
olduid = ::syscall(SYS_geteuid);
oldgid = ::syscall(SYS_getegid);
newuid = _newuid;
newgid = _newgid;
if(newgid != oldgid)
::syscall(SYS_setregid,-1,newgid);

Loading…
Cancel
Save