summaryrefslogtreecommitdiff
path: root/debian/postinst
diff options
context:
space:
mode:
authorNick Leverton <nick@leverton.org>2012-08-21 09:01:38 +0100
committerDavid Bremner <david@tethera.net>2017-07-11 21:53:37 -0300
commitd2b474cb4cae584d2302f62ea58174da734d0a28 (patch)
tree184f3570d13402649c3b370570e903ff898c2beb /debian/postinst
parent0c585230acd5ec6db08e675b97b4556026768da4 (diff)
Import Debian changes 1:1.11-2
nullmailer (1:1.11-2) unstable; urgency=low * Make 'remotes' not world-readable (Closes: #684619)
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst9
1 files changed, 9 insertions, 0 deletions
diff --git a/debian/postinst b/debian/postinst
index e4fccc6..8e8249b 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -24,6 +24,15 @@ case "$1" in
fi
db_get nullmailer/relayhost
+ # securely create nullmailer/remotes with mode 0600
+ if [ ! -e /etc/nullmailer/remotes ]
+ then
+ M=$( umask )
+ umask 077
+ > /etc/nullmailer/remotes
+ chown mail:mail /etc/nullmailer/remotes
+ umask $M
+ fi
echo "$RET" | sed -r -e ':a s/(\[[^]:]*):/\1=/; ta' \
-e 's/[[:space:]]*:[[:space:]]*/\n/g' \
-e ':b s/(\[[^]=]*)=/\1:/; tb' \