r20216: Fix fallback code.
authorSimo Sorce <idra@samba.org>
Sat, 16 Dec 2006 18:13:12 +0000 (18:13 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:16:33 +0000 (12:16 -0500)
commitb1de1a6eabcb565cb37307df3a0cf63697ca0dce
treec323a91e0da39562e878ffede9fcb3f097bb1d24
parent55e70f69871f43328cc05104c150f76212eb369a
r20216: Fix fallback code.
A reversed check made it impossile to fallback to the Unix Domain mapping code.
Also fix a potential use of a freed array.

Jerry,
my tests shows that this code now correctly handle the fallback to Unix Domain
when our Domain member is asked for a mapped group that has a unix name different
from the Windows name against a Samba DC and we do not use winbindd but share
users/groups by other means (ldap / sync of passwd and group files)

Immediate Fix would be to discuss if we should answer back when DOMAIN\unixgroup -> SID
is asked for, in the case the unixgroup name is mapped to a different name.
IE: DOMAIN\Domain Admins -> ntadmins

Currently if we are asked for "DOMAIN\Domain Admins" we return the dom admins SID
If we are asked for "DOMAIN\ntadmins we return "not found", but we may consider to
return the Domain admins SID in this case too.

Comments are welcome on this point!

Long term fix I think is the unixinfo pipe and of course an idmap_unixinfo moudle.

Simo.
(This used to be commit 07bdbb4c215461a721f9b608bd375387b96ababb)
source3/nsswitch/idmap.c