summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-04-29 16:18:14 -0700
committerJeremy Allison <jra@samba.org>2011-04-30 02:21:24 +0200
commitde87f549b75d05a1198c490f6aa5c7e62c3fd4a5 (patch)
tree810f8821db542862d35d6eae9192563dcb117336 /source3/libsmb
parent2cb53f066e0e42d923be89dd3a7e18ea7a1b7340 (diff)
downloadsamba-de87f549b75d05a1198c490f6aa5c7e62c3fd4a5.tar.gz
samba-de87f549b75d05a1198c490f6aa5c7e62c3fd4a5.tar.bz2
samba-de87f549b75d05a1198c490f6aa5c7e62c3fd4a5.zip
Add POSIX O_RDONLY test of a directory for bug #8112 - POSIX extension opens of a directory are denied with EISDIR.
Don't strip access bits from wire flags when opening a directory. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Apr 30 02:21:24 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clifile.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index cde2466175..9c0db1ed3a 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -4396,7 +4396,6 @@ static uint32_t 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
@@ -4471,7 +4470,6 @@ static struct tevent_req *cli_posix_open_internal_send(TALLOC_CTX *mem_ctx,
/* Setup data words. */
if (is_dir) {
- wire_flags &= ~(SMB_O_RDONLY|SMB_O_RDWR|SMB_O_WRONLY);
wire_flags |= SMB_O_DIRECTORY;
}