s4:UID wrapper - Fix includes
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Sat, 30 Jan 2010 13:25:51 +0000 (14:25 +0100)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 5 Feb 2010 18:47:26 +0000 (19:47 +0100)
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".

lib/util/unix_privs.c
lib/util/util.c
source4/heimdal_build/config.h
source4/include/includes.h
source4/ntvfs/posix/pvfs_acl.c
source4/ntvfs/unixuid/vfs_unixuid.c

index f55e739a9bbaa18e2e5ef07dcfceff1048645e6b..b30b2f5163c04d7d091619a1b6812f742d8adfa7 100644 (file)
 */
 
 #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
  * @brief Gaining/losing root privileges
 /**
  * @file
  * @brief Gaining/losing root privileges
index 67b166b4212f01d85be7c61c9c9d7c78b8a91fbd..25e010830ec15797e20494a880c9023e2848b4ff 100644 (file)
 #undef strdup
 #undef realloc
 
 #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
 /**
  * @file
  * @brief Misc utility functions
index 8e9501b23b558b5f09301c62b85d03fb42caee59..be544cb83bb753da496f379b61b0dbf61e2ea90c 100644 (file)
 
 #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*/
 #ifdef HAVE_LIBINTL_H
 #define LIBINTL
 /*Workaround for heimdal define vs samba define*/
 #ifdef HAVE_LIBINTL_H
 #define LIBINTL
index 8d28808194788b9bdf1e8dbc626772a267242ccf..796e313572d19e7682507350f492d8e3ba06baf0 100644 (file)
 #include "../lib/util/smb_threads.h"
 #include "../lib/util/smb_threads_internal.h"
 
 #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 */
 #endif /* _INCLUDES_H */
index c20358be2aed56426ece9d7d0f4e81575e97d63e..c100abe5e73bd38e862615c29ce0417c3b9b1a62 100644 (file)
 #include "libcli/security/security.h"
 #include "param/param.h"
 
 #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 {
 
 /* the list of currently registered ACL backends */
 static struct pvfs_acl_backend {
index 8102c995369bdcdb8941ef9486faea205d1cc5a4..85c70d7dd107ac1927e92f20a1019e914b9e26b6 100644 (file)
 #define TEVENT_DEPRECATED
 #include <tevent.h>
 
 #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;
 struct unixuid_private {
        struct wbc_context *wbc_ctx;
        struct unix_sec_ctx *last_sec_ctx;