[Box Backup-dev] COMMIT r892 - box/chris/merge/lib/common

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Thu Aug 31 23:35:51 BST 2006


Author: chris
Date: 2006-08-31 23:35:51 +0100 (Thu, 31 Aug 2006)
New Revision: 892

Modified:
   box/chris/merge/lib/common/UnixUser.cpp
Log:
Disable all calls to set*id() on Win32 (doesn't work) (refs #3)


Modified: box/chris/merge/lib/common/UnixUser.cpp
===================================================================
--- box/chris/merge/lib/common/UnixUser.cpp	2006-08-31 22:33:05 UTC (rev 891)
+++ box/chris/merge/lib/common/UnixUser.cpp	2006-08-31 22:35:51 UTC (rev 892)
@@ -78,8 +78,12 @@
 	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
 		{
 			THROW_EXCEPTION(CommonException, CouldNotRestoreProcessUser)
 		}
@@ -101,8 +105,12 @@
 	if(Temporary)
 	{
 		// Change temporarily (change effective only)
+		#ifdef WIN32
+		if(0)
+		#else
 		if(::setegid(mGID) != 0
 			|| ::seteuid(mUID) != 0)
+		#endif
 		{
 			THROW_EXCEPTION(CommonException, CouldNotChangeProcessUser)
 		}
@@ -112,9 +120,13 @@
 	}
 	else
 	{
-		// Change perminantely (change all UIDs and GIDs)
+		// Change permanently (change all UIDs and GIDs)
+		#ifdef WIN32
+		if(0)
+		#else
 		if(::setgid(mGID) != 0
 			|| ::setuid(mUID) != 0)
+		#endif
 		{
 			THROW_EXCEPTION(CommonException, CouldNotChangeProcessUser)
 		}




More information about the Boxbackup-dev mailing list