[SCM] Samba Shared Repository - branch master updated
Uri Simchoni
uri at samba.org
Fri Mar 25 12:24:05 UTC 2016
The branch, master has been updated
via fca78dd s3: smbd: DFS - Remove the last lp_posix_pathnames() from the SMB2/3 code paths.
from c51b8c2 ctdb-recovery-helper: Add banning to parallel recovery
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit fca78dddb428b89b01317e47a0db34124dda555e
Author: Jeremy Allison <jra at samba.org>
Date: Sat Mar 19 21:04:09 2016 -0700
s3: smbd: DFS - Remove the last lp_posix_pathnames() from the SMB2/3 code paths.
lp_posix_pathnames() is only used in one place in SMB1 DFS
processing - in dealing with buggy clients, and not at all in SMB2/3.
Note that the removal of lp_posix_pathnames() in the initial detection
of path separator is a change in behavior - but the case where an
incoming DFS name *doesn't* begin with the correct separator is a client bug,
so I'm comfortable with making this change.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Uri Simchoni <uri at samba.org>
Autobuild-User(master): Uri Simchoni <uri at samba.org>
Autobuild-Date(master): Fri Mar 25 13:23:48 CET 2016 on sn-devel-144
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/msdfs.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 647ac3b..cab6ff3 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -82,9 +82,19 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
eos_ptr = &pathname_local[strlen(pathname_local)];
p = temp = pathname_local;
- pdp->posix_path = (lp_posix_pathnames() && *pathname == '/');
+ /*
+ * Non-broken DFS paths *must* start with the
+ * path separator. For Windows this is always '\\',
+ * for posix paths this is always '/'.
+ */
- sepchar = pdp->posix_path ? '/' : '\\';
+ if (*pathname == '/') {
+ pdp->posix_path = true;
+ sepchar = '/';
+ } else {
+ pdp->posix_path = false;
+ sepchar = '\\';
+ }
if (allow_broken_path && (*pathname != sepchar)) {
DEBUG(10,("parse_dfs_path: path %s doesn't start with %c\n",
@@ -92,6 +102,8 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
/*
* Possibly client sent a local path by mistake.
* Try and convert to a local path.
+ * Note that this is an SMB1-only fallback
+ * to cope with known broken SMB1 clients.
*/
pdp->hostname = eos_ptr; /* "" */
--
Samba Shared Repository
More information about the samba-cvs
mailing list