s3:idmap_tdb2: remove special treatment of NULL sid from idmap_tdb2_sids_to_unixids
authorMichael Adam <obnox@samba.org>
Tue, 22 Jun 2010 12:48:07 +0000 (14:48 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 23 Jun 2010 09:23:28 +0000 (11:23 +0200)
allocate_id has now been (re)added to the idmap methods.

source3/winbindd/idmap_tdb2.c

index 088a421882a45da24f88fa60e524b3ebf849a8ec..74a5030f4a9c43b30b41a0b135e64184a0a058cc 100644 (file)
@@ -832,25 +832,9 @@ static NTSTATUS idmap_tdb2_sids_to_unixids_action(struct db_context *db,
                if ((state->ids[i]->status == ID_UNMAPPED) &&
                    state->allocate_unmapped)
                {
-                       if (state->ids[i]->sid != NULL) {
-                               ret = idmap_tdb2_new_mapping(state->dom,
-                                                            state->ids[i]);
-                               if (!NT_STATUS_IS_OK(ret)) {
-                                       goto done;
-                               }
-                       } else {
-                               /*
-                                *  Special treatment to only allocate an ID.
-                                *  (No mapping is stored.)
-                                */
-                               ret = idmap_tdb2_get_new_id(state->dom,
-                                                       &state->ids[i]->xid);
-                               if (!NT_STATUS_IS_OK(ret)) {
-                                       DEBUG(3, ("Could not allocate id: "
-                                                 "%s\n", nt_errstr(ret)));
-                                       goto done;
-                               }
-                               state->ids[i]->status = ID_MAPPED;
+                       ret = idmap_tdb2_new_mapping(state->dom, state->ids[i]);
+                       if (!NT_STATUS_IS_OK(ret)) {
+                               goto done;
                        }
                }
        }