Revert "s:Fix uid_to_sid mapping when the idmap cache is empty."
authorVolker Lendecke <vl@samba.org>
Fri, 2 Jan 2009 13:51:23 +0000 (14:51 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 2 Jan 2009 14:00:05 +0000 (15:00 +0100)
This reverts commit 9a9b64dbdfce4414ada22d4f882c8c757b5813e1.

source3/winbindd/idmap.c

index 38cc0d0c0abdeb36df77c2249ffe5c9bd85ea824..aaba7e53eed4cef688dc2796107b1fc4dfc03fc2 100644 (file)
@@ -735,13 +735,14 @@ NTSTATUS idmap_backends_unixid_to_sid(const char *domname, struct id_map *id)
        maps[0] = id;
        maps[1] = NULL;
 
-       if (sid_check_is_in_builtin(id->sid)
-           || (sid_check_is_in_our_domain(id->sid))) {
-               dom = idmap_init_passdb_domain(NULL);
-               if (dom == NULL) {
-                       return NT_STATUS_NONE_MAPPED;
-               }
-               return dom->methods->unixids_to_sids(dom, maps);
+       /*
+        * Always give passdb a chance first
+        */
+
+       dom = idmap_init_passdb_domain(NULL);
+       if ((dom != NULL)
+           && NT_STATUS_IS_OK(dom->methods->unixids_to_sids(dom, maps))) {
+               return NT_STATUS_OK;
        }
 
        dom = idmap_find_domain(domname);