Remove the global char *LastDir.
authorJeremy Allison <jra@samba.org>
Tue, 12 Jan 2010 22:48:23 +0000 (14:48 -0800)
committerJeremy Allison <jra@samba.org>
Tue, 12 Jan 2010 22:48:23 +0000 (14:48 -0800)
This is no longer used for anything.

source3/smbd/globals.c
source3/smbd/globals.h
source3/smbd/vfs.c

index 68fa795ba2ac7663a321ba01f219c06a8cc701da..e6db5ec41492c98bbd1b14a5f442465862b072b4 100644 (file)
@@ -122,7 +122,6 @@ int conn_ctx_stack_ndx = 0;
 
 struct vfs_init_function_entry *backends = NULL;
 char *sparse_buf = NULL;
-char *LastDir = NULL;
 
 /* Current number of oplocks we have outstanding. */
 int32_t exclusive_oplocks_open = 0;
index 0db61f87a3d5ad1eedcab6591553f31eabf4d51c..3cc967f4fd3164bb4ae8599e4b01307a14a66f8e 100644 (file)
@@ -131,7 +131,6 @@ extern int conn_ctx_stack_ndx;
 struct vfs_init_function_entry;
 extern struct vfs_init_function_entry *backends;
 extern char *sparse_buf;
-extern char *LastDir;
 
 /* Current number of oplocks we have outstanding. */
 extern int32_t exclusive_oplocks_open;
index 2ce61eed30ccbabcf9a2b004c371088fc22d376c..5acec70f546f3e723fff7d4278ff842de8de480a 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);
 }
 
 /*******************************************************************