With this change, the settings for all 9 possible hardening options are remembered when re-entering this menu.
This is for PR #236410.
Differential D41250
hardening: remember the answers to each item khorben_defora.org on Jul 31 2023, 5:46 PM. Authored by Tags None Referenced Files
Details With this change, the settings for all 9 possible hardening options are remembered when re-entering this menu. This is for PR #236410. I have created a stand-alone copy of usr.sbin/bsdinstall, slightly modified in order to allow local testing without requiring a new installation image for every change. $ git clone --branch khorben/hardening-questions https://github.com/khorben/bsdinstall.git $ cd bsdinstall $ less README.md [...] $ cat > test.sh << EOF #!/bin/sh BSDINSTALLDIR="\$PWD" DESTDIR="\$BSDINSTALLDIR/destdir" BSDINSTALL_DISTDIR="\$DESTDIR/usr/freebsd-dist"; export BSDINSTALL_DISTDIR SRCDIR="/usr/src" TMPDIR="\$(mktemp -d)"; export TMPDIR for target in "\$@"; do BSDCFG_SHARE="\$SRCDIR/usr.sbin/bsdconfig/share" \ BSDINSTALL_CHROOT="\$DESTDIR" \ BSDINSTALL_CONFIGCURRENT="yes" \ BSDINSTALL_SCRIPTS="\$BSDINSTALLDIR/scripts" \ LOCAL_DISTRIBUTIONS="base.txz kernel.txz lib32.txz" \ DISTRIBUTIONS="lib32-dbg.txz" \ ./bsdinstall "\$target" done EOF $ sh test.sh hardening hardening hardening hardening [select any item, confirm, deselect any item, confirm, repeat]
Diff Detail
Event TimelineComment Actions Another improvement would be to add a "Cancel" button to this step, and keep the settings as they were before entering the dialog. Comment Actions FYI: D40142 I do not know what the hesitation is there, but I know several people would prefer to see this menu disappear completely. Comment Actions With this additional change, the previous settings for all 9 possible hardening options are restored when canceling this menu. Comment Actions Thanks, I wasn't aware of this proposal. I can probably improve this patch some more, so that the default settings from the current installation are reflected. Comment Actions Phabricator tip, please generate patches with -U999999 to include full context -- see https://wiki.freebsd.org/Phabricator -- or use arc. Comment Actions This is more difficult to implement than I thought: at this stage of bsdinstall, the etc/rc.conf, etc/syslog.conf, etc/ttys, boot/loader.conf do not exist and will really be created by bsdinstall's "config" step. Therefore unless it is redesigned, the default settings should be hard-coded in bsdinstall anyway, regardless of their respective values in the base system. Comment Actions Thanks; this is now ready to merge from https://github.com/khorben/freebsd-src/tree/khorben/bsdinstall. |