mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-12 01:01:55 -06:00
Change file mode of log files to 600.
446869
This commit is contained in:
parent
fcd3260955
commit
2f69e7e18d
@ -63,10 +63,12 @@ def logging_setup(options):
|
||||
if options.uninstall:
|
||||
log_file = "/var/log/ipaclient-uninstall.log"
|
||||
|
||||
old_umask = os.umask(077)
|
||||
logging.basicConfig(level=logging.DEBUG,
|
||||
format='%(asctime)s %(levelname)s %(message)s',
|
||||
filename=log_file,
|
||||
filemode='w')
|
||||
os.umask(old_umask)
|
||||
|
||||
console = logging.StreamHandler()
|
||||
# If the debug option is set, also log debug messages to the console
|
||||
@ -368,6 +370,7 @@ def main():
|
||||
try:
|
||||
import sys
|
||||
|
||||
import os
|
||||
import krbV
|
||||
import socket
|
||||
import logging
|
||||
|
@ -143,12 +143,14 @@ def port_available(port):
|
||||
return rv
|
||||
|
||||
def standard_logging_setup(log_filename, debug=False):
|
||||
old_umask = os.umask(077)
|
||||
# Always log everything (i.e., DEBUG) to the log
|
||||
# file.
|
||||
logging.basicConfig(level=logging.DEBUG,
|
||||
format='%(asctime)s %(levelname)s %(message)s',
|
||||
filename=log_filename,
|
||||
filemode='w')
|
||||
os.umask(old_umask)
|
||||
|
||||
console = logging.StreamHandler()
|
||||
# If the debug option is set, also log debug messages to the console
|
||||
|
Loading…
Reference in New Issue
Block a user