s3-winbind: remove global inclusion of libwbclient.
authorGünther Deschner <gd@samba.org>
Thu, 24 Feb 2011 21:30:16 +0000 (22:30 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 29 Mar 2011 23:13:06 +0000 (01:13 +0200)
Guenther

21 files changed:
source3/auth/auth_util.c
source3/auth/auth_wbc.c
source3/auth/auth_winbind.c
source3/auth/server_info.c
source3/auth/token_util.c
source3/auth/user_krb5.c
source3/groupdb/mapping.c
source3/include/includes.h
source3/include/proto.h
source3/lib/winbind_util.c
source3/lib/winbind_util.h [new file with mode: 0644]
source3/libsmb/errormap.c
source3/libsmb/ntlmssp.c
source3/passdb/lookup_sid.c
source3/passdb/pdb_ldap.c
source3/passdb/pdb_wbc_sam.c
source3/rpc_server/netlogon/srv_netlog_nt.c
source3/utils/net_rpc.c
source3/utils/net_sam.c
source3/web/diagnose.c
source3/winbindd/idmap_nss.c

index 688aac487bbc14084cdd77d324b0c3a72c871bb8..187db5512a8d1262c38cf58cab5fa76e26c7d8d9 100644 (file)
@@ -28,6 +28,7 @@
 #include "rpc_client/init_lsa.h"
 #include "../libcli/security/security.h"
 #include "../lib/util/util_pw.h"
+#include "lib/winbind_util.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
index 7ab9665922c2d9eb1a1a75c942923dc38d8bfc06..06ddbb12779f8dd094b03d2ade27fab28be1a4cc 100644 (file)
@@ -38,6 +38,7 @@
  */
 
 #include "includes.h"
+#include "nsswitch/libwbclient/wbclient.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
index 9328b66fb5089cb003fa2d67e8c2ff496c8797c5..ff738beca0ba6f04afb53e8da021e016d7bac5a4 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "nsswitch/libwbclient/wbclient.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
index e218ca9f7f3a3d82674f05f0e00d8c0d33d2a361..363236c7346aede5bc884f70b25f65aa01bd2061 100644 (file)
@@ -22,6 +22,7 @@
 #include "../librpc/gen_ndr/netlogon.h"
 #include "../libcli/security/security.h"
 #include "rpc_client/util_netlogon.h"
+#include "nsswitch/libwbclient/wbclient.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
index f88511d8d634893c47e50d1bf587c495cd0abd80..3afc4438a504b283cc698dcac82374a78762bb64 100644 (file)
@@ -30,6 +30,7 @@
 #include "../librpc/gen_ndr/netlogon.h"
 #include "../libcli/security/security.h"
 #include "../lib/util/util_pw.h"
+#include "lib/winbind_util.h"
 
 /****************************************************************************
  Check for a SID in an struct security_token
index 50716fd56b20e5e17e3af3f6532672b311915513..93ad0c051e1cd3a73e8b0cf5809da6114bc76391 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "librpc/gen_ndr/krb5pac.h"
+#include "nsswitch/libwbclient/wbclient.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
index d76e344d37efbb603c28c0bd9045610d26bd559b..d1a728abcf0fc6f0b8d3c1437c4d5f0e7e335d78 100644 (file)
@@ -23,6 +23,7 @@
 #include "includes.h"
 #include "groupdb/mapping.h"
 #include "../libcli/security/security.h"
+#include "lib/winbind_util.h"
 
 static const struct mapping_backend *backend;
 
index 7d98cd583a3e22ef6cd00d276b197781abc1c7c0..346829d2dc5d134638cdf77e98ac40382e1161d0 100644 (file)
@@ -582,7 +582,6 @@ enum flush_reason_enum {
     NUM_FLUSH_REASONS};
 
 #include "modules/nfs4_acls.h"
-#include "nsswitch/libwbclient/wbclient.h"
 
 /***** prototypes *****/
 #ifndef NO_PROTO_H
index 600ed7aa8f7934a6fd3857e8990a455fab5630b6..b1138234e0722b779c5020d837aeb8bedb962e34 100644 (file)
@@ -159,6 +159,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
                                const char *domain,
                                struct auth_serversupplied_info **server_info,
                                struct netr_SamInfo3 *info3);
+struct wbcAuthUserInfo;
 NTSTATUS make_server_info_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
                                          const char *sent_nt_username,
                                          const char *domain,
