From: Perry Lorier Date: Thu, 29 Jun 2000 23:44:45 +0000 (+0000) Subject: Author: Isomer X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=8079138defb64c4d8955d9eb974466cd275965c5 Author: Isomer Log message: Fixed minor bugs in command line handling that made testing a pain. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@260 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index e7cf371..386e9bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -2000-05-29 Perry Lorier +2000-06-30 Perry Lorier + * ircd/ircd.c: Fix command line parameter bugs. + +2000-06-30 Perry Lorier * ircd/m_kill.c: Fixed bug with LOCAL_KILL_ONLY * ircd/m_nick.c: Tidied things up. @@ -1242,7 +1245,7 @@ # # ChangeLog for ircu2.10.11 # -# $Id: ChangeLog,v 1.149 2000-06-29 23:21:15 isomer Exp $ +# $Id: ChangeLog,v 1.150 2000-06-29 23:44:45 isomer Exp $ # # Insert new changes at beginning of the change list. # 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);