From: dtucker Date: Thu, 10 Jun 2021 09:37:59 +0000 (+0000) Subject: Set umask when creating hostkeys to prevent excessive permissions warning. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=dcffba6a248f6a6b1810949b6883b0c4ff756a03;p=openbsd Set umask when creating hostkeys to prevent excessive permissions warning. --- diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh index d2f918e7ee0..5624247eecc 100644 --- a/regress/usr.bin/ssh/test-exec.sh +++ b/regress/usr.bin/ssh/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.81 2021/06/01 23:56:20 dtucker Exp $ +# $OpenBSD: test-exec.sh,v 1.82 2021/06/10 09:37:59 dtucker Exp $ # Placed in the Public Domain. USER=`id -un` @@ -417,7 +417,7 @@ for t in ${SSH_HOSTKEY_TYPES}; do ) >> $OBJ/known_hosts # use key as host key, too - $SUDO cp $OBJ/$t $OBJ/host.$t + (umask 077; $SUDO cp $OBJ/$t $OBJ/host.$t) echo HostKey $OBJ/host.$t >> $OBJ/sshd_config # don't use SUDO for proxy connect