Ticket #86 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

re-implementation of openlog()

Reported by: guest Owned by:
Priority: normal Milestone: 0.6.0 "Hotspotify"
Version: 0.5.2 "WifiFree" Keywords: sylog on FreeBSD when chroot'ed
Cc:

Description

When using the chroot option with /var/empty on FreeBSD, nothing will ever get syslogged since there is no /dev/log in /var/empty. This can be fixed by calling openlog() and with LOG_NDELAY before chroot().

The patch is against the svn-version of today. Possibly it has to be #ifdef'ed FREEBSD -- don't know about linux.

jsbid1@…

--- src/iodined.c.ORI 2009-09-20 23:10:41.000000000 +0200 +++ src/iodined.c 2009-10-19 14:19:10.000000000 +0200 @@ -2114,6 +2114,8 @@

if (pidfile != NULL)

do_pidfile(pidfile);

+ openlog( progname, LOG_NDELAY, LOG_DAEMON ); +

if (newroot != NULL)

do_chroot(newroot);

Attachments

fixsyslog Download (282 bytes) - added by guest 2 years ago.
patch
fixsyslog.2 Download (297 bytes) - added by guest 2 years ago.
patch v2

Change History

Changed 2 years ago by guest

patch

Changed 2 years ago by guest

patch v2

comment:1 Changed 2 years ago by guest

A better version:

--- src/iodined.c.ORI 2009-09-20 23:10:41.000000000 +0200 +++ src/iodined.c 2009-10-19 14:19:10.000000000 +0200 @@ -2114,6 +2114,9 @@

if (pidfile != NULL)

do_pidfile(pidfile);

+ tzsetwall(); + openlog( progname, LOG_NDELAY, LOG_DAEMON ); +

if (newroot != NULL)

do_chroot(newroot);

comment:2 Changed 2 years ago by yarrick

  • Milestone set to x.y.z "Hotspotify"

comment:3 Changed 2 years ago by yarrick

  • Status changed from new to closed
  • Resolution set to fixed

Applied in [963].

Note: See TracTickets for help on using tickets.