diff options
author | Rob Crittenden <rcritten@redhat.com> | 2010-08-31 16:59:27 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2010-08-31 16:59:27 -0400 |
commit | d0ea0bb63891babd1c5778df2e291b527c8e927c (patch) | |
tree | ecbc0c15a5e86da0fc4b7c049ebe2a0c420f516f /ipapython/ipautil.py | |
parent | e05400dad83adabe09e57e9eb04b718c01019e32 (diff) | |
download | freeipa-d0ea0bb63891babd1c5778df2e291b527c8e927c.tar.gz freeipa-d0ea0bb63891babd1c5778df2e291b527c8e927c.tar.xz freeipa-d0ea0bb63891babd1c5778df2e291b527c8e927c.zip |
Changes to fix compatibility with Fedora 14
Fedora 14 introduced the following incompatiblities:
- the kerberos binaries moved from /usr/kerberos/[s]/bin to /usr/[s]bin
- the xmlrpclib in Python 2.7 is not fully backwards compatible to 2.6
Also, when moving the installed host service principals:
- don't assume that krbticketflags is set
- allow multiple values for krbextradata
ticket 155
Diffstat (limited to 'ipapython/ipautil.py')
-rw-r--r-- | ipapython/ipautil.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py index 3f8bba902..4d07bb626 100644 --- a/ipapython/ipautil.py +++ b/ipapython/ipautil.py @@ -89,7 +89,7 @@ def write_tmp_file(txt): return fd -def run(args, stdin=None, raiseonerr=True, nolog=()): +def run(args, stdin=None, raiseonerr=True, nolog=(), env=None): """ Execute a command and return stdin, stdout and the process return code. @@ -113,11 +113,13 @@ def run(args, stdin=None, raiseonerr=True, nolog=()): If an value isn't found in the list it is silently ignored. """ + if env is None: + env={"PATH": "/bin:/sbin:/usr/kerberos/bin:/usr/kerberos/sbin:/usr/bin:/usr/sbin"} if stdin: - p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) + p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True, env=env) stdout,stderr = p.communicate(stdin) else: - p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) + p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True, env=env) stdout,stderr = p.communicate() # The command and its output may include passwords that we don't want |