Date: Sat, 20 Oct 2001 11:41:13 -0400 From: "Kutulu" <kutulu@kutulu.org> To: <ijliao@FreeBSD.ORG>, <freebsd-ports@FreeBSD.ORG> Subject: Re: ports/30431: ircd-hybrid fails to open logfile when started as root and running as non-root Message-ID: <008101c1597d$aa0c2030$88682518@longhill1.md.home.com> References: <200110201346.f9KDkoH94175@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
From: <ijliao@FreeBSD.ORG> To: <kutulu@kutulu.org>; <ijliao@FreeBSD.ORG>; <freebsd-ports@FreeBSD.ORG> Sent: Saturday, October 20, 2001 9:46 AM Subject: Re: ports/30431: ircd-hybrid fails to open logfile when started as root and running as non-root > Synopsis: ircd-hybrid fails to open logfile when started as root and running as non-root > > State-Changed-From-To: open->feedback > State-Changed-By: ijliao > State-Changed-When: Sat Oct 20 06:44:18 PDT 2001 > State-Changed-Why: > what version of ircd-hybrid did you use ? > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-ports" in the body of the message > Oops, the patch I submitted was against hybrid 6.0. I forgot I'd upgraded the port/irc/ircd-hybrid stuff by hand before I submitted the patch. 5.3p8 seems to have the same basic problem, it opens the debugfile after checking to see if it needs to setuid(). Typically LPATH is set to some file inside DPATH but in the off chance that someone (like myself) wanted to put the logfile in /var/log with the rest of them, it would fail. Here's a very rough patch that does the same thing as the original, with 5.3p8 source (untested, having hardware problems trying to compile stuff lately): --- src/ircd.c.old Sat Oct 20 11:36:28 2001 +++ src/ircd.c Sat Oct 20 11:38:36 2001 @@ -1230,6 +1230,9 @@ } #endif + NOW = time(NULL); + open_debugfile(); + #if !defined(CHROOTDIR) || (defined(IRC_UID) && defined(IRC_GID)) # ifndef AIX (void)setuid((uid_t)euid); @@ -1285,8 +1288,6 @@ initwhowas(); initstats(); init_tree_parse(msgtab); - NOW = time(NULL); - open_debugfile(); NOW = time(NULL); init_fdlist(&serv_fdlist); init_fdlist(&oper_fdlist); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?008101c1597d$aa0c2030$88682518>