Re: non-root process and PID files

2003-11-15 Thread Terry Lambert
Jos Backus wrote: On Fri, Nov 14, 2003 at 01:45:45AM -0800, Terry Lambert wrote: OK. We already have one of those. We call it init. 8-). Feature-wise init and svscan/supervise don't quite match; svscan has more features, one of which being that it doesn't use a single control file which

Re: non-root process and PID files

2003-11-15 Thread Jos Backus
On Sat, Nov 15, 2003 at 02:30:31PM -0800, Terry Lambert wrote: Jos Backus wrote: On Fri, Nov 14, 2003 at 01:45:45AM -0800, Terry Lambert wrote: OK. We already have one of those. We call it init. 8-). Feature-wise init and svscan/supervise don't quite match; svscan has more

Re: non-root process and PID files

2003-11-14 Thread Terry Lambert
Jos Backus wrote: On Thu, Nov 13, 2003 at 02:45:18AM -0800, Terry Lambert wrote: Why use pid files at all if you could be using a process supervisor instead? Who supervises the supervisor? Heh. The supervisor should be small and robust, like init. Has init died on you recently? Do you

Re: non-root process and PID files

2003-11-14 Thread Wes Peters
On Friday 14 November 2003 01:45 am, Terry Lambert wrote: Jos Backus wrote: On Thu, Nov 13, 2003 at 02:45:18AM -0800, Terry Lambert wrote: There are also the small issues of ordering (the reason you can't just run everything out of /etc/ttys via init in the first place), Sure. Hard

Re: non-root process and PID files

2003-11-14 Thread Jos Backus
On Fri, Nov 14, 2003 at 01:45:45AM -0800, Terry Lambert wrote: Jos Backus wrote: On Thu, Nov 13, 2003 at 02:45:18AM -0800, Terry Lambert wrote: Why use pid files at all if you could be using a process supervisor instead? Who supervises the supervisor? Heh. The supervisor should

Re: non-root process and PID files

2003-11-13 Thread Terry Lambert
Jos Backus wrote: On Mon, Oct 27, 2003 at 10:31:18AM -0500, Dan Langille wrote: If a process starts up and does a setuid, should it be writing the PID file before or after the setuid? Two methods exists AFAIK: 1 - write your PID immediately, and the file is chown root:wheel 2 -

Re: non-root process and PID files

2003-11-13 Thread Joan Picanyol
* Terry Lambert [EMAIL PROTECTED] [20031113 11:46]: Jos Backus wrote: On Mon, Oct 27, 2003 at 10:31:18AM -0500, Dan Langille wrote: 1 - write your PID immediately, and the file is chown root:wheel 2 - write your PID to /var/run/myapp/myapp.pid where /var/run/myapp/ is chown

Re: non-root process and PID files

2003-11-13 Thread Jos Backus
On Thu, Nov 13, 2003 at 02:45:18AM -0800, Terry Lambert wrote: Why use pid files at all if you could be using a process supervisor instead? Who supervises the supervisor? Heh. The supervisor should be small and robust, like init. Has init died on you recently? Do you want to solve this

Re: non-root process and PID files

2003-11-11 Thread Jos Backus
On Mon, Oct 27, 2003 at 10:31:18AM -0500, Dan Langille wrote: If a process starts up and does a setuid, should it be writing the PID file before or after the setuid? Two methods exists AFAIK: 1 - write your PID immediately, and the file is chown root:wheel 2 - write your PID to

Re: non-root process and PID files

2003-11-11 Thread Andrew J Caines
On Mon, Oct 27, 2003 at 10:31:18AM -0500, Dan Langille wrote: If a process starts up and does a setuid, should it be writing the PID file before or after the setuid? After of course, since to do so before is using UID 0 to solve the wrong problem and creates the removal problem. Any

Re: non-root process and PID files

2003-10-31 Thread Terry Lambert
Nielsen wrote: Christopher Vance wrote: May I suggest a different feature: the ability to mark an open file (not just its fd) 'remove on close', with permission checked at mark time rather than close time (this status forgotten if not permitted when set) and the unlink actually done at

Re: non-root process and PID files

2003-10-30 Thread Terry Lambert
Christopher Vance wrote: You can already mark a fd 'close on exec'. May I suggest a different feature: the ability to mark an open file (not just its fd) 'remove on close', with permission checked at mark time rather than close time (this status forgotten if not permitted when set) and the

Re: non-root process and PID files

2003-10-30 Thread Christopher Vance
On Thu, Oct 30, 2003 at 03:45:24AM -0800, Terry Lambert wrote: Christopher Vance wrote: You can already mark a fd 'close on exec'. May I suggest a different feature: the ability to mark an open file (not just its fd) 'remove on close', with permission checked at mark time rather than close time

Re: non-root process and PID files

2003-10-30 Thread Nielsen
Christopher Vance wrote: May I suggest a different feature: the ability to mark an open file (not just its fd) 'remove on close', with permission checked at mark time rather than close time (this status forgotten if not permitted when set) and the unlink actually done at close time only if the

Re: non-root process and PID files

2003-10-29 Thread Christopher Vance
On Mon, Oct 27, 2003 at 10:31:18AM -0500, Dan Langille wrote: If a process starts up and does a setuid, should it be writing the PID file before or after the setuid? Two methods exists AFAIK: 1 - write your PID immediately, and the file is chown root:wheel 2 - write your PID to

Re: non-root process and PID files

2003-10-28 Thread Terry Lambert
Leo Bicknell wrote: Dan Langille wrote: Any suggestions? Here's a slightly backwards concept. We're all familar with how you can open a file, remove it from the directory, and not have it go away until the application closes it. Well, extend those semantics to the namespace. That

non-root process and PID files

2003-10-27 Thread Dan Langille
If a process starts up and does a setuid, should it be writing the PID file before or after the setuid? Two methods exists AFAIK: 1 - write your PID immediately, and the file is chown root:wheel 2 - write your PID to /var/run/myapp/myapp.pid where /var/run/myapp/ is chown myapp:myapp Of

Re: non-root process and PID files

2003-10-27 Thread Miguel Mendez
Dixitur illum Dan Langille [EMAIL PROTECTED] scribere... Hi, If a process starts up and does a setuid, should it be writing the PID file before or after the setuid? Two methods exists AFAIK: 1 - write your PID immediately, and the file is chown root:wheel OpenBSD seems to favor this

Re: non-root process and PID files

2003-10-27 Thread Oliver Eikemeier
Dan Langille wrote: If a process starts up and does a setuid, should it be writing the PID file before or after the setuid? Two methods exists AFAIK: 1 - write your PID immediately, and the file is chown root:wheel 2 - write your PID to /var/run/myapp/myapp.pid where /var/run/myapp/ is

Re: non-root process and PID files

2003-10-27 Thread Dan Langille
On 27 Oct 2003 at 17:39, Oliver Eikemeier wrote: Dan Langille wrote: If a process starts up and does a setuid, should it be writing the PID file before or after the setuid? Two methods exists AFAIK: 1 - write your PID immediately, and the file is chown root:wheel 2 - write

Re: non-root process and PID files

2003-10-27 Thread Leo Bicknell
In a message written on Mon, Oct 27, 2003 at 10:31:18AM -0500, Dan Langille wrote: Any suggestions? Here's a slightly backwards concept. We're all familar with how you can open a file, remove it from the directory, and not have it go away until the application closes it. Well, extend those

Re: non-root process and PID files

2003-10-27 Thread Wes Peters
On Monday 27 October 2003 07:31 am, Dan Langille wrote: If a process starts up and does a setuid, should it be writing the PID file before or after the setuid? Two methods exists AFAIK: 1 - write your PID immediately, and the file is chown root:wheel 2 - write your PID to

Re: non-root process and PID files

2003-10-27 Thread Dan Langille
On Mon, 27 Oct 2003, Wes Peters wrote: On Monday 27 October 2003 07:31 am, Dan Langille wrote: If a process starts up and does a setuid, should it be writing the PID file before or after the setuid? Two methods exists AFAIK: 1 - write your PID immediately, and the file is chown

Re: non-root process and PID files

2003-10-27 Thread Wes Peters
On Monday 27 October 2003 12:42 pm, Dan Langille wrote: On Mon, 27 Oct 2003, Wes Peters wrote: On Monday 27 October 2003 07:31 am, Dan Langille wrote: If a process starts up and does a setuid, should it be writing the PID file before or after the setuid? Two methods exists AFAIK: