Added two defines: MY_UID() and MY_GID().
authorWayne Davison <wayned@samba.org>
Wed, 4 Feb 2004 17:04:58 +0000 (17:04 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 4 Feb 2004 17:04:58 +0000 (17:04 +0000)
rsync.h

diff --git a/rsync.h b/rsync.h
index 1d915c7..61e5f06 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -712,6 +712,17 @@ size_t strlcat(char *d, const char *s, size_t bufsize);
 
 #define exit_cleanup(code) _exit_cleanup(code, __FILE__, __LINE__)
 
+#ifdef HAVE_GETEUID
+#define MY_UID() geteuid()
+#else
+#define MY_UID() getuid()
+#endif
+
+#ifdef HAVE_GETEGID
+#define MY_GID() getegid()
+#else
+#define MY_GID() getgid()
+#endif
 
 extern int verbose;