svn commit: samba r21758 - in branches: SAMBA_3_0/source/smbd
SAMBA_3_0_25/source/smbd
jra at samba.org
jra at samba.org
Thu Mar 8 02:51:42 GMT 2007
Author: jra
Date: 2007-03-08 02:51:41 +0000 (Thu, 08 Mar 2007)
New Revision: 21758
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21758
Log:
Fix a very specific dfs bug when passing in POSIX
pathnames. When we're working out how much we've
consumed we need to backtrack by either a '/' or '\\'
component, as both are valid separators.
Jeremy.
Modified:
branches/SAMBA_3_0/source/smbd/msdfs.c
branches/SAMBA_3_0_25/source/smbd/msdfs.c
Changeset:
Modified: branches/SAMBA_3_0/source/smbd/msdfs.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/msdfs.c 2007-03-08 01:40:49 UTC (rev 21757)
+++ branches/SAMBA_3_0/source/smbd/msdfs.c 2007-03-08 02:51:41 UTC (rev 21758)
@@ -92,7 +92,7 @@
ZERO_STRUCTP(pdp);
trim_char(temp,sepchar,sepchar);
- DEBUG(10,("temp in parse_processed_dfs_path: .%s. after trimming \\'s\n",temp));
+ DEBUG(10,("temp in parse_processed_dfs_path: .%s. after trimming /'s\n",temp));
/* now tokenize */
/* parse out hostname */
@@ -401,12 +401,15 @@
*/
if (consumedcntp) {
- char *q;
pstring buf;
pstrcpy(buf, dfspath);
trim_char(buf, '\0', '\\');
for (; consumed_level; consumed_level--) {
- q = strrchr_m(buf, '\\');
+ char *q, *q1, *q2;
+ /* Either '\\' or '/' may be a separator. */
+ q1 = strrchr_m(buf, '\\');
+ q2 = strrchr_m(buf, '/');
+ q = MAX(q1,q2);
if (q) {
*q = 0;
}
Modified: branches/SAMBA_3_0_25/source/smbd/msdfs.c
===================================================================
--- branches/SAMBA_3_0_25/source/smbd/msdfs.c 2007-03-08 01:40:49 UTC (rev 21757)
+++ branches/SAMBA_3_0_25/source/smbd/msdfs.c 2007-03-08 02:51:41 UTC (rev 21758)
@@ -92,7 +92,7 @@
ZERO_STRUCTP(pdp);
trim_char(temp,sepchar,sepchar);
- DEBUG(10,("temp in parse_processed_dfs_path: .%s. after trimming \\'s\n",temp));
+ DEBUG(10,("temp in parse_processed_dfs_path: .%s. after trimming /'s\n",temp));
/* now tokenize */
/* parse out hostname */
@@ -401,12 +401,15 @@
*/
if (consumedcntp) {
- char *q;
pstring buf;
pstrcpy(buf, dfspath);
trim_char(buf, '\0', '\\');
for (; consumed_level; consumed_level--) {
- q = strrchr_m(buf, '\\');
+ char *q, *q1, *q2;
+ /* Either '\\' or '/' may be a separator. */
+ q1 = strrchr_m(buf, '\\');
+ q2 = strrchr_m(buf, '/');
+ q = MAX(q1,q2);
if (q) {
*q = 0;
}
More information about the samba-cvs
mailing list