chiark / gitweb /
client/tripectl.c, debian: Fix logging privileges disaster.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 27 Jun 2011 01:00:42 +0000 (02:00 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 27 Jun 2011 08:53:35 +0000 (09:53 +0100)
commit1a372224dde236370adb73fdcd8468d7def4bc28
treec7e9326ea058fa4e3a3e9b1835255cf2dc69d0f8
parent550edef74b0eea42a57d1b922167286e58c8bcf4
client/tripectl.c, debian: Fix logging privileges disaster.

Previous behaviour: tripectl starts as root, opens logfile, starts tripe
server, drops privileges, logs happily to file, receives signal,
attempts to open new logfile, and fails miserably.  It therefore
continues logging to the old logfile, which may well have been deleted
by this point.

New behaviour: fix Debianization to put logs in a /var/log/tripe
directory, and arrange for this to be writable by the tripe user; create
the log file after dropping privileges.  If tripectl can't open the log,
it fails, and the tripe server quits due to EOF on stdin.
client/tripectl.c
debian/changelog
debian/rules
debian/tripe.logrotate
debian/tripe.postinst