mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
s3:secrets: let secrets_store_machine_pw_sync() delete the des_salt_key when there's no value
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12782 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
c5ded11237
commit
45eea321a6
@ -537,9 +537,16 @@ bool secrets_store_machine_pw_sync(const char *pass, const char *oldpass, const
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (realm && salting_principal) {
|
if (realm != NULL) {
|
||||||
char *key = des_salt_key(realm);
|
char *key = des_salt_key(realm);
|
||||||
ret = secrets_store(key, salting_principal, strlen(salting_principal)+1 );
|
|
||||||
|
if (salting_principal != NULL) {
|
||||||
|
ret = secrets_store(key,
|
||||||
|
salting_principal,
|
||||||
|
strlen(salting_principal)+1);
|
||||||
|
} else {
|
||||||
|
ret = secrets_delete(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TALLOC_FREE(frame);
|
TALLOC_FREE(frame);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user