diff options
author | jkoshy <jkoshy@FreeBSD.org> | 1998-06-22 06:34:12 +0000 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 1998-06-22 06:34:12 +0000 |
commit | 3d7fcf97cdf25a8c437613fff6bbe17d3439ee6e (patch) | |
tree | 49ad5b65adea18d864791930f226be191fa26c1e /etc/rc | |
parent | c84e4b475904075d895db8d4dccbf79a1a55fc8a (diff) | |
download | FreeBSD-src-3d7fcf97cdf25a8c437613fff6bbe17d3439ee6e.zip FreeBSD-src-3d7fcf97cdf25a8c437613fff6bbe17d3439ee6e.tar.gz |
Add rc.conf option to set kernel security level and modify "/etc/rc" to
use this.
Requested by: max, andreas
Note: This change just provides a convenient way to exercise existing
functionality. Whether `kern.securelevel' is effective in increasing
system security is another issue, and one that has been well thrashed
out in the lists.
Diffstat (limited to 'etc/rc')
-rw-r--r-- | etc/rc | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,5 @@ #!/bin/sh -# $Id: rc,v 1.144 1998/05/26 20:12:45 sos Exp $ +# $Id: rc,v 1.145 1998/06/02 11:02:16 phk Exp $ # From: @(#)rc 5.27 (Berkeley) 6/5/91 # System startup script run by init on autoboot @@ -316,5 +316,13 @@ fi # Do traditional (but rather obsolete) rc.local file if it exists. [ -f /etc/rc.local ] && sh /etc/rc.local +# Raise kernel security level. This should be done only after `fsck' has +# repaired local file systems if you want the securelevel to be greater than 1. +if [ "X${kern_securelevel_enable}" != X"NO" -a "${kern_securelevel}" -ge 0 ]; +then + echo 'Raising kernel security level' + sysctl -w kern.securelevel=${kern_securelevel} +fi + date exit 0 |