summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-02-24 22:30:16 +0100
committerGünther Deschner <gd@samba.org>2011-03-30 01:13:06 +0200
commitd85f140826374dd5ad3e7099b6bdb74967c6b9da (patch)
tree97fccf6f5b5c53a1e4f92c81460f85abeb6896dd
parent96487959e90b1aeec071d94e7f2c744af17fb5d0 (diff)
downloadsamba-d85f140826374dd5ad3e7099b6bdb74967c6b9da.tar.gz
samba-d85f140826374dd5ad3e7099b6bdb74967c6b9da.tar.xz
samba-d85f140826374dd5ad3e7099b6bdb74967c6b9da.zip
s3-winbind: remove global inclusion of libwbclient.
Guenther
-rw-r--r--source3/auth/auth_util.c1
-rw-r--r--source3/auth/auth_wbc.c1
-rw-r--r--source3/auth/auth_winbind.c1
-rw-r--r--source3/auth/server_info.c1
-rw-r--r--source3/auth/token_util.c1
-rw-r--r--source3/auth/user_krb5.c1
-rw-r--r--source3/groupdb/mapping.c1
-rw-r--r--source3/include/includes.h1
-rw-r--r--source3/include/proto.h35
-rw-r--r--source3/lib/winbind_util.c1
-rw-r--r--source3/lib/winbind_util.h60
-rw-r--r--source3/libsmb/errormap.c1
-rw-r--r--source3/libsmb/ntlmssp.c1
-rw-r--r--source3/passdb/lookup_sid.c1
-rw-r--r--source3/passdb/pdb_ldap.c1
-rw-r--r--source3/passdb/pdb_wbc_sam.c1
-rw-r--r--source3/rpc_server/netlogon/srv_netlog_nt.c1
-rw-r--r--source3/utils/net_rpc.c1
-rw-r--r--source3/utils/net_sam.c1
-rw-r--r--source3/web/diagnose.c1
-rw-r--r--source3/winbindd/idmap_nss.c1
21 files changed, 78 insertions, 36 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 688aac487b..187db5512a 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -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
diff --git a/source3/auth/auth_wbc.c b/source3/auth/auth_wbc.c
index 7ab9665922..06ddbb1277 100644
--- a/source3/auth/auth_wbc.c
+++ b/source3/auth/auth_wbc.c
@@ -38,6 +38,7 @@
*/
#include "includes.h"
+#include "nsswitch/libwbclient/wbclient.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source3/auth/auth_winbind.c b/source3/auth/auth_winbind.c
index 9328b66fb5..ff738beca0 100644
--- a/source3/auth/auth_winbind.c
+++ b/source3/auth/auth_winbind.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "nsswitch/libwbclient/wbclient.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c
index e218ca9f7f..363236c734 100644
--- a/source3/auth/server_info.c
+++ b/source3/auth/server_info.c
@@ -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
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c
index f88511d8d6..3afc4438a5 100644
--- a/source3/auth/token_util.c
+++ b/source3/auth/token_util.c
@@ -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
diff --git a/source3/auth/user_krb5.c b/source3/auth/user_krb5.c
index 50716fd56b..93ad0c051e 100644
--- a/source3/auth/user_krb5.c
+++ b/source3/auth/user_krb5.c
@@ -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
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index d76e344d37..d1a728abcf 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -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;
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 7d98cd583a..346829d2dc 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -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
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 600ed7aa8f..b1138234e0 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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);
diff --git a/source3/lib/winbind_util.c b/source3/lib/winbind_util.c
index ad1ccf5538..390d2db5e2 100644
--- a/source3/lib/winbind_util.c
+++ b/source3/lib/winbind_util.c
@@ -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
index 0000000000..960bd4ee77
--- /dev/null
+++ b/source3/lib/winbind_util.h
@@ -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__ */
diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c
index 049929f74b..bc9676bbff 100644
--- a/source3/libsmb/errormap.c
+++ b/source3/libsmb/errormap.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "nsswitch/libwbclient/wbclient.h"
#if HAVE_GSSAPI_GSSAPI_H
#include <gssapi/gssapi.h>
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index 619e5d4822..d000ed59c0 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -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 */
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index 23566b657d..386207889a 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -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.
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 0ac9a97411..7621bb6279 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -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
diff --git a/source3/passdb/pdb_wbc_sam.c b/source3/passdb/pdb_wbc_sam.c
index c1a7b75943..742e789901 100644
--- a/source3/passdb/pdb_wbc_sam.c
+++ b/source3/passdb/pdb_wbc_sam.c
@@ -37,6 +37,7 @@
*/
#include "includes.h"
+#include "lib/winbind_util.h"
/***************************************************************************
Default implementations of some functions.
diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c
index e5d61242e3..478958c621 100644
--- a/source3/rpc_server/netlogon/srv_netlog_nt.c
+++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
@@ -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;
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 3fbeb87f3b..e0da66671a 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -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);
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c
index af8aaa47df..156b85ca8c 100644
--- a/source3/utils/net_sam.c
+++ b/source3/utils/net_sam.c
@@ -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
diff --git a/source3/web/diagnose.c b/source3/web/diagnose.c
index 4a44012705..cf93991f94 100644
--- a/source3/web/diagnose.c
+++ b/source3/web/diagnose.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include "web/swat_proto.h"
+#include "lib/winbind_util.h"
#ifdef WITH_WINBIND
diff --git a/source3/winbindd/idmap_nss.c b/source3/winbindd/idmap_nss.c
index 1c49e76078..bfdb319c90 100644
--- a/source3/winbindd/idmap_nss.c
+++ b/source3/winbindd/idmap_nss.c
@@ -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