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>
(cherry picked from commit
45eea321a6faa6db1c9c706a27527cc0766dc831)
return ret;
}
- if (realm && salting_principal) {
+ if (realm != NULL) {
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);