diff options
Diffstat (limited to 'lib/common/UnixUser.cpp')
-rw-r--r-- | lib/common/UnixUser.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/common/UnixUser.cpp b/lib/common/UnixUser.cpp index cea384fd..025f8db4 100644 --- a/lib/common/UnixUser.cpp +++ b/lib/common/UnixUser.cpp @@ -1,4 +1,4 @@ -// distribution boxbackup-0.10 (svn version: 494) +// distribution boxbackup-0.11rc1 (svn version: 2023_2024) // // Copyright (c) 2003 - 2006 // Ben Summers and contributors. All rights reserved. @@ -116,8 +116,7 @@ UnixUser::~UnixUser() if(mRevertOnDestruction) { // Revert to "real" user and group id of the process - if(::setegid(::getgid()) != 0 - || ::seteuid(::getuid()) != 0) + if(::setegid(::getgid()) != 0 || ::seteuid(::getuid()) != 0) { THROW_EXCEPTION(CommonException, CouldNotRestoreProcessUser) } @@ -139,8 +138,7 @@ void UnixUser::ChangeProcessUser(bool Temporary) if(Temporary) { // Change temporarily (change effective only) - if(::setegid(mGID) != 0 - || ::seteuid(mUID) != 0) + if(::setegid(mGID) != 0 || ::seteuid(mUID) != 0) { THROW_EXCEPTION(CommonException, CouldNotChangeProcessUser) } @@ -150,9 +148,8 @@ void UnixUser::ChangeProcessUser(bool Temporary) } else { - // Change perminantely (change all UIDs and GIDs) - if(::setgid(mGID) != 0 - || ::setuid(mUID) != 0) + // Change permanently (change all UIDs and GIDs) + if(::setgid(mGID) != 0 || ::setuid(mUID) != 0) { THROW_EXCEPTION(CommonException, CouldNotChangeProcessUser) } |