X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fhtparser.c;h=5179a25935a0e9f328e771edf8b159f32c988a42;hb=0370bd82128b41fdbd5fbcbcac35104c0ede60fa;hp=ceae319aeafbd12ef68cd0342c9e4be6e2747c38;hpb=d341283f757e188a52aedae7d715e201f2a430c2;p=ashd.git 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); }