s3: vfs: vfs_acl_tdb. Remove use of vfs_stat_smb_basename().
authorJeremy Allison <jra@samba.org>
Sat, 19 Mar 2016 05:15:12 +0000 (22:15 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 24 Mar 2016 21:57:17 +0000 (22:57 +0100)
We only need a basic STAT here.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/modules/vfs_acl_tdb.c

index eee4d89..e2d0cb8 100644 (file)
@@ -341,11 +341,13 @@ static int sys_acl_set_file_tdb(vfs_handle_struct *handle,
                               SMB_ACL_TYPE_T type,
                               SMB_ACL_T theacl)
 {
-       SMB_STRUCT_STAT sbuf;
        struct db_context *db = acl_db;
        int ret = -1;
+       struct smb_filename smb_fname = {
+               .base_name = discard_const_p(char, path)
+       };
 
-       ret = vfs_stat_smb_basename(handle->conn, path, &sbuf);
+       ret = SMB_VFS_STAT(handle->conn, &smb_fname);
        if (ret == -1) {
                return -1;
        }
@@ -358,7 +360,7 @@ static int sys_acl_set_file_tdb(vfs_handle_struct *handle,
                return -1;
        }
 
-       acl_tdb_delete(handle, db, &sbuf);
+       acl_tdb_delete(handle, db, &smb_fname.st);
        return 0;
 }