summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-08-17 18:59:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:22 -0500
commit27dedb3b9d6c638e8c7e6d180ec1f53b0499186b (patch)
treea63d1760f40a71c6f11973396b1ce8341a8a3d4e /source3/smbd
parent5e77ee2a4f113d482f502ce4e0ee1ed00a57304e (diff)
downloadsamba-27dedb3b9d6c638e8c7e6d180ec1f53b0499186b.tar.gz
samba-27dedb3b9d6c638e8c7e6d180ec1f53b0499186b.tar.bz2
samba-27dedb3b9d6c638e8c7e6d180ec1f53b0499186b.zip
r1866: Fix for bug #1602 reported by <m.proehl@science-computing.de>.
Access to a share with wide links = No follow symlinks = No Was failing with access denied. Jeremy. (This used to be commit c137accb25c928551ce666e8c7cfbbcaa60ad771)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/vfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 13cfdac0f3..a47f040f6a 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -814,7 +814,7 @@ BOOL canonicalize_path(connection_struct *conn, pstring path)
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 @@ BOOL reduce_name(connection_struct *conn, pstring fname)
}
if (!*p) {
- pstrcpy(resolved_name, ".");
+ if (fname[0] == '.' && fname[1] == '/' && fname[2] == '\0') {
+ pstrcpy(resolved_name, "./");
+ } else {
+ pstrcpy(resolved_name, ".");
+ }
p = resolved_name;
}