The Samba-Bugzilla – Attachment 12704 Details for
Bug 12436
Fix the last resort check that sets the file type attribute
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 4.4 and 4.5 cherry-picked from master
v44,v45-bug12436.patch (text/plain), 1.69 KB, created by
Ralph Böhme
on 2016-11-30 17:29:01 UTC
(
hide
)
Description:
Patch for 4.4 and 4.5 cherry-picked from master
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2016-11-30 17:29:01 UTC
Size:
1.69 KB
patch
obsolete
>From a0df4b1af476ffe9fe95928aed72cf5f91b3786b Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Fri, 18 Nov 2016 10:20:41 -0800 >Subject: [PATCH] s3/smbd: fix the last resort check that sets the file type > attribute >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The rule is, a directory (with any other attributes) should always also >set FILE_ATTRIBUTE_DIRECTORY, a file should only set >FILE_ATTRIBUTE_NORMAL if no other attributes is set. > >Iow, if a file contains any existing attributes (e.g. FILE_ATTRIBUTE_HIDDEN), >don't add in the FILE_ATTRIBUTE_NORMAL attribute. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12436 > >Signed-off-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Ralph Boehme <slow@samba.org> > >Autobuild-User(master): Ralph Böhme <slow@samba.org> >Autobuild-Date(master): Sat Nov 19 11:55:35 CET 2016 on sn-devel-144 > >(cherry picked from commit a0783e8dd966a0b2d24d2ca5baa6bed3fe5a7d5a) >--- > source3/smbd/dosmode.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > >diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c >index a376cbc..c80d240 100644 >--- a/source3/smbd/dosmode.c >+++ b/source3/smbd/dosmode.c >@@ -636,12 +636,10 @@ uint32_t dos_mode(connection_struct *conn, struct smb_filename *smb_fname) > > result |= dos_mode_from_name(conn, smb_fname, result); > >- if (result == 0) { >- if (S_ISDIR(smb_fname->st.st_ex_mode)) { >- result = FILE_ATTRIBUTE_DIRECTORY; >- } else { >- result = FILE_ATTRIBUTE_NORMAL; >- } >+ if (S_ISDIR(smb_fname->st.st_ex_mode)) { >+ result |= FILE_ATTRIBUTE_DIRECTORY; >+ } else if (result == 0) { >+ result = FILE_ATTRIBUTE_NORMAL; > } > > result = filter_mode_by_protocol(result); >-- >2.7.4 >
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:
jra
:
review+
Actions:
View
Attachments on
bug 12436
:
12673
|
12674
|
12677
| 12704