bug-gv
[Top][All Lists]
Advanced

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

Re: [bug-gv] Working around gs issues by changing to a safe working dir


From: Markus Steinborn
Subject: Re: [bug-gv] Working around gs issues by changing to a safe working dir
Date: Sun, 30 May 2010 18:10:50 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.9) Gecko/20100317 SeaMonkey/2.0.4

Hi Bernhard,

in the following part of the patch

--- a/gv/src/process.c
+++ b/gv/src/process.c
@@ -271,6 +271,12 @@ ProcessData process_fork (name,command,notify_proc,data)
 */
       if (!freopen("/dev/null", "r", stdin))  perror("/dev/null");

+      if (gv_gs_safeDir) {
+        if (chdir(GV_LIBDIR "/safe-gs-workdir") != 0) {
+      perror("Chdir to " GV_LIBDIR "/safe-gs-workdir failed");
+      _exit(EXIT_STATUS_ERROR);
+    }
+      }

I would in case the chdir failed try some more or less convenient places:

GV_LIBDIR    (the resource files aren't thought to be a problem)
/ (normally not writeable for ordinary users, so usually you won't find problematic files there, should work)

and is it really necessary to quit the whole program on chmod error?





reply via email to

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