gnu: Python 3.9: Fix CVE-2021-3177.
[jackhill/guix/guix.git] / gnu / packages / patches / ganeti-preserve-PYTHONPATH.patch
CommitLineData
72a91d74
MB
1Do not override PYTHONPATH when calling Python code from the Haskell
2daemons. This is necessary because the Python library dependencies are
3only available through PYTHONPATH.
4
5diff --git a/src/Ganeti/Query/Exec.hs b/src/Ganeti/Query/Exec.hs
6--- a/src/Ganeti/Query/Exec.hs
7+++ b/src/Ganeti/Query/Exec.hs
8@@ -99,12 +99,10 @@ spawnJobProcess jid = withErrorLogAt CRITICAL (show jid) $
9 do
10 use_debug <- isDebugMode
11 env_ <- (M.toList . M.insert "GNT_DEBUG" (if use_debug then "1" else "0")
12- . M.insert "PYTHONPATH" AC.pythondir
13 . M.fromList)
14 `liftM` getEnvironment
15 execPy <- P.jqueueExecutorPy
16 logDebug $ "Executing " ++ AC.pythonPath ++ " " ++ execPy
17- ++ " with PYTHONPATH=" ++ AC.pythondir
18
19 (master, child) <- pipeClient connectConfig
20 let (rh, wh) = clientToHandle child
21