Skip to content

Commit

Permalink
mkcert.sh: Use umask to create key file as 0600
Browse files Browse the repository at this point in the history
Fixes a race condition between creation of the file and a later chmod.
This script was mostly meant as an example though, and not really for
production use. Especially because it generates self-signed certs.
CVE-2016-4983
  • Loading branch information
sirainen authored and GitLab committed Nov 25, 2016
1 parent 96088ba commit e8e00a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions doc/mkcert.sh
Expand Up @@ -3,6 +3,7 @@
# Generates a self-signed certificate.
# Edit dovecot-openssl.cnf before running this.

umask 077
OPENSSL=${OPENSSL-openssl}
SSLDIR=${SSLDIR-/etc/ssl}
OPENSSLCONFIG=${OPENSSLCONFIG-dovecot-openssl.cnf}
Expand Down

0 comments on commit e8e00a5

Please sign in to comment.