summaryrefslogtreecommitdiffstats
path: root/polyp/caps.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-01-10 17:51:06 +0000
committerLennart Poettering <lennart@poettering.net>2006-01-10 17:51:06 +0000
commitf7a99e90470526bb28cc0c225f96490110094aed (patch)
treecbcc4f2df6d66e180fd65ee50488545786d094f1 /polyp/caps.c
parent80ae72ce45dbc23ddc360749924110dcc752491e (diff)
Merge Pierre's changes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@445 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 */