diff options
author | Reinhard Tartler <siretart@tauware.de> | 2008-01-19 15:08:54 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2008-01-19 15:08:54 +0100 |
commit | 2733267954e91e394fbb512ea3abb4c497c0752f (patch) | |
tree | d6cdebd8776bceba06a2fb5e4ed06a4744bc1b57 /lib/common/UnixUser.cpp | |
parent | 1d56581c644c53f1b9a182c6574bc2fc5243d4d1 (diff) |
import version 0.11rc1
This commit has been made by 'bzr import'. I used the upstream tarball
of Version 0.11rc1 for creating it. It has the md5sum:
75608d8bb72dff9a556850ccd0ae8cb9
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) } |