The Samba-Bugzilla – Attachment 12505 Details for
Bug 12261
Set FILE_ATTRIBUTE_DIRECTORY as necessary if the VFS module doesn't do it
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.5.next, 4.4.next.
0001-s3-smbd-set-FILE_ATTRIBUTE_DIRECTORY-as-necessary.patch (text/plain), 1.69 KB, created by
Jeremy Allison
on 2016-09-22 19:09:05 UTC
(
hide
)
Description:
git-am fix for 4.5.next, 4.4.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2016-09-22 19:09:05 UTC
Size:
1.69 KB
patch
obsolete
>From 8ad345a2149ba4b09d03c4a44164de0bf422e312 Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Wed, 14 Sep 2016 12:52:48 +0200 >Subject: [PATCH] s3/smbd: set FILE_ATTRIBUTE_DIRECTORY as necessary > >Some VFS modules like GPFS will always return success from >SMB_VFS_GET_DOS_ATTRIBUTES() but only set a subset of the attributes. It >neither sets FILE_ATTRIBUTE_NORMAL nor FILE_ATTRIBUTE_DIRECTORY. > >We already handle the case that the VFS stack returns with result==0 and >then add the FILE_ATTRIBUTE_NORMAL, regardless of the type of the >filesystem object. If we want to handle result==0 situation in the >SMB_VFS_GET_DOS_ATTRIBUTES() caller, then do it right by either setting >FILE_ATTRIBUTE_NORMAL or FILE_ATTRIBUTE_DIRECTORY. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=12261 > >Signed-off-by: Ralph Boehme <slow@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Fri Sep 16 00:34:43 CEST 2016 on sn-devel-144 > >(cherry picked from commit 2a2ac63975b8ff41ede8e93ef2b33148c89f185f) >--- > source3/smbd/dosmode.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c >index ef880e5..a376cbc 100644 >--- a/source3/smbd/dosmode.c >+++ b/source3/smbd/dosmode.c >@@ -637,7 +637,11 @@ uint32_t dos_mode(connection_struct *conn, struct smb_filename *smb_fname) > result |= dos_mode_from_name(conn, smb_fname, result); > > if (result == 0) { >- result = FILE_ATTRIBUTE_NORMAL; >+ if (S_ISDIR(smb_fname->st.st_ex_mode)) { >+ result = FILE_ATTRIBUTE_DIRECTORY; >+ } else { >+ 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:
slow
:
review+
Actions:
View
Attachments on
bug 12261
: 12505