1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

winbind: Rename winbindd_cm_conn->netlogon_creds to _ctx

We have too many variables called _creds :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Aug 30 22:44:45 CEST 2017 on sn-devel-144
This commit is contained in:
Volker Lendecke 2017-08-25 13:26:08 +02:00
parent ef3b31ab09
commit cc639765ff
5 changed files with 22 additions and 22 deletions

View File

@ -101,7 +101,7 @@ struct winbindd_cm_conn {
struct policy_handle lsa_policy;
struct rpc_pipe_client *netlogon_pipe;
struct netlogon_creds_cli_context *netlogon_creds;
struct netlogon_creds_cli_context *netlogon_creds_ctx;
uint32_t netlogon_flags;
bool netlogon_force_reauth;
};

View File

@ -2038,7 +2038,7 @@ void invalidate_cm_connection(struct winbindd_domain *domain)
conn->auth_level = DCERPC_AUTH_LEVEL_PRIVACY;
conn->netlogon_force_reauth = false;
conn->netlogon_flags = 0;
TALLOC_FREE(conn->netlogon_creds);
TALLOC_FREE(conn->netlogon_creds_ctx);
if (conn->cli) {
cli_shutdown(conn->cli);
@ -2617,11 +2617,11 @@ static NTSTATUS cm_get_schannel_creds(struct winbindd_domain *domain,
return NT_STATUS_TRUSTED_DOMAIN_FAILURE;
}
if (domain->conn.netlogon_creds != NULL) {
if (domain->conn.netlogon_creds_ctx != NULL) {
if (!(domain->conn.netlogon_flags & NETLOGON_NEG_AUTHENTICATED_RPC)) {
return NT_STATUS_TRUSTED_DOMAIN_FAILURE;
}
*ppdc = domain->conn.netlogon_creds;
*ppdc = domain->conn.netlogon_creds_ctx;
return NT_STATUS_OK;
}
@ -2630,7 +2630,7 @@ static NTSTATUS cm_get_schannel_creds(struct winbindd_domain *domain,
return result;
}
if (domain->conn.netlogon_creds == NULL) {
if (domain->conn.netlogon_creds_ctx == NULL) {
return NT_STATUS_TRUSTED_DOMAIN_FAILURE;
}
@ -2638,7 +2638,7 @@ static NTSTATUS cm_get_schannel_creds(struct winbindd_domain *domain,
return NT_STATUS_TRUSTED_DOMAIN_FAILURE;
}
*ppdc = domain->conn.netlogon_creds;
*ppdc = domain->conn.netlogon_creds_ctx;
return NT_STATUS_OK;
}
@ -3236,7 +3236,7 @@ static NTSTATUS cm_connect_netlogon_transport(struct winbindd_domain *domain,
TALLOC_FREE(conn->netlogon_pipe);
conn->netlogon_flags = 0;
TALLOC_FREE(conn->netlogon_creds);
TALLOC_FREE(conn->netlogon_creds_ctx);
result = get_trust_credentials(domain, talloc_tos(), true, &creds);
if (!NT_STATUS_IS_OK(result)) {
@ -3281,7 +3281,7 @@ static NTSTATUS cm_connect_netlogon_transport(struct winbindd_domain *domain,
domain->dcname,
msg_ctx,
domain,
&conn->netlogon_creds);
&conn->netlogon_creds_ctx);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(1, ("rpccli_create_netlogon_creds failed for %s, "
"unable to create NETLOGON credentials: %s\n",
@ -3290,7 +3290,7 @@ static NTSTATUS cm_connect_netlogon_transport(struct winbindd_domain *domain,
}
result = rpccli_setup_netlogon_creds_with_creds(conn->cli, transport,
conn->netlogon_creds,
conn->netlogon_creds_ctx,
conn->netlogon_force_reauth,
creds);
conn->netlogon_force_reauth = false;
@ -3301,7 +3301,7 @@ static NTSTATUS cm_connect_netlogon_transport(struct winbindd_domain *domain,
return result;
}
result = netlogon_creds_cli_get(conn->netlogon_creds,
result = netlogon_creds_cli_get(conn->netlogon_creds_ctx,
talloc_tos(),
&netlogon_creds);
if (!NT_STATUS_IS_OK(result)) {
@ -3345,7 +3345,7 @@ static NTSTATUS cm_connect_netlogon_transport(struct winbindd_domain *domain,
result = cli_rpc_pipe_open_schannel_with_creds(
conn->cli, &ndr_table_netlogon, transport,
creds,
conn->netlogon_creds,
conn->netlogon_creds_ctx,
&conn->netlogon_pipe);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(3, ("Could not open schannel'ed NETLOGON pipe. Error "

View File

@ -1091,7 +1091,7 @@ static void machine_password_change_handler(struct tevent_context *ctx,
return;
}
result = trust_pw_change(child->domain->conn.netlogon_creds,
result = trust_pw_change(child->domain->conn.netlogon_creds_ctx,
msg_ctx,
netlogon_pipe->binding_handle,
child->domain->name,

View File

@ -730,7 +730,7 @@ NTSTATUS _wbint_ChangeMachineAccount(struct pipes_struct *p,
goto done;
}
status = trust_pw_change(domain->conn.netlogon_creds,
status = trust_pw_change(domain->conn.netlogon_creds_ctx,
msg_ctx,
netlogon_pipe->binding_handle,
domain->name,
@ -839,7 +839,7 @@ NTSTATUS _winbind_DsrUpdateReadOnlyServerDnsRecords(struct pipes_struct *p,
goto done;
}
status = netlogon_creds_cli_DsrUpdateReadOnlyServerDnsRecords(domain->conn.netlogon_creds,
status = netlogon_creds_cli_DsrUpdateReadOnlyServerDnsRecords(domain->conn.netlogon_creds_ctx,
netlogon_pipe->binding_handle,
r->in.site_name,
r->in.dns_ttl,
@ -1192,7 +1192,7 @@ reconnect:
}
if (fetch_fti) {
status = netlogon_creds_cli_GetForestTrustInformation(domain->conn.netlogon_creds,
status = netlogon_creds_cli_GetForestTrustInformation(domain->conn.netlogon_creds_ctx,
b, frame,
&new_fti);
if (NT_STATUS_EQUAL(status, NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE)) {
@ -1254,7 +1254,7 @@ reconnect:
}
}
status = netlogon_creds_cli_ServerGetTrustInfo(domain->conn.netlogon_creds,
status = netlogon_creds_cli_ServerGetTrustInfo(domain->conn.netlogon_creds_ctx,
b, frame,
&new_owf_password,
&old_owf_password,
@ -1415,7 +1415,7 @@ reconnect:
}
TALLOC_FREE(cur_nt_hash);
status = trust_pw_change(domain->conn.netlogon_creds,
status = trust_pw_change(domain->conn.netlogon_creds_ctx,
msg_ctx, b, domain->name,
domain->dcname,
true); /* force */
@ -1610,7 +1610,7 @@ reconnect:
}
b = netlogon_pipe->binding_handle;
status = netlogon_creds_cli_GetForestTrustInformation(domain->conn.netlogon_creds,
status = netlogon_creds_cli_GetForestTrustInformation(domain->conn.netlogon_creds_ctx,
b, p->mem_ctx,
&new_fti);
if (!NT_STATUS_IS_OK(status)) {
@ -1722,7 +1722,7 @@ NTSTATUS _winbind_SendToSam(struct pipes_struct *p, struct winbind_SendToSam *r)
return status;
}
status = netlogon_creds_cli_SendToSam(domain->conn.netlogon_creds,
status = netlogon_creds_cli_SendToSam(domain->conn.netlogon_creds_ctx,
netlogon_pipe->binding_handle,
&r->in.message);

View File

@ -1438,12 +1438,12 @@ static NTSTATUS winbind_samlogon_retry_loop(struct winbindd_domain *domain,
return result;
}
netr_attempts = 0;
if (domain->conn.netlogon_creds == NULL) {
if (domain->conn.netlogon_creds_ctx == NULL) {
DBG_NOTICE("No security credentials available for "
"domain [%s]\n", domainname);
result = NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
} else if (interactive) {
result = rpccli_netlogon_password_logon(domain->conn.netlogon_creds,
result = rpccli_netlogon_password_logon(domain->conn.netlogon_creds_ctx,
netlogon_pipe->binding_handle,
mem_ctx,
logon_parameters,
@ -1456,7 +1456,7 @@ static NTSTATUS winbind_samlogon_retry_loop(struct winbindd_domain *domain,
flags,
info3);
} else {
result = rpccli_netlogon_network_logon(domain->conn.netlogon_creds,
result = rpccli_netlogon_network_logon(domain->conn.netlogon_creds_ctx,
netlogon_pipe->binding_handle,
mem_ctx,
logon_parameters,