summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipapython/ipautil.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py
index 81719ccae..b5a0b9105 100644
--- a/ipapython/ipautil.py
+++ b/ipapython/ipautil.py
@@ -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: