Alexey Zelkin wrote:
> 
> IMHO, it would be nice to have password protected loader(8) (like linux lilo)
> or just ACLs for loader(8)'s "more" command (like unavailable for viewing
> files)

cat >/boot/passwd.4th <<EOF
: password s" xyzzy" ;
: bell 7 emit ;
: getpasswd  { addr len | ptr -- ptr }
  0 to ptr
  0 to flag
  begin
    key
    dup 13 = if exit then
    dup 8 = if
      ptr 0 = if bell else ptr 1 - to ptr ( 8 ) emit bl emit 8 emit
then
    else
      ptr len < if
        addr ptr + c!
      else
        drop
      then
      ptr 1 + to ptr
      [char] * emit
    then
  0 until
;
create passbuf 20 allot
: askpasswd
  ." password: "
  passbuf 20 getpasswd
  passbuf swap password compare 0=
  if exit then
  0 reboot
;
autoboot
askpasswd
EOF
echo "include /boot/passwd.4th" >> /boot/loader.rc

Say... does LILO have a scripting language?

--
Daniel C. Sobral                        (8-DCS)
[EMAIL PROTECTED]
[EMAIL PROTECTED]

        What y'all wanna do?
        Wanna be hackers? Code crackers? Slackers
        Wastin' time with all the chatroom yakkers?


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to