summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_acl_tdb.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-08-24 15:40:09 +0200
committerMichael Adam <obnox@samba.org>2011-10-11 14:17:57 +0200
commit4bfda2d3feca228d83f3dde0f08d66bd4dfe27aa (patch)
tree50c49f089ce69f17c57595079f95bc873d901bed /source3/modules/vfs_acl_tdb.c
parent4cb75bdbb1b2e9c40a31992e1ac23125098b2d42 (diff)
downloadsamba-4bfda2d3feca228d83f3dde0f08d66bd4dfe27aa.tar.gz
samba-4bfda2d3feca228d83f3dde0f08d66bd4dfe27aa.tar.bz2
samba-4bfda2d3feca228d83f3dde0f08d66bd4dfe27aa.zip
s3:vfs: convert the acl_tdb module to use dbwrap wrapper functions.
Avoid direct use of the db_record and db_context structs.
Diffstat (limited to 'source3/modules/vfs_acl_tdb.c')
-rw-r--r--source3/modules/vfs_acl_tdb.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index 9bc1dc419b..778e837be7 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -102,10 +102,10 @@ static struct db_record *acl_tdb_lock(TALLOC_CTX *mem_ctx,
/* For backwards compatibility only store the dev/inode. */
push_file_id_16((char *)id_buf, id);
- return db->fetch_locked(db,
- mem_ctx,
- make_tdb_data(id_buf,
- sizeof(id_buf)));
+ return dbwrap_fetch_locked(db,
+ mem_ctx,
+ make_tdb_data(id_buf,
+ sizeof(id_buf)));
}
/*******************************************************************
@@ -130,7 +130,7 @@ static NTSTATUS acl_tdb_delete(vfs_handle_struct *handle,
return NT_STATUS_OK;
}
- status = rec->delete_rec(rec);
+ status = dbwrap_record_delete(rec);
TALLOC_FREE(rec);
return status;
}
@@ -173,10 +173,11 @@ static NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
/* For backwards compatibility only store the dev/inode. */
push_file_id_16((char *)id_buf, &id);
- if (db->fetch(db,
- ctx,
- make_tdb_data(id_buf, sizeof(id_buf)),
- &data) != 0) {
+ status = dbwrap_fetch(db,
+ ctx,
+ make_tdb_data(id_buf, sizeof(id_buf)),
+ &data);
+ if (!NT_STATUS_IS_OK(status)) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
@@ -219,16 +220,16 @@ static NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle,
/* For backwards compatibility only store the dev/inode. */
push_file_id_16((char *)id_buf, &id);
- rec = db->fetch_locked(db, talloc_tos(),
- make_tdb_data(id_buf,
- sizeof(id_buf)));
+ rec = dbwrap_fetch_locked(db, talloc_tos(),
+ make_tdb_data(id_buf,
+ sizeof(id_buf)));
if (rec == NULL) {
DEBUG(0, ("store_acl_blob_fsp_tdb: fetch_lock failed\n"));
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
data.dptr = pblob->data;
data.dsize = pblob->length;
- return rec->store(rec, data, 0);
+ return dbwrap_record_store(rec, data, 0);
}
/*********************************************************************