mirror of
https://github.com/samba-team/samba.git
synced 2025-03-25 14:50:24 +03:00
Include uid_wrapper correctly.
This commit is contained in:
parent
32fb9017ea
commit
7cb08171ce
@ -109,4 +109,15 @@ char *rep_getpass(const char *prompt);
|
||||
#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
|
||||
|
@ -19,9 +19,9 @@
|
||||
#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_ */
|
||||
|
||||
|
@ -33,6 +33,8 @@ int uwrap_getgroups(int size, gid_t *list);
|
||||
uid_t uwrap_getuid(void);
|
||||
gid_t uwrap_getgid(void);
|
||||
|
||||
#ifdef UID_WRAPPER_REPLACE
|
||||
|
||||
#ifdef seteuid
|
||||
#undef seteuid
|
||||
#endif
|
||||
@ -93,5 +95,6 @@ gid_t uwrap_getgid(void);
|
||||
#endif
|
||||
#define getgid uwrap_getgid
|
||||
|
||||
#endif
|
||||
#endif /* UID_WRAPPER_REPLACE */
|
||||
#endif /* uwrap_enabled */
|
||||
#endif /* __UID_WRAPPER_H__ */
|
||||
|
@ -23,15 +23,6 @@
|
||||
#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
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "system/filesys.h"
|
||||
#include "system/locale.h"
|
||||
#include "system/shmem.h"
|
||||
#include "system/passwd.h"
|
||||
|
||||
#undef malloc
|
||||
#undef strcasecmp
|
||||
@ -34,15 +35,6 @@
|
||||
#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
|
||||
|
@ -25,7 +25,6 @@
|
||||
#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>
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#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 */
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#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"
|
||||
|
@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
#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"
|
||||
|
@ -18,12 +18,12 @@
|
||||
*/
|
||||
|
||||
#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;
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "system/passwd.h"
|
||||
#include "auth/auth.h"
|
||||
#include "vfs_posix.h"
|
||||
#include "librpc/gen_ndr/xattr.h"
|
||||
@ -28,15 +29,6 @@
|
||||
#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;
|
||||
|
@ -29,16 +29,6 @@
|
||||
#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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user