[Nfdump-discuss] change user vs permission to create /var/run/nfcapd.pid
netflow collecting and processing tools
Brought to you by:
phaag
|
From: Scott B. <ss...@um...> - 2013-12-05 19:44:12
|
Drop root privs happens before the PID file is created which is a hassle since it isn't always trivial to make a persistent subdirectory in /var/run. Wondering if the code: SetPriv(userid, groupid); in nfcapd.c, nfpcapd.c, and sfcapd.c could be moved after the PID file is created. It doesn't seem as though this is problematic (works great for me in nfcapd!) since daemonize() is the only code that seemed likely to do anything worrisome...and all that does is fork(), setsid(), and fork(). Thanks, Scott |