mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s4-kerberos Don't segfault if the password isn't specified in keytab generation
Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sun Sep 26 03:29:34 UTC 2010 on sn-devel-104
This commit is contained in:
parent
c680a42504
commit
0b5a556b76
@ -597,6 +597,13 @@ static krb5_error_code create_keytab(TALLOC_CTX *parent_ctx,
|
||||
|
||||
/* Finally, do the dance to get the password to put in the entry */
|
||||
password_s = ldb_msg_find_attr_as_string(msg, "secret", NULL);
|
||||
|
||||
if (!password_s) {
|
||||
/* There is no password here, so nothing to do */
|
||||
talloc_free(mem_ctx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (add_old && kvno != 0) {
|
||||
old_secret = ldb_msg_find_attr_as_string(msg, "priorSecret", NULL);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user