summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libsmb/clifile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index ebace8f963..6d7a7dfb6f 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -1783,8 +1783,8 @@ static uint32 open_flags_to_wire(int flags)
case O_RDWR:
ret |= SMB_O_RDWR;
break;
- case O_RDONLY:
default:
+ case O_RDONLY:
ret |= SMB_O_RDONLY;
break;
}
@@ -1811,6 +1811,7 @@ static uint32 open_flags_to_wire(int flags)
#endif
#if defined(O_DIRECTORY)
if (flags & O_DIRECTORY) {
+ ret &= ~(SMB_O_RDONLY|SMB_O_RDWR|SMB_O_WRONLY);
ret |= SMB_O_DIRECTORY;
}
#endif