diff options
author | Ade Lee <alee@redhat.com> | 2013-11-19 13:54:41 -0500 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2013-11-19 14:05:37 -0500 |
commit | 3ce7191f48d8be29ddb89cf401f80316d44cf354 (patch) | |
tree | d8f4a914984390750665c76049e86ab9126f9581 /base/server | |
parent | 3e413200912690b4680f65efc2c9dc11f3a18fab (diff) | |
download | pki-3ce7191f48d8be29ddb89cf401f80316d44cf354.tar.gz pki-3ce7191f48d8be29ddb89cf401f80316d44cf354.tar.xz pki-3ce7191f48d8be29ddb89cf401f80316d44cf354.zip |
Fix useradd command in pkispawn to not create avc
Ticket 803
Diffstat (limited to 'base/server')
-rw-r--r-- | base/server/python/pki/server/deployment/pkihelper.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/base/server/python/pki/server/deployment/pkihelper.py b/base/server/python/pki/server/deployment/pkihelper.py index 30ba87a72..a84cd0e7b 100644 --- a/base/server/python/pki/server/deployment/pkihelper.py +++ b/base/server/python/pki/server/deployment/pkihelper.py @@ -170,7 +170,8 @@ class Identity: try: # Execute this "groupadd" command. with open(os.devnull, "w") as fnull: - subprocess.check_call(command, stdout=fnull, stderr=fnull) + subprocess.check_call(command, stdout=fnull, stderr=fnull, + close_fds=True) except subprocess.CalledProcessError as exc: config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc, extra=config.PKI_INDENTATION_LEVEL_2) @@ -234,7 +235,8 @@ class Identity: try: # Execute this "useradd" command. with open(os.devnull, "w") as fnull: - subprocess.check_call(command, stdout=fnull, stderr=fnull) + subprocess.check_call(command, stdout=fnull, stderr=fnull, + close_fds=True) except subprocess.CalledProcessError as exc: config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc, extra=config.PKI_INDENTATION_LEVEL_2) |