On Wed, Mar 21, 2012 at 04:40:32PM +0100, Tom Petri wrote:
> > I just did a fresh gentoo install (configuration) and proceeded with
> > the instructions from the gentoo hardened documentation.
> > After compiling re-emerging world the system doesn't get up. I'm able
> > to ping it but udev seems to have problems as /dev/console and the
> > tty's aren't found:
> > /etc/init.d/sshd: ERROR: sshd failed to start
> > /etc/init.d/urandom: ERROR: urandom failed to start
> > init: open(/dev/console): No such file or directory
> > agetty: /dev/tty2: not a character device
> > agetty: /dev/tty1: not a character device
> > My mdadm RAID is recognized properly, in case it matters.
You aren't by any chance using an initramfs, are you?
> The udev from the hardened documentation seems to be the problem (udev
> /dev tmpfs rw,rootcontext=system_u:object_r:device_t,seclabel,nosuid,relatime,size=10m,mode=755
> 0 0).
> The systems boots without this entry, however `sestatus` says "disabled".
Is SELinux indeed disabled, or does it only "look" like so?
An easy way to test is when you run in strict policy (or mcs/mls without
unconfined domains) and you're in the sysadm_t domain. Then try reading
hpl ~ # id
hpl ~ # cat /etc/shadow
cat: /etc/shadow: Permission denied