[gs-bugs] [Bug 691350] gs_init.ps tried in current dir despite -P-

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Thu Jul 8 07:04:49 UTC 2010


Dr. Werner Fink <werner at suse.de> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #11 from Dr. Werner Fink <werner at suse.de> 2010-07-08 07:04:47 UTC ---
(In reply to comment #9)
> Created an attachment (id=6441)
 --> (http://bugs.ghostscript.com/attachment.cgi?id=6441) [details]
> patch
> Don't search for initialization files in the current directory first
> by default because this leads to well-known security and confusion problems.
> Do this only on the user's request by -P switch. Also revert rev. 11468,
> which is no longer needed.

The only problem is that curently even with -P- or SEARCH_HERE_FIRST=0
at build time the gs_init.ps in the current working directory will
be opened by gs first:

 /suse/werner> strace -o log -e open gs -P-
 GPL Ghostscript 8.70 (2009-07-31)
 Copyright (C) 2009 Artifex Software, Inc.  All rights reserved.
 This software comes with NO WARRANTY: see the file COPYING for details.
 /suse/werner> grep gs_init.ps log
 open("gs_init.ps", O_RDONLY)            = -1 ENOENT (No such file or
 open("/etc/ghostscript/8.70/gs_init.ps", O_RDONLY) = -1 ENOENT (No such file
or directory)
 open("/usr/share/ghostscript/Resource/gs_init.ps", O_RDONLY) = -1 ENOENT (No
such file or directory)
 open("/usr/share/ghostscript/8.70/Resource/Init/gs_init.ps", O_RDONLY) = 3

(the binary uses both the option -P- and was compiled with SEARCH_HERE_FIRST=0)
This looks like that the default for `i_ctx_p == NULL' should not be
true but `false'

Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the gs-bugs mailing list