summaryrefslogtreecommitdiff
path: root/lib/win32
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-03-10 19:12:57 +0000
committerChris Wilson <chris+github@qwirx.com>2007-03-10 19:12:57 +0000
commit50f4c4a76a07ce1d34c4e50094d570a5087084cb (patch)
tree39546f4e9c4cb80bd67818476def2a99bca022d6 /lib/win32
parent0beaa1cd614b55d27a409cd7727a793b0757cfdf (diff)
Group remaining set*id() and get*id() functions. Improve comments about
why they are being retained. (refs #3, related to [634])
Diffstat (limited to 'lib/win32')
-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