1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

idmap_autorid: allocate new domain range if the callers knows the sid is valid

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12613

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar  8 04:06:59 CET 2017 on sn-devel-144
This commit is contained in:
Stefan Metzmacher 2017-03-06 11:53:09 +00:00 committed by Jeremy Allison
parent 0c212c50b5
commit e015748657

View File

@ -635,6 +635,19 @@ static NTSTATUS idmap_autorid_sid_to_id(struct idmap_tdb_common_context *common,
}
}
/*
* If the caller already did a lookup sid and made sure the
* domain sid is valid, we can allocate a new range.
*
* Currently the winbindd parent already does a lookup sids
* first, but hopefully changes in future. If the
* caller knows the domain sid, ID_TYPE_BOTH should be
* passed instead of ID_TYPE_NOT_SPECIFIED.
*/
if (map->xid.type != ID_TYPE_NOT_SPECIFIED) {
goto allocate;
}
/*
* Check of last resort: A domain is valid if a user from that
* domain has recently logged in. The samlogon_cache these