From 0370bd82128b41fdbd5fbcbcac35104c0ede60fa Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Fri, 29 Apr 2011 03:20:45 +0200 Subject: [PATCH] htparser: chdir as part of chrooting. --- src/htparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/htparser.c b/src/htparser.c index ceae319..5179a25 100644 --- a/src/htparser.c +++ b/src/htparser.c @@ -499,7 +499,7 @@ int main(int argc, char **argv) if(usesyslog) opensyslog(); if(root) { - if(chroot(root)) { + if(chdir(root) || chroot(root)) { flog(LOG_ERR, "could not chroot to %s: %s", root, strerror(errno)); exit(1); } -- 2.11.0