Author: jra
Date: 2004-08-17 18:59:13 +0000 (Tue, 17 Aug 2004)
New Revision: 1866

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=1866&nolog=1

Log:
Fix for bug #1602 reported by <[EMAIL PROTECTED]>.
Access to a share with
wide links = No
follow symlinks = No
Was failing with access denied.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/vfs.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/vfs.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/vfs.c        2004-08-17 18:58:56 UTC (rev 1865)
+++ branches/SAMBA_3_0/source/smbd/vfs.c        2004-08-17 18:59:13 UTC (rev 1866)
@@ -814,7 +814,7 @@
  it is below dir in the heirachy. This uses realpath.
 ********************************************************************/
 
-BOOL reduce_name(connection_struct *conn, pstring fname)
+BOOL reduce_name(connection_struct *conn, const pstring fname)
 {
 #ifdef REALPATH_TAKES_NULL
        BOOL free_resolved_name = True;
@@ -924,7 +924,11 @@
        }
 
        if (!*p) {
-               pstrcpy(resolved_name, ".");
+               if (fname[0] == '.' && fname[1] == '/' && fname[2] == '\0') {
+                       pstrcpy(resolved_name, "./");
+               } else {
+                       pstrcpy(resolved_name, ".");
+               }
                p = resolved_name;
        }
 

Reply via email to