mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
sdb: Do not create kmod information if we return early
In case of a wrong realm in a cross forest trust we return early with just the realm corrected. We need to parse a kdb entry but do not have all information available. So skip creating the kmod. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
parent
00267c9565
commit
7a1fd661b0
@ -272,12 +272,19 @@ static int sdb_entry_ex_to_krb5_db_entry(krb5_context context,
|
||||
/* fail_auth_count */
|
||||
/* n_tl_data */
|
||||
|
||||
ret = sdb_event_to_kmod(context,
|
||||
s->modified_by ? s->modified_by : &s->created_by,
|
||||
k);
|
||||
if (ret) {
|
||||
free_krb5_db_entry(context, k);
|
||||
return ret;
|
||||
/*
|
||||
* If we leave early when looking up the realm, we do not have all
|
||||
* information about a principal. We need to construct a db entry
|
||||
* with minimal information, so skip this part.
|
||||
*/
|
||||
if (s->created_by.time != 0) {
|
||||
ret = sdb_event_to_kmod(context,
|
||||
s->modified_by ? s->modified_by : &s->created_by,
|
||||
k);
|
||||
if (ret) {
|
||||
free_krb5_db_entry(context, k);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
/* FIXME: TODO HDB Extensions */
|
||||
|
Loading…
x
Reference in New Issue
Block a user