summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipaserver
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2008-05-20 10:19:19 +0200
committerRob Crittenden <rcritten@redhat.com>2008-05-20 22:43:12 -0400
commitdf44154521e62b1eca33cdd654f26ea08a9daf2f (patch)
tree120e45519dda60236fd5665e9437b28f8e0fbdb4 /ipa-server/ipaserver
parente7aa0b6c5e4eb472d09744e4c8c1ed916c5ca1ac (diff)
downloadfreeipa-df44154521e62b1eca33cdd654f26ea08a9daf2f.tar.gz
freeipa-df44154521e62b1eca33cdd654f26ea08a9daf2f.tar.xz
freeipa-df44154521e62b1eca33cdd654f26ea08a9daf2f.zip
Change file mode of log files to 600.
446869
Diffstat (limited to 'ipa-server/ipaserver')
-rw-r--r--ipa-server/ipaserver/installutils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipa-server/ipaserver/installutils.py b/ipa-server/ipaserver/installutils.py
index 5eca5971..ee3c1c77 100644
--- a/ipa-server/ipaserver/installutils.py
+++ b/ipa-server/ipaserver/installutils.py
@@ -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