mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
ipautil: Preserve environment unless explicitly overridden by caller.
Fixes: https://fedorahosted.org/freeipa/ticket/1193
This commit is contained in:
parent
660332a162
commit
000ba0531e
@ -28,6 +28,7 @@ import logging
|
||||
import subprocess
|
||||
import random
|
||||
import os, sys, traceback, readline
|
||||
import copy
|
||||
import stat
|
||||
import shutil
|
||||
import urllib2
|
||||
@ -119,7 +120,9 @@ def run(args, stdin=None, raiseonerr=True,
|
||||
p_err = None
|
||||
|
||||
if env is None:
|
||||
env={"PATH": "/bin:/sbin:/usr/kerberos/bin:/usr/kerberos/sbin:/usr/bin:/usr/sbin"}
|
||||
# copy default env
|
||||
env = copy.deepcopy(os.environ)
|
||||
env["PATH"] = "/bin:/sbin:/usr/kerberos/bin:/usr/kerberos/sbin:/usr/bin:/usr/sbin"
|
||||
if stdin:
|
||||
p_in = subprocess.PIPE
|
||||
if capture_output:
|
||||
|
Loading…
Reference in New Issue
Block a user