mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
s4:UID wrapper - Fix includes
The includes of the UID wrapper headers werent't really efficient according to metze's post on the technical mailing list (http://lists.samba.org/archive/samba-technical/2010-February/069165.html). To achieve this move the "uid_wrapper.h" includes into "lib/util/unix_privs.c", "lib/util/util.c", "ntvfs/posix/pvfs_acl.c" and "ntvfs/unixuid/vfs_unixuid.c".
This commit is contained in:
@ -20,9 +20,18 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "system/filesys.h"
|
#include "system/passwd.h"
|
||||||
#include "../lib/util/unix_privs.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
|
* @file
|
||||||
* @brief Gaining/losing root privileges
|
* @brief Gaining/losing root privileges
|
||||||
|
@ -31,6 +31,15 @@
|
|||||||
#undef strdup
|
#undef strdup
|
||||||
#undef realloc
|
#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
|
* @file
|
||||||
* @brief Misc utility functions
|
* @brief Misc utility functions
|
||||||
|
@ -27,15 +27,6 @@
|
|||||||
|
|
||||||
#undef HAVE_KRB5_ENCRYPT_BLOCK
|
#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*/
|
/*Workaround for heimdal define vs samba define*/
|
||||||
#ifdef HAVE_LIBINTL_H
|
#ifdef HAVE_LIBINTL_H
|
||||||
#define LIBINTL
|
#define LIBINTL
|
||||||
|
@ -69,13 +69,4 @@
|
|||||||
#include "../lib/util/smb_threads.h"
|
#include "../lib/util/smb_threads.h"
|
||||||
#include "../lib/util/smb_threads_internal.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 */
|
#endif /* _INCLUDES_H */
|
||||||
|
@ -26,6 +26,14 @@
|
|||||||
#include "libcli/security/security.h"
|
#include "libcli/security/security.h"
|
||||||
#include "param/param.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 */
|
/* the list of currently registered ACL backends */
|
||||||
static struct pvfs_acl_backend {
|
static struct pvfs_acl_backend {
|
||||||
|
@ -29,6 +29,16 @@
|
|||||||
#define TEVENT_DEPRECATED
|
#define TEVENT_DEPRECATED
|
||||||
#include <tevent.h>
|
#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 unixuid_private {
|
||||||
struct wbc_context *wbc_ctx;
|
struct wbc_context *wbc_ctx;
|
||||||
struct unix_sec_ctx *last_sec_ctx;
|
struct unix_sec_ctx *last_sec_ctx;
|
||||||
|
Reference in New Issue
Block a user