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)
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.


No differences found