The Samba-Bugzilla – Attachment 6017 Details for
Bug 7733
Invalid client DOS attributes on create can cause incorrect unix mode_t to be generated.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git am fix for 3.5.next.
0001-Fix-bug-7733-Invalid-client-DOS-attributes-on-create.patch (text/plain), 1.65 KB, created by
Jeremy Allison
on 2010-10-18 15:36:53 UTC
(
hide
)
Description:
git am fix for 3.5.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2010-10-18 15:36:53 UTC
Size:
1.65 KB
patch
obsolete
>From cd4bf613bfd0060d0750c0fc8a0e7fdd075e947c Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Fri, 15 Oct 2010 13:30:07 -0700 >Subject: [PATCH] Fix bug #7733 - Invalid client DOS attributes on create can cause incorrect unix mode_t to be generated. > >It turns out a client can send an NTCreateX call for a new file, but specify >FILE_ATTRIBUTE_DIRECTORY in the attribute list. Windows silently strips this, >but we don't - causing the unix_mode() function to go through the "mode bits >for new directory" codepath, instead of the "mode bits for new file" codepath. > >Jeremy. >(cherry picked from commit 92adb686372a9b67e47efb5b051bc351212f1780) >--- > source3/smbd/open.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > >diff --git a/source3/smbd/open.c b/source3/smbd/open.c >index 1bf7e23..fa64754 100644 >--- a/source3/smbd/open.c >+++ b/source3/smbd/open.c >@@ -1478,6 +1478,12 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, > > ZERO_STRUCT(id); > >+ /* Windows allows a new file to be created and >+ silently removes a FILE_ATTRIBUTE_DIRECTORY >+ sent by the client. Do the same. */ >+ >+ new_dos_attributes &= ~FILE_ATTRIBUTE_DIRECTORY; >+ > if (conn->printer) { > /* > * Printers are handled completely differently. >@@ -2439,6 +2445,9 @@ static NTSTATUS open_directory(connection_struct *conn, > > SMB_ASSERT(!is_ntfs_stream_smb_fname(smb_dname)); > >+ /* Ensure we have a directory attribute. */ >+ file_attributes |= FILE_ATTRIBUTE_DIRECTORY; >+ > DEBUG(5,("open_directory: opening directory %s, access_mask = 0x%x, " > "share_access = 0x%x create_options = 0x%x, " > "create_disposition = 0x%x, file_attributes = 0x%x\n", >-- >1.7.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
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 7733
: 6017