[Box Backup-commit] COMMIT r1415 - box/chris/general/lib/win32

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat Mar 10 19:13:36 GMT 2007


Author: chris
Date: 2007-03-10 19:13:36 +0000 (Sat, 10 Mar 2007)
New Revision: 1415

Modified:
   box/chris/general/lib/win32/emu.h
Log:
Revert part of [634] with better comments why this code should stay.


Modified: box/chris/general/lib/win32/emu.h
===================================================================
--- box/chris/general/lib/win32/emu.h	2007-03-10 19:12:57 UTC (rev 1414)
+++ box/chris/general/lib/win32/emu.h	2007-03-10 19:13:36 UTC (rev 1415)
@@ -141,6 +141,38 @@
 	return 0;
 }
 
+// Windows and Unix owners and groups are pretty fundamentally different.
+// Ben prefers that we kludge here rather than litter the code with #ifdefs.
+// Pretend to be root, and pretend that set...() operations succeed.
+inline int setegid(int)
+{
+	return true;
+}
+inline int seteuid(int)
+{
+	return true;
+}
+inline int setgid(int)
+{
+	return true;
+}
+inline int setuid(int)
+{
+	return true;
+}
+inline int getgid(void)
+{
+	return 0;
+}
+inline int getuid(void)
+{
+	return 0;
+}
+inline int geteuid(void)
+{
+	return 0;
+}
+
 #ifndef PATH_MAX
 #define PATH_MAX MAX_PATH
 #endif




More information about the Boxbackup-commit mailing list