summaryrefslogtreecommitdiffstats
path: root/polyp/caps.c
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-01-05 22:12:25 +0000
committerPierre Ossman <ossman@cendio.se>2006-01-05 22:12:25 +0000
commit010476f226124292e05d26ddbb931827beccd39e (patch)
treeec0724aff657569ac004f95be5d030a2277ebd7f /polyp/caps.c
parent5ac2cb90f73116f7c3ccadd4d89c26c01e3c6c0e (diff)
Protect getuid() with an ifdef.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@411 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/caps.c')
-rw-r--r--polyp/caps.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/polyp/caps.c b/polyp/caps.c
index 739e7071..4ecb5848 100644
--- a/polyp/caps.c
+++ b/polyp/caps.c
@@ -35,6 +35,8 @@
#include "log.h"
#include "caps.h"
+#ifdef HAVE_GETUID
+
/* Drop root rights when called SUID root */
void pa_drop_root(void) {
uid_t uid = getuid();
@@ -54,6 +56,13 @@ void pa_drop_root(void) {
#endif
}
+#else
+
+void pa_drop_root(void) {
+}
+
+#endif
+
#ifdef HAVE_SYS_CAPABILITY_H
/* Limit capabilities set to CAPSYS_NICE */