#
35399f68 |
| 16-Aug-2024 |
Simon J. Gerraty <sjg@FreeBSD.org> |
safe_dot check file is a file
Since we are being paranoid, check that each arg to safe_dot is actually a file as well as non-empty.
Check for white-space in filenames - these require special handli
safe_dot check file is a file
Since we are being paranoid, check that each arg to safe_dot is actually a file as well as non-empty.
Check for white-space in filenames - these require special handling.
show more ...
|
#
82cb2a41 |
| 16-Aug-2024 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Update safe_eval.sh to support --export
This update allows
safe_dot --export file ...
to export any variables that get set.
Reviewed by: obrien
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
b75bb996 |
| 12-Feb-2024 |
Simon J. Gerraty <sjg@FreeBSD.org> |
rc.subr add Exists so we can find sed
SED=`Exists -x /usr/bin/sed /rescue/sed`
avoids adding /rescure to $PATH, and allows use of sed before /usr is mounted (if a separate filesystem).
Reviewed by
rc.subr add Exists so we can find sed
SED=`Exists -x /usr/bin/sed /rescue/sed`
avoids adding /rescure to $PATH, and allows use of sed before /usr is mounted (if a separate filesystem).
Reviewed by: jlduran_gmail.com Differential Revision: https://reviews.freebsd.org/D43826
show more ...
|
#
aa3b7a2f |
| 09-Feb-2024 |
Simon J. Gerraty <sjg@FreeBSD.org> |
/etc/rc add trace debug and verify
Debugging boot issues can be helped by logging each rc.d script as it is run and being able to selectively enable/disable set -x debug.sh provides an elaborate fra
/etc/rc add trace debug and verify
Debugging boot issues can be helped by logging each rc.d script as it is run and being able to selectively enable/disable set -x debug.sh provides an elaborate framework for debugging shell scripts.
For secure systems, we want to be paranoid about what we read during boot.
dot() simply reads (.) arg file if it exists vdot() if mac_veriexec is active, ignore unverified files otherwise behaves much the same as dot() safe_dot() in safe_eval.sh allows reading an untrusted file; limiting the input to simple variable assignments.
In load_rc_config allow caller to provide an option to indicate how to handle its arg: -v use vdot() -s use sdot() which will try to use vdot() and fallback to safe_dot() The default is to read using dot()
rc_run_scripts() encapsulate the running of rc.d scripts so that we can easily call it more than twice.
We vdot local.rc.subr to pick up extensions (like run_rc_scripts_final) and overrides.
We also allow rc.subr.local or rc.conf to set rc_config_xtra eg (rc_config_xtra=XXX for historic compatibility)
rc use set -o verify around the reading in of rc.subr This has no effect if mac_veriexec is not active, but if it is; ensures rc.subr has not been tampered with.
Reviewed by: imp Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43671
show more ...
|