@@ -1449,40 +1450,6 @@ int islower_ascii(int c);
 
 const char *samba_version_string(void);
 
-/* The following definitions come from lib/winbind_util.c  */
-
-bool winbind_lookup_name(const char *dom_name, const char *name, struct dom_sid *sid,
-                         enum lsa_SidType *name_type);
-bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
-                       const char **domain, const char **name,
-                        enum lsa_SidType *name_type);
-bool winbind_ping(void);
-bool winbind_sid_to_uid(uid_t *puid, const struct dom_sid *sid);
-bool winbind_uid_to_sid(struct dom_sid *sid, uid_t uid);
-bool winbind_sid_to_gid(gid_t *pgid, const struct dom_sid *sid);
-bool winbind_gid_to_sid(struct dom_sid *sid, gid_t gid);
-struct passwd * winbind_getpwnam(const char * sname);
-struct passwd * winbind_getpwsid(const struct dom_sid *sid);
-wbcErr wb_is_trusted_domain(const char *domain);
-bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
-                        const struct dom_sid *domain_sid,
-                        int num_rids, uint32 *rids,
-                        const char **domain_name,
-                        const char ***names, enum lsa_SidType **types);
-bool winbind_allocate_uid(uid_t *uid);
-bool winbind_allocate_gid(gid_t *gid);
-bool winbind_get_groups(TALLOC_CTX *mem_ctx,
-                       const char *account,
-                       uint32_t *num_groups,
-                       gid_t ** _groups);
-bool winbind_get_sid_aliases(TALLOC_CTX *mem_ctx,
-                            const struct dom_sid *dom_sid,
-                            const struct dom_sid *members,
-                            size_t num_members,
-                            uint32_t **pp_alias_rids,
-                            size_t *p_num_alias_rids);
-
-
 /* The following definitions come from lib/wins_srv.c  */
 
 bool wins_srv_is_dead(struct in_addr wins_ip, struct in_addr src_ip);
index ad1ccf553848d195363578629fd0027da2b3c361..390d2db5e23ae8d074f4d5df45765387e892ac84 100644 (file)
@@ -25,6 +25,7 @@
 #if defined(WITH_WINBIND)
 
 #include "nsswitch/libwbclient/wbclient.h"
+#include "lib/winbind_util.h"
 
 struct passwd * winbind_getpwnam(const char * name)
 {
diff --git a/source3/lib/winbind_util.h b/source3/lib/winbind_util.h
new file mode 100644 (file)
index 0000000..960bd4e
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+   Unix SMB/CIFS implementation.
+   Winbind Utility functions
+
+   Copyright (C) Gerald (Jerry) Carter   2007
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __LIB__WINBIND_UTIL_H__
+#define __LIB__WINBIND_UTIL_H__
+
+/* needed for wbcErr below */
+#include "nsswitch/libwbclient/wbclient.h"
+
+/* The following definitions come from lib/winbind_util.c  */
+
+bool winbind_lookup_name(const char *dom_name, const char *name, struct dom_sid *sid,
+                         enum lsa_SidType *name_type);
+bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
+                       const char **domain, const char **name,
+                        enum lsa_SidType *name_type);
+bool winbind_ping(void);
+bool winbind_sid_to_uid(uid_t *puid, const struct dom_sid *sid);
+bool winbind_uid_to_sid(struct dom_sid *sid, uid_t uid);
+bool winbind_sid_to_gid(gid_t *pgid, const struct dom_sid *sid);
+bool winbind_gid_to_sid(struct dom_sid *sid, gid_t gid);
+struct passwd * winbind_getpwnam(const char * sname);
+struct passwd * winbind_getpwsid(const struct dom_sid *sid);
+wbcErr wb_is_trusted_domain(const char *domain);
+bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
+                        const struct dom_sid *domain_sid,
+                        int num_rids, uint32 *rids,
+                        const char **domain_name,
+                        const char ***names, enum lsa_SidType **types);
+bool winbind_allocate_uid(uid_t *uid);
+bool winbind_allocate_gid(gid_t *gid);
+bool winbind_get_groups(TALLOC_CTX *mem_ctx,
+                       const char *account,
+                       uint32_t *num_groups,
+                       gid_t ** _groups);
+bool winbind_get_sid_aliases(TALLOC_CTX *mem_ctx,
+                            const struct dom_sid *dom_sid,
+                            const struct dom_sid *members,
+                            size_t num_members,
+                            uint32_t **pp_alias_rids,
+                            size_t *p_num_alias_rids);
+
+#endif /* __LIB__WINBIND_UTIL_H__ */
index 049929f74bc8d90cd2a606f37ef70ff9b91b01ca..bc9676bbff63ab42058aea69cc50e5dfa332f39c 100644 (file)
@@ -20,7 +20,6 @@
  */
 
 #include "includes.h"
