r21918: Reverting this change as it is now causing aborts() in
authorGerald Carter <jerry@samba.org>
Wed, 21 Mar 2007 21:08:15 +0000 (21:08 +0000)
committerGerald Carter <jerry@samba.org>
Wed, 21 Mar 2007 21:08:15 +0000 (21:08 +0000)
find_builtin_domain().    This all needs more testing
before anyone starts changing these lookup routines again.

source/nsswitch/winbindd_util.c

index cbd76754bbdd18be3b3cb175e7c517aa2a155ec8..72c85a9c6a4d3d666f73767a9a902c4333ae8f3f 100644 (file)
@@ -603,13 +603,8 @@ struct winbindd_domain *find_domain_from_sid_noinit(const DOM_SID *sid)
        /* Search through list */
 
        for (domain = domain_list(); domain != NULL; domain = domain->next) {
-               /* We need to use sid_peek_check_rid, because we want 
-                * to make sure that the SIDs we send to the backends are
-                * as specific as possible.
-                */
-               if (sid_peek_check_rid(&domain->sid, sid, &discard)) {
+               if (sid_compare_domain(sid, &domain->sid) == 0)
                        return domain;
-               }
        }
 
        /* Not found */