]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
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 1d915c7d64092acae612e274a26cffc918dba082..61e5f06b096878fd5d702e8a5e414de6a525e9c8 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;