Set umask when creating hostkeys to prevent excessive permissions warning.
authordtucker <dtucker@openbsd.org>
Thu, 10 Jun 2021 09:37:59 +0000 (09:37 +0000)
committerdtucker <dtucker@openbsd.org>
Thu, 10 Jun 2021 09:37:59 +0000 (09:37 +0000)
regress/usr.bin/ssh/test-exec.sh

index d2f918e..5624247 100644 (file)
@@ -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