summaryrefslogtreecommitdiff
path: root/logerrit
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@libreoffice.org>2020-01-15 05:22:20 +0100
committerGuilhem Moulin <guilhem@libreoffice.org>2020-01-15 23:51:17 +0100
commit9276b117355c098bdfbe3cfa207aca869bf4bd01 (patch)
treed45ab322a2fa87a74fd0abb8cffc8c41945eb01e /logerrit
parent9476dfe7d1b86b367966e7dedf67e11936c8d9d7 (diff)
logerrit: atomically create ~/.ssh with restrictive mode
AFAICT `mkdir [-m mode]` is already defined in POSIX.1-1990. Change-Id: I159578eac16398f16d55578fbd818906b77cf373 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86852 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'logerrit')
-rwxr-xr-xlogerrit3
1 files changed, 1 insertions, 2 deletions
diff --git a/logerrit b/logerrit
index 33f45dc44c73..04ce54414904 100755
--- a/logerrit
+++ b/logerrit
@@ -76,8 +76,7 @@ case "$1" in
created_ssh=
if ! test -d $ssh_home; then
echo "It appears that you have no ssh setup, running ssh-keygen to create that:"
- mkdir $ssh_home
- chmod 0700 $ssh_home
+ mkdir -m0700 "$ssh_home"
created_ssh=TRUE
echo
echo "Hit enter to generate an ssh key - you will need to enter a pass-phrase"