From: Fredrik Tolf Date: Tue, 9 Nov 2021 19:37:23 +0000 (+0100) Subject: acmecert: Set a secure umask when writing account file. X-Git-Url: http://git.dolda2000.com/gitweb/?p=utils.git;a=commitdiff_plain;h=bfe6116d27b1e8d48abcd91f3a503306d7b75812 acmecert: Set a secure umask when writing account file. --- diff --git a/acmecert b/acmecert index 076bbda..6136eaa 100755 --- a/acmecert +++ b/acmecert @@ -309,6 +309,7 @@ commands = {} def cmd_reg(args): "usage: acmecert reg [OUTPUT-FILE]" acct = register() + os.umask(0o077) with maybeopen(args[1] if len(args) > 1 else "-", "w") as fp: acct.write(fp) commands["reg"] = cmd_reg