[tex-k] xdvi 22.40i status
Stefan Ulrich
stefan.ulrich@elexir.de
Thu, 11 Apr 2002 13:41:08 +0200
M Shell <mshell@ece.gatech.edu> writes:
> I may be wrong about this, but my current understanding is that
> later versions of gs will *default* to -dSAFER. i.e., if we don't
> put anything on the command line, then -dSAFER will be implied.
It doesn't with my version of 7.20:
$ echo "(fig.eps)run" | /usr/local/bin/gs-7.20
AFPL Ghostscript DEVELOPMENT RELEASE 7.20 (2002-04-03)
Copyright (C) 2002 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>Loading NimbusSanL-Regu font from /usr/share/fonts/default/Type1/n019003l.pfb... 1918732 603353 1723412 421771 0 done.
>>showpage, press <return> to continue<<
GS>
So it works OK; but with -dSAFER:
echo "(fig.eps)run" | /usr/local/bin/gs-7.20 -dSAFER
AFPL Ghostscript DEVELOPMENT RELEASE 7.20 (2002-04-03)
Copyright (C) 2002 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>Error: /invalidfileaccess in --file--
Operand stack:
(fig.eps) (r)
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- %loop_continue 2 3 %oparray_pop --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 1 3 %oparray_pop --nostringval-- --nostringval-- --nostringval--
Dictionary stack:
--dict:1025/1123(ro)(G)-- --dict:0/20(G)-- --dict:67/200(L)--
Current allocation mode is local
Current file position is 13
GS<1>
> So for gs 7.04 and earlier, xdvi should call it with -dSAFER,
> but for later versions of gs, xdvi should call gs without
> any security options.
> In *both* cases gs would run (write) securely and still be able
> to gain the needed file read access.
Hmm, in my understanding, running gs-7.20 with -dSAFER will
*dis*allow all reads/writes (as demonstrated by the example
above), but running it with no argument or -dNOSAFER will allow
*all* reads and writes, as demonstrated by the following:
$ ls -l fig.eps
-rw-r--r-- 1 ulrich elexir 15585 Apr 10 19:22 fig.eps
$ echo "(fig.eps)run (fig.eps)deletefile" | /usr/local/bin/gs-7.20
AFPL Ghostscript DEVELOPMENT RELEASE 7.20 (2002-04-03)
Copyright (C) 2002 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>Loading NimbusSanL-Regu font from /usr/share/fonts/default/Type1/n019003l.pfb... 1918732 603353 1723412 421791 0 done.
>>showpage, press <return> to continue<<
GS>
$ ls -l fig.eps
ls: fig.eps: No such file or directory
Can anyone else confirm this? If my installation isn't utterly
broken, I guess this shows the problem at hand quite well.
> What they really need to do is to make the "new" -dSAFER do
> nothing (as its use is already implied)
I think they just should keep the old meaning of -dSAFER ...
> , and keep
> -dPARANOIDSAFER as it is now.
... agreed.
> That way xdvi could always call -dSAFER and still have the
> needed read access - regardless of the gs version.
Right - just as it is now.
> PS: If you agree with this and/or have a better suggestion,
> we can try to put a post in their gs-developer forum.
OK, we could do this. I'll just need to subscribe there ...
--
Stefan Ulrich