bug-gv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gv] error opening files on other directories


From: jemarch
Subject: Re: [Bug-gv] error opening files on other directories
Date: Mon, 15 Nov 2004 14:10:10 +0100

    
    > It is possible to tell gs to accept non-trivial paths while remaining
    > "safe"? Is the safe/unsafe state monolithic?
    
    I think safer is monolithic. From the manual:
    
    -dSAFER: Disables the deletefile and renamefile operators, and the ability 
to
    open piped commands (%pipe%cmd) at all. Only %stdout and %stderr can be 
opened
    for writing.  Disables reading of files other than %stdin, those given as a
    command line argument, or those contained on one of the paths given by 
LIBPATH
    and FONTPATH and specified by the system params /FontResourceDir and
    /GenericResourceDir.
    
    jemarch wrote on 
https://savannah.gnu.org/bugs/?func=detailitem&item_id=10992:
    > I would suggest to translate this discussion (and other bug related
    > discussions) to address@hidden I think bug tracker follow-up comments 
should
    > be used only in case of a change of the bug state.  Do you all agree?
    
    I have seen the bug tracker follow-up been used for discussion on several
    projects, but I don't mind using the mailing list - here I go:

Thanks.
    
    Just some more comments:
    > gs -dSAFER ../test/grfguide.pdf
    is OK.
    > ./gv ../test/grfguide.pdf
    isn't OK, while
    > ./gv ../test/grfguide.ps
    is OK. (Assuming "safer" is set in gv of course.) Is there any difference in
    how we treat pdf vs. ps files?

No difference. If the file is pdf, then gv launch a gv interpreter to
run `pdf2dsc.ps' in order to generate the dsc file.

The dsc add some stub postscript code and include the pdf. So if we
trust pdf2dsc.ps (why dont do that?) then it is safe to not include
-DSAFER on pdf2dsc.ps execution. This assumes that the pdf is also
safe, which will always be due to the static nature of the PDF
format. 

Please note the gs interpreter used to build the dsc (that do not work
on SAFER mode) is _not the same_ that the actual gs interpreter used
to interpret the actual ps page.
    

So i think we simply can remove the -DSAFER from the invocation for
scanning the pdf file.

    PS! jemarch: I sent a message to the list with wrong from address - just 
                 delete it.

Ok.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]