summaryrefslogtreecommitdiff
path: root/source3/modules/posixacl_xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules/posixacl_xattr.c')
-rw-r--r--source3/modules/posixacl_xattr.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/source3/modules/posixacl_xattr.c b/source3/modules/posixacl_xattr.c
index 871aa669f1a..ded16a0bfba 100644
--- a/source3/modules/posixacl_xattr.c
+++ b/source3/modules/posixacl_xattr.c
@@ -336,7 +336,7 @@ static int smb_acl_to_posixacl_xattr(SMB_ACL_T theacl, char *buf, size_t len)
}
SMB_ACL_T posixacl_xattr_acl_get_file(vfs_handle_struct *handle,
- const char *path_p,
+ const struct smb_filename *smb_fname,
SMB_ACL_TYPE_T type,
TALLOC_CTX *mem_ctx)
{
@@ -360,16 +360,18 @@ SMB_ACL_T posixacl_xattr_acl_get_file(vfs_handle_struct *handle,
return NULL;
}
- ret = SMB_VFS_GETXATTR(handle->conn, path_p, name, buf, size);
+ ret = SMB_VFS_GETXATTR(handle->conn, smb_fname->base_name,
+ name, buf, size);
if (ret < 0 && errno == ERANGE) {
- size = SMB_VFS_GETXATTR(handle->conn, path_p, name,
- NULL, 0);
+ size = SMB_VFS_GETXATTR(handle->conn, smb_fname->base_name,
+ name, NULL, 0);
if (size > 0) {
buf = alloca(size);
if (!buf) {
return NULL;
}
- ret = SMB_VFS_GETXATTR(handle->conn, path_p, name,
+ ret = SMB_VFS_GETXATTR(handle->conn,
+ smb_fname->base_name, name,
buf, size);
}
}
@@ -380,15 +382,15 @@ SMB_ACL_T posixacl_xattr_acl_get_file(vfs_handle_struct *handle,
if (ret == 0 || errno == ENOATTR || errno == ENODATA) {
mode_t mode = 0;
TALLOC_CTX *frame = talloc_stackframe();
- struct smb_filename *smb_fname =
- synthetic_smb_fname(frame, path_p, NULL, NULL, 0);
+ struct smb_filename *smb_fname_tmp =
+ cp_smb_filename_nostream(frame, smb_fname);
if (smb_fname == NULL) {
errno = ENOMEM;
ret = -1;
} else {
- ret = SMB_VFS_STAT(handle->conn, smb_fname);
+ ret = SMB_VFS_STAT(handle->conn, smb_fname_tmp);
if (ret == 0) {
- mode = smb_fname->st.st_ex_mode;
+ mode = smb_fname_tmp->st.st_ex_mode;
}
}
TALLOC_FREE(frame);