From b2ed2d814b44f766158ed1891173e8cd561b0e7e Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 2 Oct 2013 00:39:07 +0200 Subject: idmap_autorid: allow iterate functions to operate on all domain ranges by allowing handed in domsid to be NULL Signed-off-by: Michael Adam Reviewed-by: Volker Lendecke --- source3/winbindd/idmap_autorid_tdb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source3/winbindd') diff --git a/source3/winbindd/idmap_autorid_tdb.c b/source3/winbindd/idmap_autorid_tdb.c index fa33f6fb37..bbfa5b04b6 100644 --- a/source3/winbindd/idmap_autorid_tdb.c +++ b/source3/winbindd/idmap_autorid_tdb.c @@ -955,7 +955,7 @@ static int idmap_autorid_visit_domain_range(struct db_record *rec, goto done; } - if (strcmp(domsid, vi->domsid) != 0) { + if ((vi->domsid != NULL) && (strcmp(domsid, vi->domsid) != 0)) { DEBUG(10, ("key sid '%s' does not match requested sid '%s'.\n", domsid, vi->domsid)); goto done; @@ -998,9 +998,7 @@ static NTSTATUS idmap_autorid_iterate_domain_ranges_int(struct db_context *db, TALLOC_CTX *frame = talloc_stackframe(); if (domsid == NULL) { - DEBUG(1, ("Error: no domain sid provided\n")); - status = NT_STATUS_INVALID_PARAMETER; - goto done; + DEBUG(10, ("No sid provided, operating on all ranges\n")); } if (fn == NULL) { -- cgit