summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/dosmode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 89e7c6b766..3a06dfe59a 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -237,7 +237,7 @@ int file_chmod(connection_struct *conn,char *fname,int dosmode,SMB_STRUCT_STAT *
ret = vfs_chmod(conn,fname,unixmode);
- if((errno != EPERM) && (errno != EACCES))
+ if((ret == -1) && (errno != EPERM) && (errno != EACCES))
return -1;
if(!lp_dos_filemode(SNUM(conn)))