summaryrefslogtreecommitdiffstats
path: root/polyp/caps.c
diff options
context:
space:
mode:
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 */