summaryrefslogtreecommitdiffstats
path: root/source/smbd/vfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/smbd/vfs.c')
-rw-r--r--source/smbd/vfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c
index 13cfdac0f35..a47f040f6a8 100644
--- a/source/smbd/vfs.c
+++ b/source/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;
}