X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fircd.c;h=31ecd8a043b3daaf7ccd6b4dc7ae7c7744143fb1;hb=8079138defb64c4d8955d9eb974466cd275965c5;hp=e16eebf41fc27b8db22ccba24bbbe89f6f9f4d0f;hpb=88f38f990798be6f5dff5fa0b08a6cc5b56c9cd3;p=ircu2.10.12-pk.git diff --git a/ircd/ircd.c b/ircd/ircd.c index e16eebf..31ecd8a 100644 --- a/ircd/ircd.c +++ b/ircd/ircd.c @@ -550,12 +550,12 @@ static char set_chroot_environment(void) { if (geteuid()) seteuid(0); - if (chdir(DPATH)) { - fprintf(stderr, "Fail: Cannot chdir(%s): %s\n", DPATH, strerror(errno)); + if (chdir(dpath)) { + fprintf(stderr, "Fail: Cannot chdir(%s): %s\n", dpath, strerror(errno)); return 0; } - if (chroot(DPATH)) { - fprintf(stderr, "Fail: Cannot chroot(%s): %s\n", DPATH, strerror(errno)); + if (chroot(dpath)) { + fprintf(stderr, "Fail: Cannot chroot(%s): %s\n", dpath, strerror(errno)); return 0; } dpath = "/"; @@ -629,7 +629,7 @@ int main(int argc, char **argv) { /* Check paths for accessibility */ if (!check_file_access(SPATH, 'S', X_OK) || - !check_file_access(CPATH, 'C', R_OK) || + !check_file_access(configfile, 'C', R_OK) || !check_file_access(MPATH, 'M', R_OK) || !check_file_access(RPATH, 'R', R_OK)) exit(4);