summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/util/unix_privs.c11
-rw-r--r--lib/util/util.c9
-rw-r--r--source4/heimdal_build/config.h9
-rw-r--r--source4/include/includes.h9
-rw-r--r--source4/ntvfs/posix/pvfs_acl.c8
-rw-r--r--source4/ntvfs/unixuid/vfs_unixuid.c10
6 files changed, 37 insertions, 19 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
diff --git a/source4/heimdal_build/config.h b/source4/heimdal_build/config.h
index 8e9501b23b..be544cb83b 100644
--- a/source4/heimdal_build/config.h
+++ b/source4/heimdal_build/config.h
@@ -27,15 +27,6 @@
#undef HAVE_KRB5_ENCRYPT_BLOCK
-#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
-
/*Workaround for heimdal define vs samba define*/
#ifdef HAVE_LIBINTL_H
#define LIBINTL
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 8d28808194..796e313572 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -69,13 +69,4 @@
#include "../lib/util/smb_threads.h"
#include "../lib/util/smb_threads_internal.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
-
#endif /* _INCLUDES_H */
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c
index c20358be2a..c100abe5e7 100644
--- a/source4/ntvfs/posix/pvfs_acl.c
+++ b/source4/ntvfs/posix/pvfs_acl.c
@@ -26,6 +26,14 @@
#include "libcli/security/security.h"
#include "param/param.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
/* the list of currently registered ACL backends */
static struct pvfs_acl_backend {
diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c
index 8102c99536..85c70d7dd1 100644
--- a/source4/ntvfs/unixuid/vfs_unixuid.c
+++ b/source4/ntvfs/unixuid/vfs_unixuid.c
@@ -29,6 +29,16 @@
#define TEVENT_DEPRECATED
#include <tevent.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
+
+
struct unixuid_private {
struct wbc_context *wbc_ctx;
struct unix_sec_ctx *last_sec_ctx;