summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_acl_tdb.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-07-02 09:27:44 -0700
committerTim Prouty <tprouty@samba.org>2009-07-06 15:38:36 -0700
commit258952aa85f2a68e2d2362522f6114c6a439f1e3 (patch)
tree696d8f4425cb6d82c95c0923ba1b0405d39a1f5e /source3/modules/vfs_acl_tdb.c
parent133e915a81510f543f6458f377857d4f1b680970 (diff)
downloadsamba-258952aa85f2a68e2d2362522f6114c6a439f1e3.tar.gz
samba-258952aa85f2a68e2d2362522f6114c6a439f1e3.tar.bz2
samba-258952aa85f2a68e2d2362522f6114c6a439f1e3.zip
s3: Plumb smb_filename through SMB_VFS_UNLINK
Diffstat (limited to 'source3/modules/vfs_acl_tdb.c')
-rw-r--r--source3/modules/vfs_acl_tdb.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index 9f0b0b317a..64ad3e1a78 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -616,32 +616,41 @@ static int open_acl_tdb(vfs_handle_struct *handle,
On unlink we need to delete the tdb record (if using tdb).
*********************************************************************/
-static int unlink_acl_tdb(vfs_handle_struct *handle, const char *path)
+static int unlink_acl_tdb(vfs_handle_struct *handle,
+ const struct smb_filename *smb_fname)
{
- SMB_STRUCT_STAT sbuf;
+ struct smb_filename *smb_fname_tmp = NULL;
struct db_context *db;
+ NTSTATUS status;
int ret = -1;
SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);
+ status = copy_smb_filename(talloc_tos(), smb_fname, &smb_fname_tmp);
+ if (!NT_STATUS_IS_OK(status)) {
+ errno = map_errno_from_nt_status(status);
+ goto out;
+ }
+
if (lp_posix_pathnames()) {
- ret = vfs_lstat_smb_fname(handle->conn, path, &sbuf);
+ ret = SMB_VFS_LSTAT(handle->conn, smb_fname_tmp);
} else {
- ret = vfs_stat_smb_fname(handle->conn, path, &sbuf);
+ ret = SMB_VFS_STAT(handle->conn, smb_fname_tmp);
}
if (ret == -1) {
- return -1;
+ goto out;
}
- ret = SMB_VFS_NEXT_UNLINK(handle, path);
+ ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname_tmp);
if (ret == -1) {
- return -1;
+ goto out;
}
- acl_tdb_delete(handle, db, &sbuf);
- return 0;
+ acl_tdb_delete(handle, db, &smb_fname_tmp->st);
+ out:
+ return ret;
}
/*********************************************************************