Page MenuHomeFreeBSD

D9700.id30173.diff
No OneTemporary

D9700.id30173.diff

Index: usr.sbin/bsdinstall/scripts/config
===================================================================
--- usr.sbin/bsdinstall/scripts/config
+++ usr.sbin/bsdinstall/scripts/config
@@ -35,6 +35,11 @@
cat $BSDINSTALL_CHROOT/etc/sysctl.conf $BSDINSTALL_TMPETC/sysctl.conf.* >> $BSDINSTALL_TMPETC/sysctl.conf
rm $BSDINSTALL_TMPETC/sysctl.conf.*
+if [ -f $BSDINSTALL_TMPTEC/ttys.hardening ]; then
+ cat $BSDINSTALL_TMPTEC/ttys.hardening > $BSDINSTALL_TMPTEC/ttys
+ rm $BSDINSTALL_TMPTEC/ttys.hardening
+fi
+
cp $BSDINSTALL_TMPETC/* $BSDINSTALL_CHROOT/etc
cat $BSDINSTALL_TMPBOOT/loader.conf.* >> $BSDINSTALL_TMPBOOT/loader.conf
Index: usr.sbin/bsdinstall/scripts/hardening
===================================================================
--- usr.sbin/bsdinstall/scripts/hardening
+++ usr.sbin/bsdinstall/scripts/hardening
@@ -41,10 +41,11 @@
"2 read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-off} \
"3 proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-off} \
"4 random_pid" "Randomize the PID of newly created processes" ${random_pid:-off} \
- "5 stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-off} \
+ "5 stack_guard" "Set stack guard page ahead of the growable segments to 512" ${stack_guard:-off} \
"6 clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-off} \
"7 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \
"8 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \
+ "9 secure_console" "Enable console password prompt" ${secure_console:-off} \
2>&1 1>&3 )
exec 3>&-
@@ -65,7 +66,7 @@
echo kern.randompid=$(jot -r 1 9999) >> $BSDINSTALL_TMPETC/sysctl.conf.hardening
fi
if [ "$feature" = "stack_guard" ]; then
- echo security.bsd.stack_guard_page=1 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening
+ echo security.bsd.stack_guard_page=512 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening
fi
if [ "$feature" = "clear_tmp" ]; then
echo 'clear_tmp_enable="YES"' >> $BSDINSTALL_TMPETC/rc.conf.hardening
@@ -76,5 +77,8 @@
if [ "$feature" = "disable_sendmail" ]; then
echo 'sendmail_enable="NONE"' >> $BSDINSTALL_TMPETC/rc.conf.hardening
fi
+ if [ "$feature" = "secure_console" ]; then
+ sed "s/unknown off secure/unknown off insecure/g" $BSDINSTALL_CHROOT/etc/ttys > $BSDINSTALL_TMPETC/ttys.hardening
+ fi
done

File Metadata

Mime Type
text/plain
Expires
Tue, Mar 24, 9:44 PM (2 m, 24 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30273668
Default Alt Text
D9700.id30173.diff (2 KB)

Event Timeline