Alternative fix for 45db33e73 and 0d443ae7931
authorVolker Lendecke <vl@samba.org>
Fri, 2 Jan 2009 13:53:26 +0000 (14:53 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 2 Jan 2009 14:02:30 +0000 (15:02 +0100)
Simo is right, we need to ask passdb first. At least this fixes a nasty to find
NT_STATUS_ACCESS_DENIED problem in the build farm for the test run I just did
on host "opi".

Michael, can you re-check if this also fixes the error you found, leading to
the two fixes?

Thanks,

Volker

source/winbindd/idmap.c

index aaba7e53eed4cef688dc2796107b1fc4dfc03fc2..ca07f230ab060ebe6868bcf9df587842664f2fe5 100644 (file)
@@ -741,7 +741,8 @@ NTSTATUS idmap_backends_unixid_to_sid(const char *domname, struct id_map *id)
 
        dom = idmap_init_passdb_domain(NULL);
        if ((dom != NULL)
-           && NT_STATUS_IS_OK(dom->methods->unixids_to_sids(dom, maps))) {
+           && NT_STATUS_IS_OK(dom->methods->unixids_to_sids(dom, maps))
+           && id->status == ID_MAPPED) {
                return NT_STATUS_OK;
        }