Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
[samba.git] / source3 / smbd / vfs.c
index 2ce61eed30ccbabcf9a2b004c371088fc22d376c..94bdb1f495c423ce3eb0c252ec3e0c6b3f0308b1 100644 (file)
@@ -706,26 +706,7 @@ const char *vfs_readdirname(connection_struct *conn, void *p,
 
 int vfs_ChDir(connection_struct *conn, const char *path)
 {
-       int res;
-
-       if (!LastDir) {
-               LastDir = SMB_STRDUP("");
-       }
-
-       if (strcsequal(path,"."))
-               return(0);
-
-       if (*path == '/' && strcsequal(LastDir,path))
-               return(0);
-
-       DEBUG(4,("vfs_ChDir to %s\n",path));
-
-       res = SMB_VFS_CHDIR(conn,path);
-       if (!res) {
-               SAFE_FREE(LastDir);
-               LastDir = SMB_STRDUP(path);
-       }
-       return(res);
+       return SMB_VFS_CHDIR(conn,path);
 }
 
 /*******************************************************************
@@ -964,7 +945,7 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
                                strlen(conn_rootdir)) != 0) {
                            DEBUG(2, ("check_reduced_name: Bad access "
                                      "attempt: %s is a symlink outside the "
-                                     "share path", fname));
+                                     "share path\n", fname));
                            if (free_resolved_name) {
                                    SAFE_FREE(resolved_name);
                            }