mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
4168d61fb2
We now always read the Domain SID out of LDAP. If the local secrets.tdb
is ever different to LDAP, it is overwritten out of LDAP. We also
store the 'algorithmic rid base' into LDAP, and assert if it changes.
(This ensures cross-host synchronisation, and allows for possible
integration with idmap). If we fail to read/add the domain entry, we just
fallback to the old behaviour.
We always use an existing DN when adding IDMAP entries to LDAP, unless
no suitable entry is available. This means that a user's posixAccount
will have a SID added to it, or a user's sambaSamAccount will have a UID
added. Where we cannot us an existing DN, we use
'sambaSid=S-x-y-z,....' as the DN.
The code now allows modifications to the ID mapping in many cases.
Likewise, we now check more carefully when adding new user entires to LDAP,
to not duplicate SIDs (for users, at this stage), and to add the sambaSamAccount
onto the idmap entry for that user, if it is already established (ensuring
we do not duplicate sambaSid entries in the directory).
The allocated UID code has been expanded to take into account the space
between '1000 - algorithmic rid base'. This much better fits into what
an NT4 does - allocating in the bottom part of the RID range.
On the code cleanup side of things, we now share as much code as
possible between idmap_ldap and pdb_ldap.
We also no longer use the race-prone 'enumerate all users' method for
finding the next RID to allocate. Instead, we just start at the bottom
of the range, and increment again if the user already exists. The first
time this is run, it may well take a long time, but next time will just
be able to use the next Rid.
Thanks to metze and AB for double-checking parts of this.
Andrew Bartlett
(This used to be commit
|
||
---|---|---|
.. | ||
aparser | ||
auth | ||
bin | ||
client | ||
codepages | ||
groupdb | ||
include | ||
intl | ||
lib | ||
libads | ||
libsmb | ||
locking | ||
modules | ||
msdfs | ||
nmbd | ||
nsswitch | ||
pam_smbpass | ||
param | ||
passdb | ||
po | ||
popt | ||
printing | ||
profile | ||
python | ||
registry | ||
rpc_client | ||
rpc_parse | ||
rpc_server | ||
rpcclient | ||
sam | ||
script | ||
smbd | ||
smbwrapper | ||
stf | ||
tdb | ||
tests | ||
torture | ||
ubiqx | ||
utils | ||
web | ||
wrepld | ||
.cvsignore | ||
.dmallocrc | ||
aclocal.m4 | ||
autogen.sh | ||
change-log | ||
config.guess | ||
config.sub | ||
configure.developer | ||
configure.in | ||
Doxyfile | ||
dynconfig.c | ||
install-sh | ||
mainpage.dox | ||
Makefile.in | ||
smbadduser |