Note that the dump-scsh-program is not within the with-cwd. So he has a
no-op with-cwd that cd's to / and back, after which he tries to dump.
So this does look like a problem.
-bri
Rick Hanson writes:
> I'm no expert at scsh (I haven't used it in a long time), but I don't see
> a problem. You say that the pre-condition is that you don't have write
> access to '/' and then you're trying to write a file (via 'write-image')
> into '/'? If so, it seems that scsh is working OK, by telling you that
> you don't have permission to do this. Am I missing some other info?
> --Rick
>
> > This is 0.6.6.
> >
> > Make this executable, make sure you don't have write access to /, then
> > execute it with no arguments.
> >
> > #!/usr/local/bin/scsh \
> > -e compile -s
> > !#
> >
> > (define (compile args)
> > (with-cwd "/" 0)
> > (dump-scsh-program main "plop"))
> >
> > (define (main args)
> > 'nada)
> >
> > I see
> >
> > Error: exception
> > cannot-open-channel
> > (write-image 13 "plop" '#{Procedure 3927 (unnamed in
> > usual-resumer
> > in usual-resumer)} "Scsh 0.6" "Permission denied")
> >
> > But comment out the 'with-cwd' form, and it works.
> >
> > Why is this happening?
> >
> > --
> > There is such a thing as American-ness. ... [H]ackers ... come
> > closest of any group I know to embodying it. Closer, probably, than
> > the men running our government.
> > -- Paul Graham
> >
> >
> >
>
>
> --
> --Rick
> Rick Hanson
> -------------------------------------
> echo Mhbqnrnes Stbjr | tr [a-y] [b-z]
>
|