The Samba-Bugzilla – Attachment 6434 Details for
Bug 8112
POSIX extension opens of a directory are denied with EISDIR.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 3.6.0
0001-Fix-bug-8112-POSIX-extension-opens-of-a-directory-ar.patch (text/plain), 1.88 KB, created by
Jeremy Allison
on 2011-04-29 23:27:10 UTC
(
hide
)
Description:
git-am fix for 3.6.0
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2011-04-29 23:27:10 UTC
Size:
1.88 KB
patch
obsolete
>From 2cb53f066e0e42d923be89dd3a7e18ea7a1b7340 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Fri, 29 Apr 2011 16:15:55 -0700 >Subject: [PATCH 1/2] Fix bug #8112 - POSIX extension opens of a directory are denied with EISDIR. > >Ensure create_options are passed down to SMB_VFS_CREATE_FILE(). >Correctly set create_options is SMB_O_DIRECTORY is set or pathname >is known to be a directory. > >Jeremy. >--- > source3/smbd/trans2.c | 12 ++++++++++-- > 1 files changed, 10 insertions(+), 2 deletions(-) > >diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c >index 028d318..46f2aa0 100644 >--- a/source3/smbd/trans2.c >+++ b/source3/smbd/trans2.c >@@ -7240,7 +7240,7 @@ static NTSTATUS smb_posix_open(connection_struct *conn, > uint32 mod_unixmode = 0; > uint32 create_disp = 0; > uint32 access_mask = 0; >- uint32 create_options = 0; >+ uint32 create_options = FILE_NON_DIRECTORY_FILE; > NTSTATUS status = NT_STATUS_OK; > mode_t unixmode = (mode_t)0; > files_struct *fsp = NULL; >@@ -7354,6 +7354,14 @@ static NTSTATUS smb_posix_open(connection_struct *conn, > if (wire_open_mode & SMB_O_SYNC) { > create_options |= FILE_WRITE_THROUGH; > } >+ if ((wire_open_mode & SMB_O_DIRECTORY) || >+ VALID_STAT_OF_DIR(smb_fname->st)) { >+ if (access_mask != FILE_READ_DATA) { >+ return NT_STATUS_FILE_IS_A_DIRECTORY; >+ } >+ create_options &= ~FILE_NON_DIRECTORY_FILE; >+ create_options |= FILE_DIRECTORY_FILE; >+ } > if (wire_open_mode & SMB_O_APPEND) { > access_mask |= FILE_APPEND_DATA; > } >@@ -7375,7 +7383,7 @@ static NTSTATUS smb_posix_open(connection_struct *conn, > (FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */ > FILE_SHARE_DELETE), > create_disp, /* create_disposition*/ >- FILE_NON_DIRECTORY_FILE, /* create_options */ >+ create_options, /* create_options */ > mod_unixmode, /* file_attributes */ > oplock_request, /* oplock_request */ > 0, /* allocation_size */ >-- >1.7.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8112
: 6434 |
6435