On Mon, Nov 21, 2011 at 10:02:44AM +0000, Edd Barrett wrote: > On Fri, Nov 18, 2011 at 01:06:25PM +0000, Edd Barrett wrote: > > On Fri, Nov 18, 2011 at 12:39:35PM +0000, Edd Barrett wrote: > > > Attached. > > > > As sebastiap@ correctly pointed out, lcdvc.rc should be blasted. lcdvc > > is not supported on OpenBSD. > > Also /var/run is blasted upon boot, so I will have to figure an > alternative way to store away a pid file.
Here is the deal. LCDd(8) is capable of dropping privs from root and thus could write to /var/run if it wanted to. As it happens, LCDd does not use a PID file. Presumably LCDd needs access to devices which require root privs and this is done pre-priv-drop. lcdproc(1) and lcdexec(1) don't drop privs, probably because really they are clients; they do however write PID files, by default to /var/run. Non-root/wheel can not write to /var/run; however, if you run these programs as root, they will not drop privs and stay as root, which is bad for us. Kinda silly design choice, some might say. But anyway, what I have opted to do: 1) Have lcdproc and lcdexec write to an _lcdproc owned /var/lcdproc. 2) daemon_user="_lcdproc", for lcdproc(1) and lcdexec(1). 3) LCDd(8) howver, runs as root and drops to _lcdproc via it's own means. I had to test this using the curses/text drivers because the machine with the physical LCD setup has a busted disk. We know the hd44780 driver works; moving PIDS about should not break this. sebastia@ tried using the crystalfontz driver, but was thwarted due to bad hardware. Attached looks good? OK? -- Best Regards Edd Barrett http://www.theunixzoo.co.uk
lcdproc.varhome3.tgz
Description: application/tar-gz
