diff options
author | Jeremy Allison <jra@samba.org> | 2017-05-23 17:11:18 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-05-31 22:50:22 +0200 |
commit | cea8e57eac2ed7b90a5c5d207bf392ff0546398e (patch) | |
tree | 39c914e82dc601b027f7f97c5f877f30a37d15f2 /source3/modules/vfs_unityed_media.c | |
parent | 85c8780581e0f2bb0fdb940a865857db68111fbd (diff) | |
download | samba-cea8e57eac2ed7b90a5c5d207bf392ff0546398e.tar.gz |
s3: VFS: Change SMB_VFS_SYS_ACL_GET_FILE to use const struct smb_filename * instead of const char *.
We need to migrate all pathname based VFS calls to use a struct
to finish modernising the VFS with extra timestamp and flags parameters.
Requires a few extra cleanups in calling code.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/modules/vfs_unityed_media.c')
-rw-r--r-- | source3/modules/vfs_unityed_media.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c index bbccb66c5cc..93d9ce68755 100644 --- a/source3/modules/vfs_unityed_media.c +++ b/source3/modules/vfs_unityed_media.c @@ -1609,32 +1609,42 @@ err: } static SMB_ACL_T um_sys_acl_get_file(vfs_handle_struct *handle, - const char *path_p, - SMB_ACL_TYPE_T type, - TALLOC_CTX *mem_ctx) + const struct smb_filename *smb_fname, + SMB_ACL_TYPE_T type, + TALLOC_CTX *mem_ctx) { SMB_ACL_T ret; - char *client_path = NULL; + int saved_errno = 0; + struct smb_filename *client_fname = NULL; int status; DEBUG(10, ("Entering um_sys_acl_get_file\n")); - if (!is_in_media_files(path_p)) { - return SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, path_p, + if (!is_in_media_files(smb_fname->base_name)) { + return SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, smb_fname, type, mem_ctx); } - status = alloc_get_client_path(handle, talloc_tos(), - path_p, &client_path); + status = alloc_get_client_smb_fname(handle, + talloc_tos(), + smb_fname, + &client_fname); if (status != 0) { - ret = NULL; + ret = (SMB_ACL_T)NULL; goto err; } - ret = SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, client_path, type, mem_ctx); + ret = SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, client_fname, + type, mem_ctx); err: - TALLOC_FREE(client_path); + if (ret == (SMB_ACL_T)NULL) { + saved_errno = errno; + } + TALLOC_FREE(client_fname); + if (saved_errno != 0) { + errno = saved_errno; + } return ret; } |