mirror of
https://github.com/samba-team/samba.git
synced 2025-03-05 20:58:40 +03:00
auth:credentials: avoid talloc_reference in cli_credentials_set_netlogon_creds()
Typically cli_credentials_set_netlogon_creds() should be used directly before the DCERPC bind. And cli_credentials_get_netlogon_creds() should be only used by the gensec layer, which only needs a copy. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Oct 16 23:56:01 CEST 2013 on sn-devel-104
This commit is contained in:
parent
a62927ef88
commit
556f66bd56
@ -836,7 +836,11 @@ _PUBLIC_ void cli_credentials_guess(struct cli_credentials *cred,
|
||||
_PUBLIC_ void cli_credentials_set_netlogon_creds(struct cli_credentials *cred,
|
||||
struct netlogon_creds_CredentialState *netlogon_creds)
|
||||
{
|
||||
cred->netlogon_creds = talloc_reference(cred, netlogon_creds);
|
||||
TALLOC_FREE(cred->netlogon_creds);
|
||||
if (netlogon_creds == NULL) {
|
||||
return;
|
||||
}
|
||||
cred->netlogon_creds = netlogon_creds_copy(cred, netlogon_creds);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user