diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/dosmode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 3a06dfe59a..31c4fbdf31 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -235,9 +235,10 @@ int file_chmod(connection_struct *conn,char *fname,int dosmode,SMB_STRUCT_STAT * unixmode |= (st->st_mode & (S_IWUSR|S_IWGRP|S_IWOTH)); } - ret = vfs_chmod(conn,fname,unixmode); + if ((ret = vfs_chmod(conn,fname,unixmode)) == 0) + return 0; - if((ret == -1) && (errno != EPERM) && (errno != EACCES)) + if((errno != EPERM) && (errno != EACCES)) return -1; if(!lp_dos_filemode(SNUM(conn))) |