diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-01-30 14:25:51 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-02-05 19:47:26 +0100 |
commit | 16aa0744c6820c5400b73fd4889608c38fc55b39 (patch) | |
tree | b4d8617279cf73be2d71b9fe765c6e5009ff2ac4 /lib | |
parent | a51d750652671a41a2828b80feaa9e4d81219002 (diff) | |
download | samba-16aa0744c6820c5400b73fd4889608c38fc55b39.tar.gz samba-16aa0744c6820c5400b73fd4889608c38fc55b39.tar.bz2 samba-16aa0744c6820c5400b73fd4889608c38fc55b39.zip |
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".
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util/unix_privs.c | 11 | ||||
-rw-r--r-- | lib/util/util.c | 9 |
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 |