From 2f30aea3324f32f9b8555e961256fc1280da2871 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 12 Jan 2010 14:48:23 -0800 Subject: Remove the global char *LastDir. This is no longer used for anything. --- source3/smbd/globals.c | 1 - source3/smbd/globals.h | 1 - source3/smbd/vfs.c | 21 +-------------------- 3 files changed, 1 insertion(+), 22 deletions(-) (limited to 'source3') diff --git a/source3/smbd/globals.c b/source3/smbd/globals.c index 68fa795ba2..e6db5ec414 100644 --- a/source3/smbd/globals.c +++ b/source3/smbd/globals.c @@ -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; diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 0db61f87a3..3cc967f4fd 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -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; diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 2ce61eed30..5acec70f54 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -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); } /******************************************************************* -- cgit