diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/groupdb/mapping.c | 8 | ||||
-rw-r--r-- | source3/lib/tdb_multikey.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index f688de38ed..b617e34565 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -95,10 +95,10 @@ static char **group_mapping_keys(TALLOC_CTX *mem_ctx, TDB_DATA data, return NULL; } - result[KEYNUM_SID] = talloc_strdup(mem_ctx, + result[KEYNUM_SID] = talloc_strdup(result, sid_string_static(&mapp->sid)); - result[KEYNUM_NAME] = talloc_strdup(mem_ctx, mapp->nt_name); - result[KEYNUM_GID] = talloc_asprintf(mem_ctx, "%d", (int)mapp->gid); + result[KEYNUM_NAME] = talloc_strdup(result, mapp->nt_name); + result[KEYNUM_GID] = talloc_asprintf(result, "%d", (int)mapp->gid); result[3] = NULL; if ((result[0] == NULL) || (result[1] == NULL) || @@ -109,7 +109,7 @@ static char **group_mapping_keys(TALLOC_CTX *mem_ctx, TDB_DATA data, } /* name lookups are case insensitive, store the key in upper case */ - strupper_m(result[1]); + strupper_m(result[KEYNUM_NAME]); return result; } diff --git a/source3/lib/tdb_multikey.c b/source3/lib/tdb_multikey.c index 7701845a9e..7a4c8e1d5c 100644 --- a/source3/lib/tdb_multikey.c +++ b/source3/lib/tdb_multikey.c @@ -159,7 +159,7 @@ NTSTATUS tdb_find_keyed(TALLOC_CTX *ctx, struct tdb_context *tdb, if (data.dptr == NULL) { DEBUG(1, ("Did not find record %s for key %s\n", prim.dptr, key.dptr)); - status = NT_STATUS_INTERNAL_DB_CORRUPTION; + status = NT_STATUS_NOT_FOUND; goto fail; } |