s3:winbindd: use the new sid_check_is_for_passdb() in idmap_find_domain_with_sid()
authorMichael Adam <obnox@samba.org>
Fri, 30 Nov 2012 15:27:59 +0000 (16:27 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 3 Dec 2012 07:48:29 +0000 (08:48 +0100)
This is more correct than the original one:
It also hands the wellknown and "Unix Users" and "Unix Groups" sids to passdb
for id mapping.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/winbindd/idmap.c

index ae4fb2b246a5d76464da9499c9715b0f8e06a35f..d5eeac659cc9d39bb9c4970e2ee54a8f866de5f2 100644 (file)
@@ -24,7 +24,7 @@
 #include "includes.h"
 #include "winbindd.h"
 #include "idmap.h"
-#include "passdb/machine_sid.h"
+#include "lib/util_sid_passdb.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_IDMAP
@@ -427,11 +427,7 @@ struct idmap_domain *idmap_find_domain_with_sid(const char *domname,
 {
        idmap_init();
 
-       if (sid_check_is_in_builtin(sid) ||
-           sid_check_is_builtin(sid) ||
-           sid_check_is_in_our_sam(sid) ||
-           sid_check_is_our_sam(sid))
-       {
+       if (sid_check_is_for_passdb(sid)) {
                return idmap_passdb_domain(NULL);
        }