mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3-pdb_ldap: fix crash bug in ldapsam_set_trusteddom_pw().
Thanks Volker for the hint. Guenther
This commit is contained in:
parent
205284c904
commit
d168d7fe3c
@ -6013,8 +6013,6 @@ static bool ldapsam_set_trusteddom_pw(struct pdb_methods *methods,
|
||||
smbldap_make_mod(priv2ld(ldap_state), entry, &mods,
|
||||
"sambaClearTextPassword", pwd);
|
||||
|
||||
talloc_autofree_ldapmod(talloc_tos(), mods);
|
||||
|
||||
if (entry != NULL) {
|
||||
prev_pwd = smbldap_talloc_single_attribute(priv2ld(ldap_state),
|
||||
entry, "sambaClearTextPassword", talloc_tos());
|
||||
@ -6025,6 +6023,8 @@ static bool ldapsam_set_trusteddom_pw(struct pdb_methods *methods,
|
||||
}
|
||||
}
|
||||
|
||||
talloc_autofree_ldapmod(talloc_tos(), mods);
|
||||
|
||||
trusted_dn = trusteddom_dn(ldap_state, domain);
|
||||
if (trusted_dn == NULL) {
|
||||
return False;
|
||||
|
Loading…
Reference in New Issue
Block a user