summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in15
-rw-r--r--source3/nsswitch/winbindd_glue.c69
-rw-r--r--source3/nsswitch/winbindd_group.c14
-rw-r--r--source3/nsswitch/winbindd_user.c4
-rw-r--r--source3/nsswitch/winbindd_util.c74
5 files changed, 87 insertions, 89 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index e40a647fb7..11bfb503d7 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -145,11 +145,11 @@ RPC_PARSE_OBJ = rpc_parse/parse_lsa.o rpc_parse/parse_net.o \
rpc_parse/parse_creds.o
-#RPC_CLIENT_OBJ = rpc_client/cli_netlogon.o rpc_client/cli_pipe.o \
-# rpc_client/cli_lsarpc.o rpc_client/cli_connect.o \
-# rpc_client/cli_use.o rpc_client/cli_login.o \
-# rpc_client/cli_spoolss_notify.o rpc_client/ncacn_np_use.o \
-# lib/util_list.o
+RPC_CLIENT_OBJ = rpc_client/cli_netlogon.o rpc_client/cli_pipe.o \
+ rpc_client/cli_lsarpc.o rpc_client/cli_connect.o \
+ rpc_client/cli_use.o rpc_client/cli_login.o \
+ rpc_client/cli_spoolss_notify.o rpc_client/ncacn_np_use.o \
+ lib/util_list.o
LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o
@@ -191,8 +191,9 @@ MSDFS_OBJ = msdfs/msdfs.o
SMBD_OBJ = $(SMBD_OBJ1) $(MSDFS_OBJ) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \
$(RPC_SERVER_OBJ) $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) \
- $(LOCKING_OBJ) $(PASSDB_OBJ) $(PRINTING_OBJ) $(PROFILE_OBJ) $(LIB_OBJ) \
- $(PRINTBACKEND_OBJ) $(QUOTAOBJS) $(OPLOCK_OBJ) $(NOTIFY_OBJ) $(GROUPDB_OBJ)
+ $(LOCKING_OBJ) $(PASSDB_OBJ) $(PRINTING_OBJ) $(PROFILE_OBJ) \
+ $(LIB_OBJ) $(PRINTBACKEND_OBJ) $(QUOTAOBJS) $(OPLOCK_OBJ) \
+ $(NOTIFY_OBJ) $(GROUPDB_OBJ)
NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \
diff --git a/source3/nsswitch/winbindd_glue.c b/source3/nsswitch/winbindd_glue.c
index ac8c60d26c..9007e8c275 100644
--- a/source3/nsswitch/winbindd_glue.c
+++ b/source3/nsswitch/winbindd_glue.c
@@ -27,7 +27,7 @@
/****************************************************************************
do a LSA Open Policy
****************************************************************************/
-BOOL lsa_open_policy(char *server, BOOL sec_qos, uint32 des_access,
+BOOL wb_lsa_open_policy(char *server, BOOL sec_qos, uint32 des_access,
CLI_POLICY_HND *pol)
{
struct nmb_name calling, called;
@@ -86,8 +86,8 @@ BOOL lsa_open_policy(char *server, BOOL sec_qos, uint32 des_access,
/****************************************************************************
do a LSA Enumerate Trusted Domain
****************************************************************************/
-BOOL lsa_enum_trust_dom(CLI_POLICY_HND *hnd, uint32 *enum_ctx,
- uint32 * num_doms, char ***names, DOM_SID **sids)
+BOOL wb_lsa_enum_trust_dom(CLI_POLICY_HND *hnd, uint32 *enum_ctx,
+ uint32 * num_doms, char ***names, DOM_SID **sids)
{
uint32 ret;
@@ -100,8 +100,8 @@ BOOL lsa_enum_trust_dom(CLI_POLICY_HND *hnd, uint32 *enum_ctx,
/****************************************************************************
do a LSA Query Info Policy
****************************************************************************/
-BOOL lsa_query_info_pol(CLI_POLICY_HND *hnd, uint16 info_class,
- fstring domain_name, DOM_SID *domain_sid)
+BOOL wb_lsa_query_info_pol(CLI_POLICY_HND *hnd, uint16 info_class,
+ fstring domain_name, DOM_SID *domain_sid)
{
uint32 ret;
@@ -114,8 +114,8 @@ BOOL lsa_query_info_pol(CLI_POLICY_HND *hnd, uint16 info_class,
/****************************************************************************
do a LSA Lookup Names
****************************************************************************/
-BOOL lsa_lookup_names(CLI_POLICY_HND *hnd, int num_names, char **names,
- DOM_SID **sids, uint32 **types, int *num_sids)
+BOOL wb_lsa_lookup_names(CLI_POLICY_HND *hnd, int num_names, char **names,
+ DOM_SID **sids, uint32 **types, int *num_sids)
{
uint32 ret;
@@ -128,8 +128,8 @@ BOOL lsa_lookup_names(CLI_POLICY_HND *hnd, int num_names, char **names,
/****************************************************************************
do a LSA Lookup SIDS
****************************************************************************/
-BOOL lsa_lookup_sids(CLI_POLICY_HND *hnd, int num_sids, DOM_SID *sids,
- char ***names, uint32 **types, int *num_names)
+BOOL wb_lsa_lookup_sids(CLI_POLICY_HND *hnd, int num_sids, DOM_SID *sids,
+ char ***names, uint32 **types, int *num_names)
{
uint32 ret;
@@ -142,7 +142,7 @@ BOOL lsa_lookup_sids(CLI_POLICY_HND *hnd, int num_sids, DOM_SID *sids,
/****************************************************************************
lsa_close glue
****************************************************************************/
-BOOL lsa_close(CLI_POLICY_HND *hnd)
+BOOL wb_lsa_close(CLI_POLICY_HND *hnd)
{
uint32 ret;
@@ -155,7 +155,7 @@ BOOL lsa_close(CLI_POLICY_HND *hnd)
/****************************************************************************
samr_close glue
****************************************************************************/
-BOOL samr_close(CLI_POLICY_HND *hnd)
+BOOL wb_samr_close(CLI_POLICY_HND *hnd)
{
uint32 ret;
@@ -168,7 +168,7 @@ BOOL samr_close(CLI_POLICY_HND *hnd)
/****************************************************************************
samr_connect glue
****************************************************************************/
-BOOL samr_connect(char *srv_name, uint32 access_mask,
+BOOL wb_samr_connect(char *srv_name, uint32 access_mask,
CLI_POLICY_HND *connect_pol)
{
uint32 ret;
@@ -184,10 +184,8 @@ BOOL samr_connect(char *srv_name, uint32 access_mask,
/****************************************************************************
samr_open_domain glue
****************************************************************************/
-BOOL samr_open_domain(CLI_POLICY_HND *connect_pol,
- uint32 ace_perms,
- DOM_SID *sid,
- CLI_POLICY_HND *domain_pol)
+BOOL wb_samr_open_domain(CLI_POLICY_HND *connect_pol, uint32 ace_perms,
+ DOM_SID *sid, CLI_POLICY_HND *domain_pol)
{
uint32 ret;
@@ -209,7 +207,7 @@ BOOL samr_open_domain(CLI_POLICY_HND *connect_pol,
/*******************************************************************
frees a structure.
********************************************************************/
-void free_samr_userinfo_ctr(SAM_USERINFO_CTR * ctr)
+void wb_free_samr_userinfo_ctr(SAM_USERINFO_CTR * ctr)
{
if (ctr == NULL)
return;
@@ -220,10 +218,9 @@ void free_samr_userinfo_ctr(SAM_USERINFO_CTR * ctr)
/****************************************************************************
do a SAMR enumerate groups
****************************************************************************/
-uint32 samr_enum_dom_groups(CLI_POLICY_HND *pol,
- uint32 *start_idx, uint32 size,
- struct acct_info **sam,
- uint32 *num_sam_groups)
+uint32 wb_samr_enum_dom_groups(CLI_POLICY_HND *pol, uint32 *start_idx,
+ uint32 size, struct acct_info **sam,
+ uint32 *num_sam_groups)
{
DEBUG(0,("unimplemented samr_enum_dom_groups\n"));
return -1;
@@ -232,8 +229,8 @@ uint32 samr_enum_dom_groups(CLI_POLICY_HND *pol,
/****************************************************************************
do a SAMR enumerate groups
****************************************************************************/
-BOOL get_samr_query_userinfo(CLI_POLICY_HND *pol, uint32 info_level,
- uint32 user_rid, SAM_USERINFO_CTR *ctr)
+BOOL wb_get_samr_query_userinfo(CLI_POLICY_HND *pol, uint32 info_level,
+ uint32 user_rid, SAM_USERINFO_CTR *ctr)
{
POLICY_HND user_pol;
BOOL got_user_pol = False;
@@ -261,8 +258,8 @@ BOOL get_samr_query_userinfo(CLI_POLICY_HND *pol, uint32 info_level,
/****************************************************************************
do a SAMR enumerate groups
****************************************************************************/
-BOOL samr_open_user(CLI_POLICY_HND *pol, uint32 access_mask, uint32 rid,
- POLICY_HND *user_pol)
+BOOL wb_samr_open_user(CLI_POLICY_HND *pol, uint32 access_mask, uint32 rid,
+ POLICY_HND *user_pol)
{
uint32 ret;
@@ -272,8 +269,8 @@ BOOL samr_open_user(CLI_POLICY_HND *pol, uint32 access_mask, uint32 rid,
return (ret == NT_STATUS_NOPROBLEMO);
}
-BOOL samr_query_usergroups(CLI_POLICY_HND *pol, uint32 *num_groups,
- DOM_GID **gid)
+BOOL wb_samr_query_usergroups(CLI_POLICY_HND *pol, uint32 *num_groups,
+ DOM_GID **gid)
{
uint32 ret;
@@ -283,7 +280,7 @@ BOOL samr_query_usergroups(CLI_POLICY_HND *pol, uint32 *num_groups,
return (ret == NT_STATUS_NOPROBLEMO);
}
-BOOL get_samr_query_groupinfo(CLI_POLICY_HND *pol, uint32 info_level,
+BOOL wb_get_samr_query_groupinfo(CLI_POLICY_HND *pol, uint32 info_level,
uint32 group_rid, GROUP_INFO_CTR *ctr)
{
POLICY_HND group_pol;
@@ -309,9 +306,9 @@ BOOL get_samr_query_groupinfo(CLI_POLICY_HND *pol, uint32 info_level,
return (result == NT_STATUS_NOPROBLEMO);
}
-BOOL sam_query_groupmem(CLI_POLICY_HND *pol, uint32 group_rid,
- uint32 *num_names, uint32 **rid_mem, char ***names,
- uint32 **name_types)
+BOOL wb_sam_query_groupmem(CLI_POLICY_HND *pol, uint32 group_rid,
+ uint32 *num_names, uint32 **rid_mem,
+ char ***names, uint32 **name_types)
{
BOOL got_group_pol = False;
POLICY_HND group_pol;
@@ -339,8 +336,8 @@ BOOL sam_query_groupmem(CLI_POLICY_HND *pol, uint32 group_rid,
return (result == NT_STATUS_NOPROBLEMO);
}
-BOOL samr_query_dom_info(CLI_POLICY_HND *pol, uint16 switch_value,
- SAM_UNK_CTR *ctr)
+BOOL wb_samr_query_dom_info(CLI_POLICY_HND *pol, uint16 switch_value,
+ SAM_UNK_CTR *ctr)
{
uint32 ret;
@@ -350,9 +347,9 @@ BOOL samr_query_dom_info(CLI_POLICY_HND *pol, uint16 switch_value,
return (ret == NT_STATUS_NOPROBLEMO);
}
-BOOL samr_query_dispinfo(CLI_POLICY_HND *pol, uint32 *start_ndx,
- uint16 info_level, uint32 *num_entries,
- SAM_DISPINFO_CTR *ctr)
+BOOL wb_samr_query_dispinfo(CLI_POLICY_HND *pol, uint32 *start_ndx,
+ uint16 info_level, uint32 *num_entries,
+ SAM_DISPINFO_CTR *ctr)
{
uint32 ret;
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index 67cf10a1f5..b56d2787d6 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -502,13 +502,13 @@ static BOOL get_sam_group_entries(struct getent_state *ent)
num_entries = 0;
status =
- samr_enum_dom_groups(&ent->domain->
- sam_dom_handle,
- &start_ndx,
- 0x8000, /* buffer size? */
- (struct acct_info **)
- &sam_grp_entries,
- &num_entries);
+ wb_samr_enum_dom_groups(&ent->domain->
+ sam_dom_handle,
+ &start_ndx,
+ 0x8000, /* buffer size? */
+ (struct acct_info **)
+ &sam_grp_entries,
+ &num_entries);
/* Copy entries into return buffer */
diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c
index 66e220f927..95830ead20 100644
--- a/source3/nsswitch/winbindd_user.c
+++ b/source3/nsswitch/winbindd_user.c
@@ -171,7 +171,7 @@ enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state
unistr2_to_ascii(gecos_name, &user_info.info.id21->uni_full_name,
sizeof(gecos_name) - 1);
- free_samr_userinfo_ctr(&user_info);
+ wb_free_samr_userinfo_ctr(&user_info);
/* Now take all this information and fill in a passwd structure */
@@ -261,7 +261,7 @@ enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state
unistr2_to_ascii(gecos_name, &user_info.info.id21->uni_full_name,
sizeof(gecos_name) - 1);
- free_samr_userinfo_ctr(&user_info);
+ wb_free_samr_userinfo_ctr(&user_info);
/* Resolve gid number */
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index 0661586376..b838dd0145 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -101,8 +101,8 @@ static BOOL get_trusted_domains(void)
}
/* Enumerate list of trusted domains */
- result = lsa_enum_trust_dom(&server_state.lsa_handle, &enum_ctx,
- &num_doms, &domains, &sids);
+ result = wb_lsa_enum_trust_dom(&server_state.lsa_handle, &enum_ctx,
+ &num_doms, &domains, &sids);
if (!result || !domains) return False;
@@ -132,31 +132,31 @@ static BOOL open_sam_handles(struct winbindd_domain *domain)
/* Shut down existing sam handles */
if (domain->sam_dom_handle_open) {
- samr_close(&domain->sam_dom_handle);
+ wb_samr_close(&domain->sam_dom_handle);
domain->sam_dom_handle_open = False;
}
if (domain->sam_handle_open) {
- samr_close(&domain->sam_handle);
+ wb_samr_close(&domain->sam_handle);
domain->sam_handle_open = False;
}
/* Open sam handle */
domain->sam_handle_open =
- samr_connect(domain->controller,
- SEC_RIGHTS_MAXIMUM_ALLOWED,
- &domain->sam_handle);
+ wb_samr_connect(domain->controller,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ &domain->sam_handle);
if (!domain->sam_handle_open) return False;
/* Open sam domain handle */
domain->sam_dom_handle_open =
- samr_open_domain(&domain->sam_handle,
- SEC_RIGHTS_MAXIMUM_ALLOWED,
- &domain->sid,
- &domain->sam_dom_handle);
+ wb_samr_open_domain(&domain->sam_handle,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ &domain->sid,
+ &domain->sam_dom_handle);
if (!domain->sam_dom_handle_open) return False;
@@ -253,7 +253,7 @@ void winbindd_kill_connections(struct winbindd_domain *domain)
if (is_server) {
server_state.pwdb_initialised = False;
server_state.lsa_handle_open = False;
- lsa_close(&server_state.lsa_handle);
+ wb_lsa_close(&server_state.lsa_handle);
}
/* Close domain sam handles but don't free them as this
@@ -261,12 +261,12 @@ void winbindd_kill_connections(struct winbindd_domain *domain)
will be reopened later. */
if (domain->sam_dom_handle_open) {
- samr_close(&domain->sam_dom_handle);
+ wb_samr_close(&domain->sam_dom_handle);
domain->sam_dom_handle_open = False;
}
if (domain->sam_handle_open) {
- samr_close(&domain->sam_handle);
+ wb_samr_close(&domain->sam_handle);
domain->sam_handle_open = False;
}
@@ -383,9 +383,9 @@ void establish_connections(BOOL force_reestablish)
if (!server_state.lsa_handle_open) {
server_state.lsa_handle_open =
- lsa_open_policy(server_state.controller,
- False, SEC_RIGHTS_MAXIMUM_ALLOWED,
- &server_state.lsa_handle);
+ wb_lsa_open_policy(server_state.controller,
+ False, SEC_RIGHTS_MAXIMUM_ALLOWED,
+ &server_state.lsa_handle);
if (!server_state.lsa_handle_open) return;
@@ -425,14 +425,14 @@ BOOL lookup_domain_sid(char *domain_name, struct winbindd_domain *domain)
if (strequal(domain->controller, server_state.controller)) {
/* Do a level 5 query info policy */
- return lsa_query_info_pol(&server_state.lsa_handle, 0x05,
- level5_dom, &domain->sid);
+ return wb_lsa_query_info_pol(&server_state.lsa_handle, 0x05,
+ level5_dom, &domain->sid);
}
/* Use lsaenumdomains to get sid for this domain */
- res = lsa_enum_trust_dom(&server_state.lsa_handle, &enum_ctx,
- &num_doms, &domains, &sids);
+ res = wb_lsa_enum_trust_dom(&server_state.lsa_handle, &enum_ctx,
+ &num_doms, &domains, &sids);
/* Look for domain name */
@@ -502,8 +502,8 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid,
/* Lookup name */
- res = lsa_lookup_names(&server_state.lsa_handle, num_names, (char **)&name,
- &sids, &types, &num_sids);
+ res = wb_lsa_lookup_names(&server_state.lsa_handle, num_names,
+ (char **)&name, &sids, &types, &num_sids);
/* Return rid and type if lookup successful */
@@ -542,8 +542,8 @@ BOOL winbindd_lookup_name_by_sid(DOM_SID *sid, fstring name,
/* Lookup name */
- res = lsa_lookup_sids(&server_state.lsa_handle, num_sids, sid,
- &names, &types, &num_names);
+ res = wb_lsa_lookup_sids(&server_state.lsa_handle, num_sids, sid,
+ &names, &types, &num_names);
/* Return name and type if successful */
@@ -575,8 +575,8 @@ BOOL winbindd_lookup_name_by_sid(DOM_SID *sid, fstring name,
BOOL winbindd_lookup_userinfo(struct winbindd_domain *domain,
uint32 user_rid, SAM_USERINFO_CTR *user_info)
{
- return get_samr_query_userinfo(&domain->sam_dom_handle, 0x15,
- user_rid, user_info);
+ return wb_get_samr_query_userinfo(&domain->sam_dom_handle, 0x15,
+ user_rid, user_info);
}
/* Lookup groups a user is a member of. I wish Unix had a call like this! */
@@ -588,9 +588,9 @@ BOOL winbindd_lookup_usergroups(struct winbindd_domain *domain,
POLICY_HND user_pol;
BOOL result;
- if (!samr_open_user(&domain->sam_dom_handle,
- SEC_RIGHTS_MAXIMUM_ALLOWED,
- user_rid, &user_pol)) {
+ if (!wb_samr_open_user(&domain->sam_dom_handle,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ user_rid, &user_pol)) {
return False;
}
@@ -616,8 +616,8 @@ done:
BOOL winbindd_lookup_groupinfo(struct winbindd_domain *domain,
uint32 group_rid, GROUP_INFO_CTR *info)
{
- return get_samr_query_groupinfo(&domain->sam_dom_handle, 1,
- group_rid, info);
+ return wb_get_samr_query_groupinfo(&domain->sam_dom_handle, 1,
+ group_rid, info);
}
/* Lookup group membership given a rid */
@@ -627,8 +627,8 @@ BOOL winbindd_lookup_groupmem(struct winbindd_domain *domain,
uint32 **rid_mem, char ***names,
enum SID_NAME_USE **name_types)
{
- return sam_query_groupmem(&domain->sam_dom_handle, group_rid,
- num_names, rid_mem, names, name_types);
+ return wb_sam_query_groupmem(&domain->sam_dom_handle, group_rid,
+ num_names, rid_mem, names, name_types);
}
/* Globals for domain list stuff */
@@ -849,7 +849,7 @@ uint32 domain_sequence_number(char *domain_name)
domain = find_domain_from_name(domain_name);
if (!domain) return DOM_SEQUENCE_NONE;
- if (!samr_query_dom_info(&domain->sam_dom_handle, 2, &ctr)) {
+ if (!wb_samr_query_dom_info(&domain->sam_dom_handle, 2, &ctr)) {
/* If this fails, something bad has gone wrong */
@@ -875,8 +875,8 @@ uint32 winbindd_query_dispinfo(struct winbindd_domain *domain,
{
uint32 status;
- status = samr_query_dispinfo(&domain->sam_dom_handle, start_ndx,
- info_level, num_entries, ctr);
+ status = wb_samr_query_dispinfo(&domain->sam_dom_handle, start_ndx,
+ info_level, num_entries, ctr);
return status;
}