diff options
author | Gerald Carter <jerry@samba.org> | 2005-09-30 17:13:37 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:04:48 -0500 |
commit | 54abd2aa66069e6baf7769c496f46d9dba18db39 (patch) | |
tree | 9cf8e88168011797319ba9e9866749201b1eac1e /source3/nsswitch/winbindd_misc.c | |
parent | 4a2cc231d22a82ed21771a72508f15d21ed63227 (diff) | |
download | samba-54abd2aa66069e6baf7769c496f46d9dba18db39.tar.gz samba-54abd2aa66069e6baf7769c496f46d9dba18db39.tar.bz2 samba-54abd2aa66069e6baf7769c496f46d9dba18db39.zip |
r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
Diffstat (limited to 'source3/nsswitch/winbindd_misc.c')
-rw-r--r-- | source3/nsswitch/winbindd_misc.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/source3/nsswitch/winbindd_misc.c b/source3/nsswitch/winbindd_misc.c index 6f72a0e2c6..83c4c0f6ee 100644 --- a/source3/nsswitch/winbindd_misc.c +++ b/source3/nsswitch/winbindd_misc.c @@ -58,12 +58,8 @@ enum winbindd_result winbindd_dual_check_machine_acct(struct winbindd_domain *do invalidate_cm_connection(&contact_domain->conn); { - struct rpc_pipe_client *cli; - unsigned char *session_key; - DOM_CRED *creds; - - result = cm_connect_netlogon(contact_domain, state->mem_ctx, - &cli, &session_key, &creds); + struct rpc_pipe_client *netlogon_pipe; + result = cm_connect_netlogon(contact_domain, &netlogon_pipe); } if (!NT_STATUS_IS_OK(result)) { @@ -169,7 +165,7 @@ enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain, { fstring dcname_slash; char *p; - struct rpc_pipe_client *cli; + struct rpc_pipe_client *netlogon_pipe; NTSTATUS result; state->request.domain_name @@ -178,21 +174,14 @@ enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain, DEBUG(3, ("[%5lu]: Get DC name for %s\n", (unsigned long)state->pid, state->request.domain_name)); - { - /* These var's can be ignored -- we're not requesting - anything in the credential chain here */ - unsigned char *session_key; - DOM_CRED *creds; - result = cm_connect_netlogon(domain, state->mem_ctx, &cli, - &session_key, &creds); - } + result = cm_connect_netlogon(domain, &netlogon_pipe); if (!NT_STATUS_IS_OK(result)) { DEBUG(1, ("Can't contact our the NETLOGON pipe\n")); return WINBINDD_ERROR; } - result = rpccli_netlogon_getdcname(cli, state->mem_ctx, domain->dcname, + result = rpccli_netlogon_getdcname(netlogon_pipe, state->mem_ctx, domain->dcname, state->request.domain_name, dcname_slash); @@ -202,11 +191,14 @@ enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain, } p = dcname_slash; - if (*p == '\\') p+=1; - if (*p == '\\') p+=1; + if (*p == '\\') { + p+=1; + } + if (*p == '\\') { + p+=1; + } fstrcpy(state->response.data.dc_name, p); - return WINBINDD_OK; } |