How can I detect whether an /etc/rc.d/init.d script is being run at boot time versus by hand?

2013-05-21 Thread Bill Freeman
I'm trying to figure out whether to force the removal of an almost certainly stale pid file or not in the service start case. While I presume that the start up sequence normally handles this by clearing /var/run before lighting off the init scripts for the level, I have a need to have my pid file

Re: How can I detect whether an /etc/rc.d/init.d script is being run at boot time versus by hand?

2013-05-21 Thread Mark Komarinski
On 05/21/2013 11:22 AM, Bill Freeman wrote: I'm trying to figure out whether to force the removal of an almost certainly stale pid file or not in the service start case. While I presume that the start up sequence normally handles this by clearing /var/run before lighting off the init

Re: How can I detect whether an /etc/rc.d/init.d script is being run at boot time versus by hand?

2013-05-21 Thread Joshua Judson Rosen
Bill Freeman ke1g...@gmail.com writes: I'm trying to figure out whether to force the removal of an almost certainly stale pid file or not in the service start case. While I presume that the start up sequence normally handles this by clearing / var/run before lighting off the init scripts for

Re: How can I detect whether an /etc/rc.d/init.d script is being run at boot time versus by hand?

2013-05-21 Thread Kevin D. Clark
Bill Freeman writes: I'm trying to figure out whether to force the removal of an almost certainly stale pid file or not in the service start case. I'm not specifically answering your question here, but, here is some code that I believe to be reasonable and related to the problem you appear to

Re: How can I detect whether an /etc/rc.d/init.d script is being run at boot time versus by hand?

2013-05-21 Thread Bill Freeman
Thanks to all. Some notes: The session id/group id/ppid thoughts are a non starter. I've found that, at least on CentOS, they aren't small recognizable numbers at boot time. I can probably count on running on a linux box, so I can probably count on the FHS. But the downside of tmp is

Re: How can I detect whether an /etc/rc.d/init.d script is being run at boot time versus by hand?

2013-05-21 Thread Bill Freeman
I went with the keep the file open approach, but added flock exclusive (advisory locking). When starting, if the file exists, but if I can open it for writing and flock it exclusive, I assume that it's a stale PID file and just delete it. On Tue, May 21, 2013 at 4:15 PM, Bill Freeman

Re: Permissions on /tmp (was: How can I detect whether an /etc/rc.d/init.d script is being run at boot time versus by hand?)

2013-05-21 Thread Joshua Judson Rosen
Bill Freeman ke1g...@gmail.com writes:    I can probably count on running on a linux box, so I can probably count on the FHS.  But the downside of tmp is that any process can also delete my pid file (as opposed to having to be either root or the user created for the program). The sticky-bit

Re: Permissions on /tmp

2013-05-21 Thread Joshua Judson Rosen
Joshua Judson Rosen roz...@geekspace.com writes: Bill Freeman ke1g...@gmail.com writes:    I can probably count on running on a linux box, so I can probably count on the FHS.  But the downside of tmp is that any process can also delete my pid file (as opposed to having to be either

ARTICLE - Analysis of semtex.c exploit

2013-05-21 Thread Michael ODonnell
A nicely readable analysis (if you happen to like this stuff) of the exploit recently demonstrated via semtex.c : http://timetobleed.com/a-closer-look-at-a-recent-privilege-escalation-bug-in-linux-cve-2013-2094/ ___ gnhlug-discuss mailing list

The SIP talk tonight

2013-05-21 Thread Curt Howland
For ease of use, I PDF'd it, but it's a LibreOffice editable PDF, and linked it here: http://Priss.com/ http://Priss.com/SIP_Overview.pdf Thank you for the opportunity. Curt- P.S.: Here's where I used one of Maddog's talks: http://anarchic-order.blogspot.com/2011/03/windows-is-not-free.html