s3:vfs: convert nfs4_acls sidmap db code to use dbwrap_wrapper functions
authorMichael Adam <obnox@samba.org>
Wed, 24 Aug 2011 13:36:31 +0000 (15:36 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 11 Oct 2011 12:17:57 +0000 (14:17 +0200)
Avoid direct use of the db_record and db_context structs.

source3/modules/nfs4_acls.c

index 05bad5d30e6ba06d9b69d07aed4a56bd12d7964b..b4715af2ed450aefab6efc4895c72bbfba0b8b8d 100644 (file)
@@ -576,6 +576,7 @@ static bool nfs4_map_sid(smbacl4_vfs_params *params, const struct dom_sid *src,
 {
        static struct db_context *mapping_db = NULL;
        TDB_DATA data;
+       NTSTATUS status;
 
        if (mapping_db == NULL) {
                const char *dbname = lp_parm_const_string(
@@ -599,9 +600,10 @@ static bool nfs4_map_sid(smbacl4_vfs_params *params, const struct dom_sid *src,
                }
        }
 
-       if (mapping_db->fetch(mapping_db, NULL,
+       status = dbwrap_fetch(mapping_db, NULL,
                              string_term_tdb_data(sid_string_tos(src)),
-                             &data) != 0) {
+                             &data);
+       if (!NT_STATUS_IS_OK(status)) {
                DEBUG(10, ("could not find mapping for SID %s\n",
                           sid_string_dbg(src)));
                return False;