check-password.4th (280384) | check-password.4th (280924) |
---|---|
1\ Copyright (c) 2006-2015 Devin Teske <dteske@FreeBSD.org> 2\ All rights reserved. 3\ 4\ Redistribution and use in source and binary forms, with or without 5\ modification, are permitted provided that the following conditions 6\ are met: 7\ 1. Redistributions of source code must retain the above copyright 8\ notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23\ SUCH DAMAGE. 24\ | 1\ Copyright (c) 2006-2015 Devin Teske <dteske@FreeBSD.org> 2\ All rights reserved. 3\ 4\ Redistribution and use in source and binary forms, with or without 5\ modification, are permitted provided that the following conditions 6\ are met: 7\ 1. Redistributions of source code must retain the above copyright 8\ notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23\ SUCH DAMAGE. 24\ |
25\ $FreeBSD: head/sys/boot/forth/check-password.4th 280384 2015-03-23 16:43:46Z dteske $ | 25\ $FreeBSD: head/sys/boot/forth/check-password.4th 280924 2015-03-31 22:32:35Z dteske $ |
26 27marker task-check-password.4th 28 29include /boot/screen.4th 30 3113 constant enter_key \ The decimal ASCII value for Enter key 328 constant bs_key \ The decimal ASCII value for Backspace key 3321 constant ctrl_u \ The decimal ASCII value for Ctrl-U sequence --- 107 unchanged lines hidden (view full) --- 141 0 autoboot 142 143 \ Only reached if autoboot fails for any reason (including if/when 144 \ the user aborts/escapes the countdown sequence leading to boot). 145 146 s" password" getenv dup readmax > if drop readmax then 147 begin 148 s" Password: " read ( prompt -- ) | 26 27marker task-check-password.4th 28 29include /boot/screen.4th 30 3113 constant enter_key \ The decimal ASCII value for Enter key 328 constant bs_key \ The decimal ASCII value for Backspace key 3321 constant ctrl_u \ The decimal ASCII value for Ctrl-U sequence --- 107 unchanged lines hidden (view full) --- 141 0 autoboot 142 143 \ Only reached if autoboot fails for any reason (including if/when 144 \ the user aborts/escapes the countdown sequence leading to boot). 145 146 s" password" getenv dup readmax > if drop readmax then 147 begin 148 s" Password: " read ( prompt -- ) |
149 2dup readval readlen @ compare 0= if 150 2drop exit \ Correct password | 149 2dup readval readlen @ compare 0= if \ Correct password? 150 2drop exit |
151 then 152 3000 ms ." loader: incorrect password" 10 emit 153 again 154; | 151 then 152 3000 ms ." loader: incorrect password" 10 emit 153 again 154; |