Skip to content

Commit 94389b8

Browse files
committed
Merge branch 'TinCanTech-option-mask-and-no-mask'
Signed-off-by: Richard T Bonhomme <[email protected]>
2 parents 1cf38f0 + b977f07 commit 94389b8

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Easy-RSA 3 ChangeLog
22

33
3.2.3 (TBD)
44

5+
* Introduce command line options --umask|--no-umask (d1b030d) (#1312)
56
* Fix shellcheck warnings:
67
(e28a35c) (6082f6f) (e0ec835) (e0e798a) (85b1086) (#1311)
78
* inline_file(): Include DH file or placeholder, for RSA Servers (8a7b1fa) (#1310)

easyrsa3/easyrsa

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,8 @@ General options:
624624
(Default PKI directory is sub-directory 'pki')
625625
See Advanced.md for in depth usage.
626626

627+
--umask=ARG : Define a UMASK (Default 077)
628+
--no-umask : Do not use a UMASK, fall back to file system default.
627629
--ssl-cnf=FILE : Define a specific OpenSSL config file for Easy-RSA to use
628630
(Default config file is in the EasyRSA PKI directory)
629631
--force-safe-ssl: Always generate a safe SSL config file
@@ -6694,9 +6696,6 @@ EASYRSA_version="~VER~"
66946696
NL='
66956697
'
66966698

6697-
# Be secure with a restrictive umask
6698-
[ "$EASYRSA_NO_UMASK" ] || umask "${EASYRSA_UMASK:=077}"
6699-
67006699
# Register cleanup on EXIT
67016700
trap 'cleanup $?' EXIT
67026701
# When SIGHUP, SIGINT, SIGQUIT, SIGABRT and SIGTERM,
@@ -6767,6 +6766,13 @@ while :; do
67676766
--tmp-dir)
67686767
export EASYRSA_TEMP_DIR="$val"
67696768
;;
6769+
--umask)
6770+
export EASYRSA_UMASK="$val"
6771+
;;
6772+
--no-umask)
6773+
empty_ok=1
6774+
export EASYRSA_NO_UMASK=1
6775+
;;
67706776
--ssl-cnf|--ssl-conf)
67716777
export EASYRSA_SSL_CONF="$val"
67726778
;;
@@ -6964,6 +6970,9 @@ Run 'easyrsa help options' for option help."
69646970
shift
69656971
done
69666972

6973+
# Be secure with a restrictive umask
6974+
[ "$EASYRSA_NO_UMASK" ] || umask "${EASYRSA_UMASK:=077}"
6975+
69676976
# option dependencies
69686977
# Add full --san to extra extensions
69696978
if [ "$EASYRSA_SAN" ]; then

0 commit comments

Comments
 (0)