The Samba-Bugzilla – Attachment 9144 Details for
Bug 10095
Samba does not properly indicate DFS reparse points in the responses to FIND FIRST/FIND NEXT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
the patch
0001-Windows-overloads-the-EA-Lenght-field-in-the-DIRECTO.patch (text/plain), 3.12 KB, created by
Richard Sharpe
on 2013-08-18 14:53:25 UTC
(
hide
)
Description:
the patch
Filename:
MIME Type:
Creator:
Richard Sharpe
Created:
2013-08-18 14:53:25 UTC
Size:
3.12 KB
patch
obsolete
>From cdcf3bfa6e07b1b6f1972a2d8924b9f622d4814d Mon Sep 17 00:00:00 2001 >From: Richard Sharpe <realrichardsharpe@gmail.com> >Date: Sun, 18 Aug 2013 07:34:31 -0700 >Subject: [PATCH] Windows overloads the EA Length field in the DIRECTORY INFO > leves of FIND FIRST/FIND NEXT. > >This field indicates either the REPARSE_TAG if the file/folder has a reparse proint or >the EA Length if it has EAs, and is the fundamental reason you cannot have both on a >file or folder. > >Signed-off-by: Richard Sharpe <rsharpe@samba.org> > >--- > source3/include/ntioctl.h | 1 + > source3/smbd/dosmode.c | 5 +++++ > source3/smbd/trans2.c | 19 ++++++++++++++++--- > 3 files changed, 22 insertions(+), 3 deletions(-) > >diff --git a/source3/include/ntioctl.h b/source3/include/ntioctl.h >index e09e1c8..65bed64 100644 >--- a/source3/include/ntioctl.h >+++ b/source3/include/ntioctl.h >@@ -26,6 +26,7 @@ > #define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003 > #define IO_REPARSE_TAG_HSM 0xC0000004 > #define IO_REPARSE_TAG_SIS 0x80000007 >+#define IO_REPARSE_TAG_DFS 0x8000000A > > > /* For FSCTL_GET_SHADOW_COPY_DATA ...*/ >diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c >index a6ad107..2d07dd9 100644 >--- a/source3/smbd/dosmode.c >+++ b/source3/smbd/dosmode.c >@@ -489,6 +489,11 @@ uint32 dos_mode_msdfs(connection_struct *conn, > > result = filter_mode_by_protocol(result); > >+ /* >+ * Add in that it is a reparse point >+ */ >+ result |= FILE_ATTRIBUTE_REPARSE_POINT; >+ > DEBUG(8,("dos_mode_msdfs returning ")); > > if (result & FILE_ATTRIBUTE_HIDDEN) DEBUG(8, ("h")); >diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c >index 2bff483..a606311 100644 >--- a/source3/smbd/trans2.c >+++ b/source3/smbd/trans2.c >@@ -24,6 +24,7 @@ > */ > > #include "includes.h" >+#include "ntioctl.h" > #include "system/filesys.h" > #include "version.h" > #include "smbd/smbd.h" >@@ -1817,7 +1818,11 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx, > SOFF_T(p,0,allocation_size); p += 8; > SIVAL(p,0,mode); p += 4; > q = p; p += 4; /* q is placeholder for name length. */ >- { >+ if (mode & FILE_ATTRIBUTE_REPARSE_POINT) { >+ SIVAL(p, 0, IO_REPARSE_TAG_DFS); >+ p += 4; >+ } >+ else { > unsigned int ea_size = estimate_ea_size(conn, NULL, > smb_fname); > SIVAL(p,0,ea_size); /* Extended attributes */ >@@ -1994,7 +1999,11 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx, > SOFF_T(p,0,allocation_size); p += 8; > SIVAL(p,0,mode); p += 4; > q = p; p += 4; /* q is placeholder for name length. */ >- { >+ if (mode & FILE_ATTRIBUTE_REPARSE_POINT) { >+ SIVAL(p, 0, IO_REPARSE_TAG_DFS); >+ p += 4; >+ } >+ else { > unsigned int ea_size = estimate_ea_size(conn, NULL, > smb_fname); > SIVAL(p,0,ea_size); /* Extended attributes */ >@@ -2040,7 +2049,11 @@ static bool smbd_marshall_dir_entry(TALLOC_CTX *ctx, > SOFF_T(p,0,allocation_size); p += 8; > SIVAL(p,0,mode); p += 4; > q = p; p += 4; /* q is placeholder for name length */ >- { >+ if (mode & FILE_ATTRIBUTE_REPARSE_POINT) { >+ SIVAL(p, 0, IO_REPARSE_TAG_DFS); >+ p += 4; >+ } >+ else { > unsigned int ea_size = estimate_ea_size(conn, NULL, > smb_fname); > SIVAL(p,0,ea_size); /* Extended attributes */ >-- >1.7.11.7 >
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 10095
: 9144