From ec8d72cf7cdf960cb270570dde459dfde3d94fd9 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Tue, 13 Apr 2021 10:14:27 +0200 Subject: [PATCH] client install: do not capture sudo -V stdout ipa-client-install is checking if the sudo command is available by calling 'sudo -V'. The call is currently using subprocess.popen which redirects the output to the default stdout. Use ipautil.run instead of subprocess.popen as this does not capture stdout (the command output is just logged in the debug file). Fixes: https://pagure.io/freeipa/issue/8767 Reviewed-By: Rob Crittenden --- ipaclient/install/client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ipaclient/install/client.py b/ipaclient/install/client.py index 9bdfbddaf..03b443c2b 100644 --- a/ipaclient/install/client.py +++ b/ipaclient/install/client.py @@ -24,7 +24,6 @@ import re import SSSDConfig import shutil import socket -import subprocess import sys import tempfile import textwrap @@ -2205,7 +2204,7 @@ def install_check(options): # available. if options.conf_sudo: try: - subprocess.Popen(['sudo', '-V']) + ipautil.run(['sudo', '-V']) except FileNotFoundError: logger.info( "The sudo binary does not seem to be present on this "