summaryrefslogtreecommitdiff
path: root/lib/uid_wrapper
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-10-08 10:08:37 +0200
committerAndreas Schneider <asn@samba.org>2011-10-27 13:32:01 +0200
commit0c4089bd1aa231b3b29521f6f932a81b5ea8ccc4 (patch)
tree5a3070a8ad3da918d79ef229c893c9e8ed8350f0 /lib/uid_wrapper
parente925ea8d0c490de87b6c987ae03862eeaba65541 (diff)
downloadsamba-0c4089bd1aa231b3b29521f6f932a81b5ea8ccc4.tar.gz
samba-0c4089bd1aa231b3b29521f6f932a81b5ea8ccc4.tar.bz2
samba-0c4089bd1aa231b3b29521f6f932a81b5ea8ccc4.zip
uid_wrapper: Fix build on UNIX platforms.
Diffstat (limited to 'lib/uid_wrapper')
-rw-r--r--lib/uid_wrapper/uid_wrapper.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/uid_wrapper/uid_wrapper.c b/lib/uid_wrapper/uid_wrapper.c
index 6c7fc6effa..442e349318 100644
--- a/lib/uid_wrapper/uid_wrapper.c
+++ b/lib/uid_wrapper/uid_wrapper.c
@@ -66,6 +66,7 @@ _PUBLIC_ int uwrap_enabled(void)
return uwrap.enabled?1:0;
}
+#ifdef HAVE_SETEUID
_PUBLIC_ int uwrap_seteuid(uid_t euid)
{
uwrap_init();
@@ -80,7 +81,9 @@ _PUBLIC_ int uwrap_seteuid(uid_t euid)
}
return 0;
}
+#endif
+#ifdef HAVE_SETREUID
_PUBLIC_ int uwrap_setreuid(uid_t ruid, uid_t euid)
{
uwrap_init();
@@ -95,7 +98,9 @@ _PUBLIC_ int uwrap_setreuid(uid_t ruid, uid_t euid)
}
return 0;
}
+#endif
+#ifdef HAVE_SETRESUID
_PUBLIC_ int uwrap_setresuid(uid_t ruid, uid_t euid, uid_t suid)
{
uwrap_init();
@@ -110,6 +115,7 @@ _PUBLIC_ int uwrap_setresuid(uid_t ruid, uid_t euid, uid_t suid)
}
return 0;
}
+#endif
_PUBLIC_ uid_t uwrap_geteuid(void)
{
@@ -120,6 +126,7 @@ _PUBLIC_ uid_t uwrap_geteuid(void)
return uwrap.euid;
}
+#ifdef HAVE_SETEGID
_PUBLIC_ int uwrap_setegid(gid_t egid)
{
uwrap_init();
@@ -134,7 +141,9 @@ _PUBLIC_ int uwrap_setegid(gid_t egid)
}
return 0;
}
+#endif
+#ifdef HAVE_SETREGID
_PUBLIC_ int uwrap_setregid(gid_t rgid, gid_t egid)
{
uwrap_init();
@@ -149,6 +158,7 @@ _PUBLIC_ int uwrap_setregid(gid_t rgid, gid_t egid)
}
return 0;
}
+#endif
_PUBLIC_ uid_t uwrap_getegid(void)
{