summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_fruit.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2019-06-20 11:42:42 -0700
committerJeremy Allison <jra@samba.org>2019-06-24 18:49:10 +0000
commit644ab10b04ad83775de4622937877c55a5f6cfa9 (patch)
tree60002cb1157a784247e7e033aece1e5e0c1a7968 /source3/modules/vfs_fruit.c
parentbd203e98f84109899704ac86ebcfe9a0fe394d32 (diff)
downloadsamba-644ab10b04ad83775de4622937877c55a5f6cfa9.tar.gz
s3: modules: Fruit. Now we know we have a handle, always use VFS_FCHMOD instead of VFS_CHMOD.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3/modules/vfs_fruit.c')
-rw-r--r--source3/modules/vfs_fruit.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index d8e0dbe63e6..9916bd12f5a 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -6379,18 +6379,13 @@ static NTSTATUS fruit_fset_nt_acl(vfs_handle_struct *handle,
}
if (do_chmod) {
- if (fsp->fh->fd != -1) {
- result = SMB_VFS_FCHMOD(fsp, ms_nfs_mode);
- } else {
- result = SMB_VFS_CHMOD(fsp->conn,
- fsp->fsp_name,
- ms_nfs_mode);
- }
-
+ result = SMB_VFS_FCHMOD(fsp, ms_nfs_mode);
if (result != 0) {
- DEBUG(1, ("chmod: %s, result: %d, %04o error %s\n", fsp_str_dbg(fsp),
- result, (unsigned)ms_nfs_mode,
- strerror(errno)));
+ DBG_WARNING("%s, result: %d, %04o error %s\n",
+ fsp_str_dbg(fsp),
+ result,
+ (unsigned)ms_nfs_mode,
+ strerror(errno));
status = map_nt_error_from_unix(errno);
TALLOC_FREE(psd);
return status;