idmap_tdb: If one SID fails to map, try the rest
authorVolker Lendecke <vl@samba.org>
Tue, 18 Dec 2018 14:53:21 +0000 (15:53 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 8 Jan 2019 08:32:10 +0000 (09:32 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/winbindd/idmap_tdb_common.c

index e130be0..34269e3 100644 (file)
@@ -577,8 +577,11 @@ static NTSTATUS idmap_tdb_common_sids_to_unixids_action(struct db_context *db,
                        ret =
                            idmap_tdb_common_new_mapping(state->dom,
                                                         state->ids[i]);
+                       DBG_DEBUG("idmap_tdb_common_new_mapping returned %s\n",
+                                 nt_errstr(ret));
                        if (!NT_STATUS_IS_OK(ret)) {
-                               goto done;
+                               ret = STATUS_SOME_UNMAPPED;
+                               continue;
                        }
                        num_mapped += 1;
                }