From c1062f3db24a07d104690975adc493ab0957cc4f Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Fri, 25 Nov 2022 17:53:25 +0100 Subject: [PATCH] set the umask --- core/admin/mailu/manage.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/admin/mailu/manage.py b/core/admin/mailu/manage.py index 098f1283..32619fe3 100644 --- a/core/admin/mailu/manage.py +++ b/core/admin/mailu/manage.py @@ -385,6 +385,7 @@ def config_export(full=False, secrets=False, color=False, dns=False, output=None 'dns': dns, } + old_umask = os.umask(0o077) try: schema = MailuSchema(only=only, context=context) if as_json: @@ -396,6 +397,8 @@ def config_export(full=False, secrets=False, color=False, dns=False, output=None if msg := log.format_exception(exc): raise click.ClickException(msg) from exc raise + finally: + os.umask(old_umask) @mailu.command()