#endif /* NSS_WRAPPER_DISABLE */
#endif /* NSS_WRAPPER */
+#ifdef UID_WRAPPER
+# ifndef UID_WRAPPER_DISABLE
+# ifndef UID_WRAPPER_NOT_REPLACE
+# define UID_WRAPPER_REPLACE
+# endif /* UID_WRAPPER_NOT_REPLACE */
+# include "../uid_wrapper/uid_wrapper.h"
+# endif /* UID_WRAPPER_DISABLE */
+#else /* UID_WRAPPER */
+# define uwrap_enabled() 0
+#endif /* UID_WRAPPER */
+
#endif
#ifdef _SAMBA_BUILD_
#define UID_WRAPPER_NOT_REPLACE
-#include "../replace/replace.h"
-#include <talloc.h>
+#include "replace.h"
#include "system/passwd.h"
+#include <talloc.h>
#else /* _SAMBA_BUILD_ */
uid_t uwrap_getuid(void);
gid_t uwrap_getgid(void);
+#ifdef UID_WRAPPER_REPLACE
+
#ifdef seteuid
#undef seteuid
#endif
#endif
#define getgid uwrap_getgid
-#endif
+#endif /* UID_WRAPPER_REPLACE */
+#endif /* uwrap_enabled */
#endif /* __UID_WRAPPER_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
#include "system/filesys.h"
#include "system/locale.h"
#include "system/shmem.h"
+#include "system/passwd.h"
#undef malloc
#undef strcasecmp
#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
#include "system/capability.h"
#include "system/passwd.h"
#include "system/filesys.h"
-#include "lib/uid_wrapper/uid_wrapper.h"
#ifdef HAVE_SYS_PRCTL_H
#include <sys/prctl.h>
#ifndef AUTOCONF_TEST
#include "includes.h"
-#include "lib/uid_wrapper/uid_wrapper.h"
+#include "system/passwd.h" /* uid_wrapper */
#else
/* we are running this code in autoconf test mode to see which type of setuid
function works */
*/
#include "includes.h"
+#include "system/passwd.h" /* uid_wrapper */
#include "../librpc/gen_ndr/ndr_lsa.h"
#include "../librpc/gen_ndr/ndr_samr.h"
#include "auth.h"
*/
#include "includes.h"
+#include "system/passwd.h" /* uid_wrapper */
#include "rpc_server/srv_access_check.h"
#include "../libcli/security/security.h"
#include "passdb/machine_sid.h"
*/
#include "includes.h"
+#include "system/passwd.h"
#include "smbd/smbd.h"
#include "smbd/globals.h"
#include "libcli/security/security_token.h"
#include "auth.h"
#include "smbprofile.h"
-#include "lib/uid_wrapper/uid_wrapper.h"
extern struct current_user current_user;
*/
#include "includes.h"
+#include "system/passwd.h"
#include "auth/auth.h"
#include "vfs_posix.h"
#include "librpc/gen_ndr/xattr.h"
#include "../lib/util/unix_privs.h"
#include "lib/util/samba_modules.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 {
const struct pvfs_acl_ops *ops;
#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
-
-
NTSTATUS ntvfs_unixuid_init(void);
struct unixuid_private {