The Samba-Bugzilla – Attachment 6462 Details for
Bug 8133
strange behavior for the file (whose filename first character is period ) in SMB2 case.
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-Optimization.-If-the-attributes-passed-to-can_rename.patch (text/plain), 1.49 KB, created by
Jeremy Allison
on 2011-05-20 17:57:22 UTC
(
hide
)
Description:
git-am fix for 3.6.0
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2011-05-20 17:57:22 UTC
Size:
1.49 KB
patch
obsolete
>From 38c77db9892b5d607a7a05fab563f5f6977794e1 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Thu, 19 May 2011 16:38:11 -0700 >Subject: [PATCH 1/2] Optimization. If the attributes passed to can_rename() include both FILE_ATTRIBUTE_HIDDEN and FILE_ATTRIBUTE_SYSTEM then there's no point in reading the source DOS attribute, as we're not going to deny the rename on attribute match. > >--- > source3/smbd/reply.c | 13 ++++++++----- > 1 files changed, 8 insertions(+), 5 deletions(-) > >diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c >index 99ab4ca..31f596c 100644 >--- a/source3/smbd/reply.c >+++ b/source3/smbd/reply.c >@@ -2381,15 +2381,18 @@ void reply_ctemp(struct smb_request *req) > static NTSTATUS can_rename(connection_struct *conn, files_struct *fsp, > uint16 dirtype) > { >- uint32 fmode; >- > if (!CAN_WRITE(conn)) { > return NT_STATUS_MEDIA_WRITE_PROTECTED; > } > >- fmode = dos_mode(conn, fsp->fsp_name); >- if ((fmode & ~dirtype) & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) { >- return NT_STATUS_NO_SUCH_FILE; >+ if ((dirtype & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) != >+ (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) { >+ /* Only bother to read the DOS attribute if we might deny the >+ rename on the grounds of attribute missmatch. */ >+ uint32_t fmode = dos_mode(conn, fsp->fsp_name); >+ if ((fmode & ~dirtype) & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) { >+ return NT_STATUS_NO_SUCH_FILE; >+ } > } > > if (S_ISDIR(fsp->fsp_name->st.st_ex_mode)) { >-- >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
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 8133
: 6462 |
6463