After a reboot of the system, enabling of the gradm results in this error:
- Code: Select all
[root@localhost ~]# gradm -E
Could not open /dev/grsec.
open: No such file or directory
This fix is to run the mknod command.. or in my case I like to use MAKEDEV, and I created an entry for it:
- Code: Select all
[root@localhost ~]# cat /etc/makedev.d/grsecurity
c 622 root root 1 13 1 1 grsec
For now I have the "MAKEDEV grsec" command in my rc.local file, right before "gradm -E". The device exists in /dev/ on the real fs as seen here, but udev makes it disapear:
- Code: Select all
[root@localhost ~]# mount --bind / /tmp/test/
[root@localhost ~]# ls -al /tmp/test/dev/grsec
crw-rw-rw- 1 root root 1, 13 Mar 18 14:29 /tmp/test/dev/grsec
[root@localhost ~]# ls -al /dev/grsec
ls: /dev/grsec: No such file or directory
Which is the reason why I have the MAKEDEV entry in rc.local .... to recreate it each time the system boots.
I was wondering if anyone had any ideas how to get the creation of /dev/grsec to happen when udev is started on system boot, so I don't need this entry in rc.local..... That way, when I make a gradm rpm, I can have it drop a file in /etc/udev/rules.d (or wherever it needs to be for this) instead of modifying rc.local inside of %post and %preun. A dirty hack around this is putting the MAKEDEV command inside the gradm init script, but I'd like to have udev handle this for me.
Thoughts appreciated.