From: Fredrik Tolf Date: Fri, 29 Apr 2011 01:20:45 +0000 (+0200) Subject: htparser: chdir as part of chrooting. X-Git-Tag: 0.8~7 X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=commitdiff_plain;h=0370bd82128b41fdbd5fbcbcac35104c0ede60fa htparser: chdir as part of chrooting. --- 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); }