Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/sushi/system/securityconf Add a menu entry to sushi to...



details:   https://anonhg.NetBSD.org/src/rev/8fc6d5a9882e
branches:  trunk
changeset: 506858:8fc6d5a9882e
user:      garbled <garbled%NetBSD.org@localhost>
date:      Tue Mar 06 21:24:12 2001 +0000

description:
Add a menu entry to sushi to deal with editing the /etc/security.conf file.

diffstat:

 share/sushi/system/securityconf/Makefile |  10 ++++++++++
 share/sushi/system/securityconf/form     |  17 +++++++++++++++++
 share/sushi/system/securityconf/help     |   7 +++++++
 share/sushi/system/securityconf/script   |  27 +++++++++++++++++++++++++++
 share/sushi/system/securityconf/script1  |  10 ++++++++++
 share/sushi/system/securityconf/script2  |   4 ++++
 share/sushi/system/securityconf/script3  |   6 ++++++
 7 files changed, 81 insertions(+), 0 deletions(-)

diffs (109 lines):

diff -r 17d598f103cf -r 8fc6d5a9882e share/sushi/system/securityconf/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/sushi/system/securityconf/Makefile  Tue Mar 06 21:24:12 2001 +0000
@@ -0,0 +1,10 @@
+#      $NetBSD: Makefile,v 1.1 2001/03/06 21:24:12 garbled Exp $
+
+FILES= form help
+FILESDIR=${BINDIR}/sushi/system/securityconf
+SCRIPTS= script script1 script2 script3
+SCRIPTSDIR=${BINDIR}/sushi/system/securityconf
+MKOBJ= no
+
+.include "../../../Makefile.inc"
+.include <bsd.prog.mk>
diff -r 17d598f103cf -r 8fc6d5a9882e share/sushi/system/securityconf/form
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/sushi/system/securityconf/form      Tue Mar 06 21:24:12 2001 +0000
@@ -0,0 +1,17 @@
+# $NetBSD: form,v 1.1 2001/03/06 21:24:12 garbled Exp $
+script:script1,check_passwd    Check the passwd file for inconsistancies?
+script:script1,check_group     Check the group file for inconsistancies?
+script:script1,check_rootdotfiles      Check root users for sane $PATH/umask?
+script:script1,check_ftpusers  Check the ftpusers file?
+script:script1,check_aliases   Check the sendmail aliases file?
+script:script1,check_rhosts    Check for users with a '+' in .rhosts?
+script:script1,check_homes     Check ownership of home directories?
+script:script1,check_varmail   Check the ownership of /var/mail?
+script:script1,check_nfs       Check that filesystems aren't exported to world?
+script:script1,check_devices   Check for changes to devices and setuid files?
+script:script1,check_mtree     Check all system binaries?
+script:script1,check_disklabels        Backup disklabels and display changes?
+script:script1,check_changelist        Backup config files and display changes?
+script:script1,run_skeyaudit   Check for expiring S/Keys?
+iscript:2,1,99,script2,max_loginlen    Maximum permitted length of login names:
+
diff -r 17d598f103cf -r 8fc6d5a9882e share/sushi/system/securityconf/help
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/sushi/system/securityconf/help      Tue Mar 06 21:24:12 2001 +0000
@@ -0,0 +1,7 @@
+The security.conf file specifies which of the standard /etc/security
+services are performed.  The /etc/security script is run, by default,
+every night from /etc/daily, on a NetBSD system, if configured do to so
+from /etc/daily.conf. See the security.conf(5) manpage for details on the
+options. 
+
+$NetBSD: help,v 1.1 2001/03/06 21:24:12 garbled Exp $
diff -r 17d598f103cf -r 8fc6d5a9882e share/sushi/system/securityconf/script
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/sushi/system/securityconf/script    Tue Mar 06 21:24:12 2001 +0000
@@ -0,0 +1,27 @@
+#!/bin/sh
+# $NetBSD: script,v 1.1 2001/03/06 21:24:13 garbled Exp $
+. /etc/defaults/security.conf
+pwd
+CONFFILE="/etc/security.conf"
+echo -n "#Generated by sushi on " >$CONFFILE
+date >>$CONFFILE
+echo "if [ -r /etc/defaults/security.conf ]; then" >>$CONFFILE
+echo " . /etc/defaults/security.conf" >>$CONFFILE
+echo "fi" >>$CONFFILE
+a=1
+IFS="
+"
+for i in `/usr/share/sushi/system/securityconf/script3`
+do
+       ANS=$(echo `eval echo \\$${a}` | sed -e 's/ $//' | sed -e 's/^0*//')
+       if [ "$ANS" != "`eval echo \\$${i}`" ]; then
+               if [ "$ANS" = "YES" -o "$ANS" = "NO" ]; then
+                       echo "$i=$ANS" >>$CONFFILE
+               else
+                       echo "$i=\"$ANS\"" >>$CONFFILE
+               fi
+       fi
+       a=`expr $a + 1`
+done
+echo "successfully wrote a new $CONFFILE"
+cat $CONFFILE
diff -r 17d598f103cf -r 8fc6d5a9882e share/sushi/system/securityconf/script1
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/sushi/system/securityconf/script1   Tue Mar 06 21:24:12 2001 +0000
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $NetBSD: script1,v 1.1 2001/03/06 21:24:13 garbled Exp $
+. /etc/security.conf
+CONF=`eval echo \\$${1}`
+echo $CONF
+if [ "$CONF" = "YES" ]; then
+       echo "NO"
+else
+       echo "YES"
+fi
diff -r 17d598f103cf -r 8fc6d5a9882e share/sushi/system/securityconf/script2
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/sushi/system/securityconf/script2   Tue Mar 06 21:24:12 2001 +0000
@@ -0,0 +1,4 @@
+#!/bin/sh
+# $NetBSD: script2,v 1.1 2001/03/06 21:24:13 garbled Exp $
+. /etc/security.conf
+echo `eval echo \\$${1}` | sed -e 's/^0*//'
diff -r 17d598f103cf -r 8fc6d5a9882e share/sushi/system/securityconf/script3
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/sushi/system/securityconf/script3   Tue Mar 06 21:24:12 2001 +0000
@@ -0,0 +1,6 @@
+#!/bin/sh
+# $NetBSD: script3,v 1.1 2001/03/06 21:24:13 garbled Exp $
+sh -x /etc/defaults/security.conf 2>&1 | sed -e 's/^+ //' | \
+       sed -e 's/\([EN][SO]\) /\1\
+/' | sed -e 's/=.*//'
+# the newline above is there for a reason



Home | Main Index | Thread Index | Old Index