]> git.samba.org - kai/samba.git/blobdiff - source/groupdb/mapping_tdb.c
Convert dbwrap_trans_store to NTSTATUS
[kai/samba.git] / source / groupdb / mapping_tdb.c
index e2aa06c8ffd022b803433cef30ac1fbd8fb17ab4..718804b1e5731dc6e6d2d5b89ce4c4fc044af7e0 100644 (file)
@@ -123,7 +123,7 @@ static bool add_mapping_entry(GROUP_MAP *map, int flag)
 {
        char *key, *buf;
        int len;
-       int res;
+       NTSTATUS status;
 
        key = group_mapping_key(talloc_tos(), &map->sid);
        if (key == NULL) {
@@ -141,13 +141,13 @@ static bool add_mapping_entry(GROUP_MAP *map, int flag)
        len = tdb_pack((uint8 *)buf, len, "ddff", map->gid,
                       map->sid_name_use, map->nt_name, map->comment);
 
-       res = dbwrap_trans_store(
+       status = dbwrap_trans_store(
                db, string_term_tdb_data(key),
                make_tdb_data((uint8_t *)buf, len), flag);
 
        TALLOC_FREE(key);
 
-       return (res == 0);
+       return NT_STATUS_IS_OK(status);
 }