diff options
author | Ralph Boehme <slow@samba.org> | 2017-02-07 15:01:53 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2017-03-07 08:28:15 +0100 |
commit | 161974b5599348c0e9a4e8ed0c513614dbc67014 (patch) | |
tree | f7eebf455fe31a9580a74536d20afc78e1099d7e | |
parent | 49e8aa8287da089699964a5a08e922d98caee759 (diff) | |
download | samba-161974b5599348c0e9a4e8ed0c513614dbc67014.tar.gz |
vfs_fruit: use stat info from base_fsp
This is also supposed to be valid in the VFS stack, so there's no need
to re-stat here.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12427
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit ffa727f33b06e71403303b53797a068f455b22f8)
-rw-r--r-- | source3/modules/vfs_fruit.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 6d6fb9f3b20..cd85d08c652 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -2823,15 +2823,9 @@ static int fruit_open_rsrc_adouble(vfs_handle_struct *handle, SMB_VFS_HANDLE_GET_DATA(handle, config, struct fruit_config_data, return -1); - if (!(flags & O_CREAT) && !VALID_STAT(smb_fname->st)) { - rc = SMB_VFS_NEXT_STAT(handle, smb_fname); - if (rc != 0) { - rc = -1; - goto exit; - } - } - - if (VALID_STAT(smb_fname->st) && S_ISDIR(smb_fname->st.st_ex_mode)) { + if ((!(flags & O_CREAT)) && + S_ISDIR(fsp->base_fsp->fsp_name->st.st_ex_mode)) + { /* sorry, but directories don't habe a resource fork */ rc = -1; goto exit; |