Gentoo Archives: gentoo-hardened

From: Ow Mun Heng <Ow.Mun.Heng@×××.com>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] Grsec and shutdown (unable to umount / ) - Problem with Cron and PS
Date: Mon, 13 Feb 2006 05:51:04
Message-Id: 1139809727.31321.15.camel@neuromancer.home.net
In Reply to: Re: [gentoo-hardened] Grsec and shutdown (unable to umount / ) by andrewg@felinemenace.org
1 On Tue, 2006-02-07 at 11:31 +0000, andrewg@××××××××××××.org wrote:
2 > > > >
3 > > > > I just want to verify if there is anyone here who also suffers this and
4 > > > > what are the proper/needed steps to avoid this? (it's really painful to
5 > > > > have to remember this and do a gradm -D each time)
6 > > > >
7 > > >
8
9 Digging deeper, I found that the system would _be_ able to shutdown when
10 it has just been rebooted and a user's cron script has not started
11 executing.
12
13 When the cron script has been executed, it will refuse to shutdown
14 cleanly and I end up having error messages thrown at me.
15
16 "/ is busy, unable to unmount"
17 /usr etc...etc..
18
19 What does the script do?
20
21 User = ipaudit
22 Cron = Runs a monitoring script (ipaudit - see freshmeat) for 30
23 minutes. At each 30 minutes, it will do a "kill -2 script.pid". Upon
24 which it will exit and then process the resulting data.
25
26 The problem here is that, as "user" he can't view it's own processes.
27 Meaning, with grsec enabled and with PS listing restricted, it will only
28 be able to see the parent process, (which is correct, but killing the
29 parent process will not stop the data collection and continue
30 processing.
31
32 As a means to sidestep this, I found out that one can actually pass a -2
33 signal to the process since there's a process id logged. (user can't see
34 this process, but has access to it if he knows the pid)
35
36 After doing that, then the system refuses to shutdown cleanly.
37
38
39
40
41 --
42 Ow Mun Heng
43 Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
44 98% Microsoft(tm) Free!!
45 Neuromancer 13:48:46 up 1:36, 2 users, load average: 0.64, 1.02, 1.06
46
47
48 --
49 gentoo-hardened@g.o mailing list