diff options
author | Volker Lendecke <vl@samba.org> | 2019-11-13 16:02:11 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-11-14 22:26:30 +0000 |
commit | 0c2a706a11c0ac89476c07f7d7d2554ffd7c342b (patch) | |
tree | 2e1ed4e11ea9998b595396f19911d76664ef17bd | |
parent | 5852bb96584afab61cf2635aa25033fd5b9f3a15 (diff) | |
download | samba-0c2a706a11c0ac89476c07f7d7d2554ffd7c342b.tar.gz |
vfs: Use dbwrap_store() in store_acl_blob_fsp()
Use the wrapper function that's already available for exactly this
purpose.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | source3/modules/vfs_acl_tdb.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c index c1e9a757917..51eaeda0b75 100644 --- a/source3/modules/vfs_acl_tdb.c +++ b/source3/modules/vfs_acl_tdb.c @@ -206,7 +206,6 @@ static NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle, struct file_id id; TDB_DATA data = { .dptr = pblob->data, .dsize = pblob->length }; struct db_context *db = acl_db; - struct db_record *rec; NTSTATUS status; DEBUG(10,("store_acl_blob_fsp: storing blob length %u on file %s\n", @@ -221,14 +220,10 @@ 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 = 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; - } - return dbwrap_record_store(rec, data, 0); + + status = dbwrap_store( + db, make_tdb_data(id_buf, sizeof(id_buf)), data, 0); + return status; } /********************************************************************* |