Gentoo Archives: gentoo-dev

From: Fabian Groffen <grobian@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Testing to see if services have crashed on hardened
Date: Tue, 25 Mar 2008 19:46:09
Message-Id: 20080325194526.GT831@gentoo.org
In Reply to: Re: [gentoo-dev] Testing to see if services have crashed on hardened by Roy Marples
1 On 21-03-2008 12:07:24 +0000, Roy Marples wrote:
2 > On Friday 21 March 2008 10:37:11 Fabian Groffen wrote:
3 > > Assuming you would use libkvm, on Darwin this means as unprivileged user
4 > > (not using suid) you can't see any processes at all.
5 >
6 > That's different from FreeBSD and NetBSD then.
7
8 Indeed. And I just found out that Leopard (10.5) dropped the entire kvm
9 which wasn't working to funky anyway. I just made some implementation
10 of walking through all running processes for portage-utils' `qlop -c`
11 using sysctl calls -- the way to do it on Darwin, and that works even as
12 normal unprivileged user, so I guess we can just use that.
13
14 > > Is there a way to just have some fallback method which is less
15 > > functional, but just uses some pid file with a lock or something?
16 >
17 > Not all services use pidfiles. Also, some services re-fork and re-write their
18 > pidfiles and I'm not sure the lock would carry across in that instance.
19
20 I was thinking of a wrapping process, but I only later realised that
21 this isn't working since many/most daemons fork into the background, so
22 you loose the control over it anyway.
23
24
25 --
26 Fabian Groffen
27 Gentoo on a different level
28 --
29 gentoo-dev@l.g.o mailing list