From 3ce7191f48d8be29ddb89cf401f80316d44cf354 Mon Sep 17 00:00:00 2001 From: Ade Lee Date: Tue, 19 Nov 2013 13:54:41 -0500 Subject: Fix useradd command in pkispawn to not create avc Ticket 803 --- base/server/python/pki/server/deployment/pkihelper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'base/server/python') 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) -- cgit