summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-01-17 23:47:08 +0000
committerJeremy Allison <jra@samba.org>2001-01-17 23:47:08 +0000
commitebee2c6c6d95de7aa5f17173b846c5ada24b6ccc (patch)
tree81c8b0494f080b08d3a0860fee80f996f85bd08b /source3/smbd
parentaa7cd802062e60fa09c60cc396cfbf12fa08b935 (diff)
downloadsamba-ebee2c6c6d95de7aa5f17173b846c5ada24b6ccc.tar.gz
samba-ebee2c6c6d95de7aa5f17173b846c5ada24b6ccc.tar.bz2
samba-ebee2c6c6d95de7aa5f17173b846c5ada24b6ccc.zip
Get the logic right thistime :-(.
Jeremy. (This used to be commit 83596034cdecc7b03e35c0b4bb149e6bf9cebc70)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/dosmode.c5
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)))