diff options
author | dcs <dcs@FreeBSD.org> | 1999-11-24 17:56:40 +0000 |
---|---|---|
committer | dcs <dcs@FreeBSD.org> | 1999-11-24 17:56:40 +0000 |
commit | ce28d94ec38e678631dbb3161f2deb3d431fbd5e (patch) | |
tree | 89cd9d690ac6e07724965a2a06e035f25820bc72 /sys/boot/forth/loader.4th | |
parent | 0d4772950384cf33bceec6d859d365ffd7e9c8d5 (diff) | |
download | FreeBSD-src-ce28d94ec38e678631dbb3161f2deb3d431fbd5e.zip FreeBSD-src-ce28d94ec38e678631dbb3161f2deb3d431fbd5e.tar.gz |
Add silly password feature. If people want to depend on a flawed
security measures, so be it. It costs us almost nothing.
Document some code in support.4th that I was unable to understand
just by reading.
Diffstat (limited to 'sys/boot/forth/loader.4th')
-rw-r--r-- | sys/boot/forth/loader.4th | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/boot/forth/loader.4th b/sys/boot/forth/loader.4th index 9f40cb2..132633a 100644 --- a/sys/boot/forth/loader.4th +++ b/sys/boot/forth/loader.4th @@ -38,6 +38,30 @@ only forth definitions also support-functions 0 autoboot ; +\ ***** check-password +\ +\ If a password was defined, execute autoboot and ask for +\ password if autoboot returns. + +: check-password + password .addr @ if + 0 autoboot + false >r + begin + bell emit bell emit + ." Password: " + password .len @ read-password + dup password .len @ = if + 2dup password .addr @ password .len @ + compare 0= if r> drop true >r then + then + drop free drop + r@ + until + r> drop + then +; + \ ***** start \ \ Initializes support.4th global variables, sets loader_conf_files, |