From 92c2566043912a7f4a5b81d8c2829e5ffa44b50b Mon Sep 17 00:00:00 2001 From: Nishi Date: Wed, 9 Oct 2024 10:50:45 +0000 Subject: [PATCH] c89 git-svn-id: file:///raid/svn-personal/tewi/trunk@293 8739d7e6-ffea-ec47-b151-bdff447c6205 --- Server/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Server/server.c b/Server/server.c index 23ab162..84e24dd 100644 --- a/Server/server.c +++ b/Server/server.c @@ -526,6 +526,7 @@ int tw_server_pass(void* ptr) { bool rej; char* host; int port; + char* chrootpath; struct tw_config_entry* vhost_entry; strftime(date, 512, "%a, %d %b %Y %H:%M:%S %Z", tm); @@ -589,7 +590,7 @@ int tw_server_pass(void* ptr) { cm_log("Server", "Hostname is `%s', port is `%d'", host, port); vhost_entry = tw_vhost_match(host, port); #ifdef HAS_CHROOT - char* chrootpath = vhost_entry->chroot_path != NULL ? vhost_entry->chroot_path : config.root.chroot_path; + chrootpath = vhost_entry->chroot_path != NULL ? vhost_entry->chroot_path : config.root.chroot_path; if(chrootpath != NULL) { if(chdir(chrootpath) == 0) { if(chroot(".") == 0) { -- 2.43.0