summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/util/unix_privs.c11
-rw-r--r--lib/util/util.c9
2 files changed, 19 insertions, 1 deletions
diff --git a/lib/util/unix_privs.c b/lib/util/unix_privs.c
index f55e739a9b..b30b2f5163 100644
--- a/lib/util/unix_privs.c
+++ b/lib/util/unix_privs.c
@@ -20,9 +20,18 @@
*/
#include "includes.h"
-#include "system/filesys.h"
+#include "system/passwd.h"
#include "../lib/util/unix_privs.h"
+#if defined(UID_WRAPPER)
+#if !defined(UID_WRAPPER_REPLACE) && !defined(UID_WRAPPER_NOT_REPLACE)
+#define UID_WRAPPER_REPLACE
+#include "../uid_wrapper/uid_wrapper.h"
+#endif
+#else
+#define uwrap_enabled() 0
+#endif
+
/**
* @file
* @brief Gaining/losing root privileges
diff --git a/lib/util/util.c b/lib/util/util.c
index 67b166b421..25e010830e 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -31,6 +31,15 @@
#undef strdup
#undef realloc
+#if defined(UID_WRAPPER)
+#if !defined(UID_WRAPPER_REPLACE) && !defined(UID_WRAPPER_NOT_REPLACE)
+#define UID_WRAPPER_REPLACE
+#include "../uid_wrapper/uid_wrapper.h"
+#endif
+#else
+#define uwrap_enabled() 0
+#endif
+
/**
* @file
* @brief Misc utility functions