mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-27 16:46:42 -06:00
Close all fds when running another program. This fixes the SELinux AVCs.
Put installation log files into /var/log. 430024
This commit is contained in:
parent
79557e6bf2
commit
b49942fe96
@ -54,7 +54,7 @@ def logging_setup(options):
|
||||
# file.
|
||||
logging.basicConfig(level=logging.DEBUG,
|
||||
format='%(asctime)s %(levelname)s %(message)s',
|
||||
filename='ipaclient-install.log',
|
||||
filename='/var/log/ipaclient-install.log',
|
||||
filemode='w')
|
||||
|
||||
console = logging.StreamHandler()
|
||||
|
@ -71,7 +71,7 @@ def write_tmp_file(txt):
|
||||
return fd
|
||||
|
||||
def run(args, stdin=None):
|
||||
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
|
||||
if stdin:
|
||||
stdout,stderr = p.communicate(stdin)
|
||||
else:
|
||||
|
@ -316,7 +316,8 @@ def main():
|
||||
signal.signal(signal.SIGTERM, signal_handler)
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
|
||||
standard_logging_setup("ipaserver-install.log", options.debug)
|
||||
standard_logging_setup("/var/log/ipaserver-install.log", options.debug)
|
||||
print "\nThe log file for this installation can be found in /var/log/ipaserver-install.log")
|
||||
|
||||
if options.uninstall:
|
||||
return uninstall()
|
||||
|
Loading…
Reference in New Issue
Block a user