[Box Backup-commit] COMMIT r1419 - box/chris/merge/lib/common
boxbackup-dev at fluffy.co.uk
boxbackup-dev at fluffy.co.uk
Sat Mar 10 19:26:02 GMT 2007
Author: chris
Date: 2007-03-10 19:26:02 +0000 (Sat, 10 Mar 2007)
New Revision: 1419
Modified:
box/chris/merge/lib/common/UnixUser.cpp
Log:
Remove #ifdefs, no longer required (refs #3, merges [1418])
Modified: box/chris/merge/lib/common/UnixUser.cpp
===================================================================
--- box/chris/merge/lib/common/UnixUser.cpp 2007-03-10 19:25:03 UTC (rev 1418)
+++ box/chris/merge/lib/common/UnixUser.cpp 2007-03-10 19:26:02 UTC (rev 1419)
@@ -78,12 +78,7 @@
if(mRevertOnDestruction)
{
// Revert to "real" user and group id of the process
- #ifdef WIN32
- if(0)
- #else
- if(::setegid(::getgid()) != 0
- || ::seteuid(::getuid()) != 0)
- #endif
+ if(::setegid(::getgid()) != 0 || ::seteuid(::getuid()) != 0)
{
THROW_EXCEPTION(CommonException, CouldNotRestoreProcessUser)
}
@@ -105,12 +100,7 @@
if(Temporary)
{
// Change temporarily (change effective only)
- #ifdef WIN32
- if(0)
- #else
- if(::setegid(mGID) != 0
- || ::seteuid(mUID) != 0)
- #endif
+ if(::setegid(mGID) != 0 || ::seteuid(mUID) != 0)
{
THROW_EXCEPTION(CommonException, CouldNotChangeProcessUser)
}
@@ -121,12 +111,7 @@
else
{
// Change permanently (change all UIDs and GIDs)
- #ifdef WIN32
- if(0)
- #else
- if(::setgid(mGID) != 0
- || ::setuid(mUID) != 0)
- #endif
+ if(::setgid(mGID) != 0 || ::setuid(mUID) != 0)
{
THROW_EXCEPTION(CommonException, CouldNotChangeProcessUser)
}
More information about the Boxbackup-commit
mailing list