Bug#403863: [Pkg-sysvinit-devel] Bug#403863: Bug#403863: chkrootkit and false positive dot-files

2009-01-31 Thread Henrique de Moraes Holschuh
On Fri, 30 Jan 2009, Petter Reinholdtsen wrote:
 [Henrique de Moraes Holschuh]
  Err, how can it NOT be safe to write there?
 
 If something try to write there before /etc/rcS.d/S02mountkernfs.sh
 has executed, it will not be possible to write to /lib/init/rw/.

There shouldn't EXIST a non-writeable /lib/init/rw.  But since POSIX
is broken and the only way to have that would be to create the
mountpoint on-the-fly (which we cannot do, / would be RO at that
point)...

  What would be an example of expected use of that marker?  I don't
  get it, either.
 
 Here is an example:
 
   if [ -f /lib/init/rw/.ramfs ] ; 
  do_stuff_needing_initrw
   else
  echo Unable to do stuff, because /lib/init/rw/ is not yet writable
   fi

Is there a reason for this?  Do we have any users?  This would do just
as well:

do_stuff_needing_initrw || {
echo Failed to do stuff, maybe /lib/init/rw/ is  \
 not writeable?
exit 1
}

Anyway, since we now have /etc/init.d/.depend* and it is clear we'll
have more and more .crap in system directories from now on, I have
decided to give it up as a waste of effort.

 Kernel event handlers called from udev (when udev is started in the
 initrd) could find it useful to know if /lib/init/rw/ is writable or
 not. :)

This is why I think the whole initrd concept is broken, people do
things halfway instead of accepting the entire broad range of pain
they deserve for putting so much crap on the initrd.

After all, every time you have anything added to the initrd, it is
something else that will not get updated when it should.  It is
getting bad do the point that I am seriously considering regenerating
the initrd on shutdown.

If we need init/rw support in the initrd, it should be done right.  It
should create the initrd init/rw, and when it is finished and ready to
pivot-root, it should move it to its new place on top of the new /.
Yes, it is complex and a hassle, but it can be done.

But if you think about exactly WHAT /lib/init/rw is supposed to be
in the first place, it makes a lot of sense to create it as early as
possible, and that would be the initrd in systems that don't have the
luck of being initrd-less.

-- 
  One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie. -- The Silicon Valley Tarot
  Henrique Holschuh



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#403863: [Pkg-sysvinit-devel] Bug#403863: Bug#403863: chkrootkit and false positive dot-files

2009-01-30 Thread Henrique de Moraes Holschuh
On Sun, 25 Jan 2009, Petter Reinholdtsen wrote:
 The file is created to make sure programs and scripts starting very
 early in the boot can know if it is possible and safe to write to
 /lib/init/rw/.  Not much is using it yet, but I believe that area
 might be key to solving the problems associated with the event based
 kernel very early in the boot.

Err, how can it NOT be safe to write there?  And you get immediate feedback
if the system is completely and utterly broken and the write fails,
anyway...

What would be an example of expected use of that marker?  I don't get it,
either.

-- 
  One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie. -- The Silicon Valley Tarot
  Henrique Holschuh



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org