enabling security

Mitch Bradley wmb at laptop.org
Mon Mar 9 13:38:34 EDT 2009


Rodolfo D. Arce S. wrote:
> The serial number was correct, so that wasn't the issue.
>
> I tryed the patch that you sended and worked perfectly..
>
> would you be so kind as to explain what it did, i'm not so good with 
> forth (yet), or perhaps if you could tell where to read about it

The patch works around a bug in the new enable-security confirmation 
code, which obviously didn't get tested very well (or perhaps at all; my 
excuse is that this requirement appeared out of the blue while I was 
going crazy with another task).

As background, you can look at the implementation of "enable-security" 
by typing:

  ok see enable-security

The problem is that the word "-null" should appear just before 
"safe-parse-word".  The patch corrects that.  Here's how the patch works:

  ok : nx -null safe-parse-word ;

": nx" creates a new word (Forth commands are called "words") named 
"nx".  The actual name isn't important; I just pulled the name "nx" out 
of the air.  The behavior of the new word "nx" is to call the existing 
words "-null" and then "safe-parse-word".  The ";" terminates the 
definition of the new word.

  ok patch nx safe-parse-word enable-security

The "patch" command substitutes "nx" for the existing call to 
"safe-parse-word" inside the existing word "enable-security".  So after 
you do the patch, if you say "see enable-security", you would see a call 
to "nx" where the call to "safe-parse-word" used to be.

Since "nx" calls "-null" and then calls "safe-parse-word", the desired 
effect of "inserting" the missing "-null" into the existing definition 
is accomplished.

For a tutorial on Forth and the many things it can do, see 
http://wiki.laptop.org/go/Forth_Lessons .

>
> greetings.. R
>
> On Mon, Mar 9, 2009 at 1:01 PM, Mitch Bradley <wmb at laptop.org 
> <mailto:wmb at laptop.org>> wrote:
>
>     Rodolfo D. Arce S. wrote:
>
>         It gives a "Confirmation code mismatch" error..
>
>         i've tryed with lower and upper case, just to make sure..
>
>         ok enable-security SHC836023B0
>         Confirmation code mismatch
>         ok enable-security shc836023b0
>         Confirmation code mismatch
>
>
>     Type:
>
>      ok .mfg-data
>
>     and make sure that the SN is the same as what you typed.
>
>     If it still doesn't work, try this patch:
>
>      ok : nx -null safe-parse-word ;
>      ok patch nx safe-parse-word enable-security
>      ok enable-security SHC836023B0
>
>
>
>
>         On Mon, Mar 9, 2009 at 12:37 PM, Mitch Bradley <wmb at laptop.org
>         <mailto:wmb at laptop.org> <mailto:wmb at laptop.org
>         <mailto:wmb at laptop.org>>> wrote:
>
>
>                I'm working for the paraguayian deployment, and while
>         testing
>                i got the
>                security of a laptop disabled, but i can seem to enable
>         it again
>
>                to disable:
>                i got a developer key, and on the "ok" prompt, i typed
>                "disable-security"
>                it all worked just fine, i did all that i wanted to do
>
>                to enable:
>                i get to the "ok" prompt and type "enable-security" but it
>                gives me an error
>                "Unexpected end-of-line"
>                and security is still disabled
>
>                is there a step that i'm missing? o perhaps a parameter
>         that i
>                should be
>                giving at the prompt?
>                
>
>            Yes, you now have to type the serial number as
>         confirmation, for
>            example:
>
>             ok enable-security SHF73300042
>
>            Since we are moving to "security is off by default" , we
>         added the
>            serial number argument to make it harder for children to do
>            something that would make their machine stop working.
>
>
>
>




More information about the Devel mailing list