mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
s4:credentials talloc_free() any previous salt_principal
This isn't used often, but it is generally better not to leak it onto what may be a longer-term context. Andrew Bartlett
This commit is contained in:
parent
5beaef7cde
commit
18f0e24f55
@ -76,7 +76,7 @@ struct cli_credentials {
|
|||||||
const char *domain;
|
const char *domain;
|
||||||
const char *realm;
|
const char *realm;
|
||||||
const char *principal;
|
const char *principal;
|
||||||
const char *salt_principal;
|
char *salt_principal;
|
||||||
|
|
||||||
const char *bind_dn;
|
const char *bind_dn;
|
||||||
|
|
||||||
|
@ -798,6 +798,7 @@ const char *cli_credentials_get_salt_principal(struct cli_credentials *cred)
|
|||||||
|
|
||||||
_PUBLIC_ void cli_credentials_set_salt_principal(struct cli_credentials *cred, const char *principal)
|
_PUBLIC_ void cli_credentials_set_salt_principal(struct cli_credentials *cred, const char *principal)
|
||||||
{
|
{
|
||||||
|
talloc_free(cred->salt_principal);
|
||||||
cred->salt_principal = talloc_strdup(cred, principal);
|
cred->salt_principal = talloc_strdup(cred, principal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user