s3: VFS: Add SMB_VFS_GET_NT_ACL_AT().
[amitay/samba.git] / source3 / modules / vfs_default.c
index 0723eac1c7c67b8a69e56ca3f7a933720a09d4e9..7b153186a035dcc854dfd9d814c3c18139eb7f52 100644 (file)
@@ -3139,6 +3139,28 @@ static NTSTATUS vfswrap_get_nt_acl(vfs_handle_struct *handle,
        return result;
 }
 
+static NTSTATUS vfswrap_get_nt_acl_at(vfs_handle_struct *handle,
+                       struct files_struct *dirfsp,
+                       const struct smb_filename *smb_fname,
+                       uint32_t security_info,
+                       TALLOC_CTX *mem_ctx,
+                       struct security_descriptor **ppdesc)
+{
+       NTSTATUS result;
+
+       START_PROFILE(get_nt_acl_at);
+
+       SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
+
+       result = posix_get_nt_acl(handle->conn,
+                               smb_fname,
+                               security_info,
+                               mem_ctx,
+                               ppdesc);
+       END_PROFILE(get_nt_acl_at);
+       return result;
+}
+
 static NTSTATUS vfswrap_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, uint32_t security_info_sent, const struct security_descriptor *psd)
 {
        NTSTATUS result;
@@ -3734,6 +3756,7 @@ static struct vfs_fn_pointers vfs_default_fns = {
 
        .fget_nt_acl_fn = vfswrap_fget_nt_acl,
        .get_nt_acl_fn = vfswrap_get_nt_acl,
+       .get_nt_acl_at_fn = vfswrap_get_nt_acl_at,
        .fset_nt_acl_fn = vfswrap_fset_nt_acl,
        .audit_file_fn = vfswrap_audit_file,