From 50f4c4a76a07ce1d34c4e50094d570a5087084cb Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 10 Mar 2007 19:12:57 +0000 Subject: Group remaining set*id() and get*id() functions. Improve comments about why they are being retained. (refs #3, related to [634]) --- lib/win32/emu.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/win32/emu.h b/lib/win32/emu.h index fc88737d..a4af6e64 100644 --- a/lib/win32/emu.h +++ b/lib/win32/emu.h @@ -83,12 +83,6 @@ int setitimer(int type, struct itimerval *timeout, void *arg); void InitTimer(void); void FiniTimer(void); -inline int geteuid(void) -{ - //lets pretend to be root! - return 0; -} - struct passwd { char *pw_name; char *pw_passwd; @@ -147,8 +141,9 @@ inline int chown(const char * Filename, u_int32_t uid, u_int32_t gid) return 0; } -//I do not perceive a need to change the user or group on a backup client -//at any rate the owner of a service can be set in the service settings +// 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; @@ -173,6 +168,10 @@ inline int getuid(void) { return 0; } +inline int geteuid(void) +{ + return 0; +} #ifndef PATH_MAX #define PATH_MAX MAX_PATH -- cgit v1.2.3