idmap: don't generally forbid id==0 from idmap_unix_id_is_in_range()
authorMichael Adam <obnox@samba.org>
Mon, 15 Aug 2016 21:07:33 +0000 (23:07 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 16 Aug 2016 19:27:22 +0000 (21:27 +0200)
commitc21976d4b1c604699299f2c0f768c1add93b349d
tree0d60385c87c002f00e4e1448d293f6f3e53630b6
parent5066a6db4b53d9ab8986a36489328a4e9f7f92e7
idmap: don't generally forbid id==0 from idmap_unix_id_is_in_range()

If the range allows it, then id==0 should not be forbidden.
This seems to have been taken in from idmap_ldap when the
function was originally created.

See 634cd2e0451d4388c3e3f78239495cf595368b15 .
The other backends don't seem to have had that
extra check for id == 0.

The reasoning for this change is that the range check should
apply to all cases. If the range includes the 0, then it
should be possible to get it as result. In particular,
this way, the function becomes applicable also to the
passdb backend case, e.g. in a samba4-ad-dc setup where
the Admin gets uid == 0.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/idmap_util.c