summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/config.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2003-11-29 21:44:51 +0000
committerrwatson <rwatson@FreeBSD.org>2003-11-29 21:44:51 +0000
commitf02bee695e62d94d0603bdd065d7d9b96c917238 (patch)
treed7675449c1b7dc81d6d58017ad10b69d8014bc0a /usr.sbin/sysinstall/config.c
parent946a19bc52b1d1001bcb8bd52380e1ffa8bdc52d (diff)
downloadFreeBSD-src-f02bee695e62d94d0603bdd065d7d9b96c917238.zip
FreeBSD-src-f02bee695e62d94d0603bdd065d7d9b96c917238.tar.gz
Add a Securelevel sub-menu to the Security configuration menu,
permitting the administrator to select a securelevel top operate at. Include a helpfile summarizing some of the information from init(8). This allows for explicit configuration of securelevels, which was previously implicit in Security Profile selection. Currently, there are no checkboxes for the active securelevel, because sysinstall's facilities for deriving "current settings" from rc.conf may use only one variable, not two, and I opted for the simplest approach at this point. Approved by: re (scottl)
Diffstat (limited to 'usr.sbin/sysinstall/config.c')
-rw-r--r--usr.sbin/sysinstall/config.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c
index 570cb61..27937e1 100644
--- a/usr.sbin/sysinstall/config.c
+++ b/usr.sbin/sysinstall/config.c
@@ -537,6 +537,52 @@ configOSF1(dialogMenuItem *self)
#endif
int
+configSecurelevel(dialogMenuItem *self)
+{
+ WINDOW *w = savescr();
+
+ dialog_clear_norefresh();
+ dmenuOpenSimple(&MenuSecurelevel, FALSE);
+ restorescr(w);
+ return DITEM_SUCCESS;
+}
+
+int
+configSecurelevelDisabled(dialogMenuItem *self)
+{
+
+ variable_set2("kern_securelevel_enable", "NO", 1);
+ return DITEM_SUCCESS;
+}
+
+int
+configSecurelevelSecure(dialogMenuItem *self)
+{
+
+ variable_set2("kern_securelevel_enable", "YES", 1);
+ variable_set2("kern_securelevel", "1", 1);
+ return DITEM_SUCCESS;
+}
+
+int
+configSecurelevelHighlySecure(dialogMenuItem *self)
+{
+
+ variable_set2("kern_securelevel_enable", "YES", 1);
+ variable_set2("kern_securelevel", "2", 1);
+ return DITEM_SUCCESS;
+}
+
+int
+configSecurelevelNetworkSecure(dialogMenuItem *self)
+{
+
+ variable_set2("kern_securelevel_enable", "YES", 1);
+ variable_set2("kern_securelevel", "3", 1);
+ return DITEM_SUCCESS;
+}
+
+int
configSecurity(dialogMenuItem *self)
{
WINDOW *w = savescr();
OpenPOWER on IntegriCloud