summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/win32/emu.h15
1 files 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