-#include "nsswitch/libwbclient/wbclient.h"
 
 #if HAVE_GSSAPI_GSSAPI_H
 #include <gssapi/gssapi.h>
index 619e5d48228b121ad4d2b0baf410a9ca3e8ed416..d000ed59c0348321ad8a9888607bdff877147a09 100644 (file)
@@ -30,6 +30,7 @@
 #include "../lib/crypto/md5.h"
 #include "../lib/crypto/arcfour.h"
 #include "../lib/crypto/hmacmd5.h"
+#include "../nsswitch/libwbclient/wbclient.h"
 
 static NTSTATUS ntlmssp_client_initial(struct ntlmssp_state *ntlmssp_state,
                                       TALLOC_CTX *out_mem_ctx, /* Unused at this time */
index 23566b657d1d1ae675a1831aceaf283e963b2871..386207889ac12355b6d22dd7460b4c1f7abaa7b7 100644 (file)
@@ -25,6 +25,7 @@
 #include "memcache.h"
 #include "idmap_cache.h"
 #include "../libcli/security/security.h"
+#include "lib/winbind_util.h"
 
 /*****************************************************************
  Dissect a user-provided name into domain, name, sid and type.
index 0ac9a9741153c83ed0d1f2ab9807d777ecc8bbb3..7621bb6279157e11da8fa5eb4af6ebced42e1115 100644 (file)
@@ -49,6 +49,7 @@
 #include "idmap_cache.h"
 #include "../libcli/security/security.h"
 #include "../lib/util/util_pw.h"
+#include "lib/winbind_util.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_PASSDB
index c1a7b75943a4f6e7fa0de1f72ecd2f9f40052df6..742e7899010ddda4982a6e8b4c004aa5177a284c 100644 (file)
@@ -37,6 +37,7 @@
  */
 
 #include "includes.h"
+#include "lib/winbind_util.h"
 
 /***************************************************************************
   Default implementations of some functions.
index e5d61242e33bb9f96b85b0eb53d4f1a1fbf0ca9d..478958c62191af467b81ad1c6aeabab137782c9d 100644 (file)
@@ -41,6 +41,7 @@
 #include "librpc/gen_ndr/ndr_drsblobs.h"
 #include "lib/crypto/arcfour.h"
 #include "lib/crypto/md4.h"
+#include "nsswitch/libwbclient/wbclient.h"
 
 extern userdom_struct current_user_info;
 
index 3fbeb87f3b19959c04fd1b95759d2366b6213419..e0da66671acb756276e8ad0b6735933b508d6e59 100644 (file)
@@ -40,6 +40,7 @@
 #include "rpc_client/init_lsa.h"
 #include "../libcli/security/security.h"
 #include "libsmb/clirap.h"
+#include "nsswitch/libwbclient/wbclient.h"
 
 static int net_mode_share;
 static NTSTATUS sync_files(struct copy_clistate *cp_clistate, const char *mask);
index af8aaa47dfd37ad36fccd98411a2b92e33897de1..156b85ca8c594797e280e9b85b3915fe9555bee7 100644 (file)
@@ -23,6 +23,7 @@
 #include "../librpc/gen_ndr/samr.h"
 #include "smbldap.h"
 #include "../libcli/security/security.h"
+#include "lib/winbind_util.h"
 
 /*
  * Set a user's data
index 4a44012705ba57d67dc309fe511732cf57da5533..cf93991f94cfe6d23feb3d29098e648f6a517436 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "web/swat_proto.h"
+#include "lib/winbind_util.h"
 
 #ifdef WITH_WINBIND
 
index 1c49e76078aa55f94e0c446fbc4d7724ec5fe451..bfdb319c90bae0fc1eeed5605e95c0a45a526b3b 100644 (file)
@@ -23,6 +23,7 @@
 #include "winbindd.h"
 #include "nsswitch/winbind_client.h"
 #include "idmap.h"
+#include "lib/winbind_util.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_IDMAP