1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +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:
Andrew Bartlett 2010-03-03 11:34:04 +11:00
parent 5beaef7cde
commit 18f0e24f55
2 changed files with 2 additions and 1 deletions

View File

@ -76,7 +76,7 @@ struct cli_credentials {
const char *domain;
const char *realm;
const char *principal;
const char *salt_principal;
char *salt_principal;
const char *bind_dn;

View File

@ -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)
{
talloc_free(cred->salt_principal);
cred->salt_principal = talloc_strdup(cred, principal);
}