mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 15:55:47 -05:00
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 <rcritten@redhat.com>
This commit is contained in:
@@ -24,7 +24,6 @@ import re
|
|||||||
import SSSDConfig
|
import SSSDConfig
|
||||||
import shutil
|
import shutil
|
||||||
import socket
|
import socket
|
||||||
import subprocess
|
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import textwrap
|
import textwrap
|
||||||
@@ -2205,7 +2204,7 @@ def install_check(options):
|
|||||||
# available.
|
# available.
|
||||||
if options.conf_sudo:
|
if options.conf_sudo:
|
||||||
try:
|
try:
|
||||||
subprocess.Popen(['sudo', '-V'])
|
ipautil.run(['sudo', '-V'])
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logger.info(
|
logger.info(
|
||||||
"The sudo binary does not seem to be present on this "
|
"The sudo binary does not seem to be present on this "
|
||||||
|
|||||||
Reference in New Issue
Block a user