#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
*/
#include "includes.h"
+#include "nsswitch/libwbclient/wbclient.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
*/
#include "includes.h"
+#include "nsswitch/libwbclient/wbclient.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
#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
#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
#include "includes.h"
#include "librpc/gen_ndr/krb5pac.h"
+#include "nsswitch/libwbclient/wbclient.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
#include "includes.h"
#include "groupdb/mapping.h"
#include "../libcli/security/security.h"
+#include "lib/winbind_util.h"
static const struct mapping_backend *backend;
NUM_FLUSH_REASONS};
#include "modules/nfs4_acls.h"
-#include "nsswitch/libwbclient/wbclient.h"
/***** prototypes *****/
#ifndef NO_PROTO_H
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,
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);
#if defined(WITH_WINBIND)
#include "nsswitch/libwbclient/wbclient.h"
+#include "lib/winbind_util.h"
struct passwd * winbind_getpwnam(const char * name)
{
--- /dev/null
+/*
+ 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__ */
*/
#include "includes.h"
-#include "nsswitch/libwbclient/wbclient.h"
#if HAVE_GSSAPI_GSSAPI_H
#include <gssapi/gssapi.h>
#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 */
#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.
#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
*/
#include "includes.h"
+#include "lib/winbind_util.h"
/***************************************************************************
Default implementations of some functions.
#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;
#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);
#include "../librpc/gen_ndr/samr.h"
#include "smbldap.h"
#include "../libcli/security/security.h"
+#include "lib/winbind_util.h"
/*
* Set a user's data
#include "includes.h"
#include "web/swat_proto.h"
+#include "lib/winbind_util.h"
#ifdef WITH_WINBIND
#include "winbindd.h"
#include "nsswitch/winbind_client.h"
#include "idmap.h"
+#include "lib/winbind_util.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP