upstream: sprinkle some "# comment" at end of configuration lines
to test comment handling OpenBSD-Regress-ID: cb82fbf40bda5c257a9f742c63b1798e5a8fdda7
This commit is contained in:
parent
acc9c32dcb
commit
660cea10b2
|
@ -1,4 +1,4 @@
|
||||||
# $OpenBSD: cfginclude.sh,v 1.2 2016/05/03 15:30:46 dtucker Exp $
|
# $OpenBSD: cfginclude.sh,v 1.3 2021/06/08 06:52:43 djm Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="config include"
|
tid="config include"
|
||||||
|
@ -10,7 +10,7 @@ cat > $OBJ/ssh_config.i << _EOF
|
||||||
Match host a
|
Match host a
|
||||||
Hostname aa
|
Hostname aa
|
||||||
|
|
||||||
Match host b
|
Match host b # comment
|
||||||
Hostname bb
|
Hostname bb
|
||||||
Include $OBJ/ssh_config.i.*
|
Include $OBJ/ssh_config.i.*
|
||||||
|
|
||||||
|
@ -19,10 +19,10 @@ Match host c
|
||||||
Hostname cc
|
Hostname cc
|
||||||
|
|
||||||
Match host m
|
Match host m
|
||||||
Include $OBJ/ssh_config.i.*
|
Include $OBJ/ssh_config.i.* # comment
|
||||||
|
|
||||||
Host d
|
Host d
|
||||||
Hostname dd
|
Hostname dd # comment
|
||||||
|
|
||||||
Host e
|
Host e
|
||||||
Hostname ee
|
Hostname ee
|
||||||
|
@ -47,17 +47,17 @@ Match host a
|
||||||
Match host b
|
Match host b
|
||||||
Hostname bbb
|
Hostname bbb
|
||||||
|
|
||||||
Match host c
|
Match host c # comment
|
||||||
Hostname ccc
|
Hostname ccc
|
||||||
|
|
||||||
Host d
|
Host d # comment
|
||||||
Hostname ddd
|
Hostname ddd
|
||||||
|
|
||||||
Host e
|
Host e
|
||||||
Hostname eee
|
Hostname eee
|
||||||
|
|
||||||
Host f
|
Host f
|
||||||
Hostname fff
|
Hostname fff # comment
|
||||||
_EOF
|
_EOF
|
||||||
|
|
||||||
cat > $OBJ/ssh_config.i.2 << _EOF
|
cat > $OBJ/ssh_config.i.2 << _EOF
|
||||||
|
@ -142,7 +142,7 @@ trial a aa
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
rm -f $OBJ/ssh_config.i $OBJ/ssh_config.i.* $OBJ/ssh_config.out
|
rm -f $OBJ/ssh_config.i $OBJ/ssh_config.i.* $OBJ/ssh_config.out
|
||||||
# $OpenBSD: cfginclude.sh,v 1.2 2016/05/03 15:30:46 dtucker Exp $
|
# $OpenBSD: cfginclude.sh,v 1.3 2021/06/08 06:52:43 djm Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="config include"
|
tid="config include"
|
||||||
|
@ -185,11 +185,11 @@ cat > $OBJ/ssh_config.i.1 << _EOF
|
||||||
Match host a
|
Match host a
|
||||||
Hostname aaa
|
Hostname aaa
|
||||||
|
|
||||||
Match host b
|
Match host b # comment
|
||||||
Hostname bbb
|
Hostname bbb
|
||||||
|
|
||||||
Match host c
|
Match host c
|
||||||
Hostname ccc
|
Hostname ccc # comment
|
||||||
|
|
||||||
Host d
|
Host d
|
||||||
Hostname ddd
|
Hostname ddd
|
||||||
|
@ -220,8 +220,8 @@ Host e
|
||||||
Host f
|
Host f
|
||||||
Hostname ffff
|
Hostname ffff
|
||||||
|
|
||||||
Match all
|
Match all # comment
|
||||||
Hostname xxxx
|
Hostname xxxx # comment
|
||||||
_EOF
|
_EOF
|
||||||
|
|
||||||
trial() {
|
trial() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $OpenBSD: cfgmatch.sh,v 1.12 2019/04/18 18:57:16 dtucker Exp $
|
# $OpenBSD: cfgmatch.sh,v 1.13 2021/06/08 06:52:43 djm Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="sshd_config match"
|
tid="sshd_config match"
|
||||||
|
@ -39,16 +39,16 @@ stop_client()
|
||||||
}
|
}
|
||||||
|
|
||||||
cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
|
cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
|
||||||
echo "PermitOpen 127.0.0.1:1" >>$OBJ/sshd_config
|
echo "PermitOpen 127.0.0.1:1 # comment" >>$OBJ/sshd_config
|
||||||
echo "Match Address 127.0.0.1" >>$OBJ/sshd_config
|
echo "Match Address 127.0.0.1" >>$OBJ/sshd_config
|
||||||
echo "PermitOpen 127.0.0.1:2 127.0.0.1:3 127.0.0.1:$PORT" >>$OBJ/sshd_config
|
echo "PermitOpen 127.0.0.1:2 127.0.0.1:3 127.0.0.1:$PORT" >>$OBJ/sshd_config
|
||||||
|
|
||||||
grep -v AuthorizedKeysFile $OBJ/sshd_proxy_bak > $OBJ/sshd_proxy
|
grep -v AuthorizedKeysFile $OBJ/sshd_proxy_bak > $OBJ/sshd_proxy
|
||||||
echo "AuthorizedKeysFile /dev/null" >>$OBJ/sshd_proxy
|
echo "AuthorizedKeysFile /dev/null # comment" >>$OBJ/sshd_proxy
|
||||||
echo "PermitOpen 127.0.0.1:1" >>$OBJ/sshd_proxy
|
echo "PermitOpen 127.0.0.1:1" >>$OBJ/sshd_proxy
|
||||||
echo "Match user $USER" >>$OBJ/sshd_proxy
|
echo "Match user $USER" >>$OBJ/sshd_proxy
|
||||||
echo "AuthorizedKeysFile /dev/null $OBJ/authorized_keys_%u" >>$OBJ/sshd_proxy
|
echo "AuthorizedKeysFile /dev/null $OBJ/authorized_keys_%u" >>$OBJ/sshd_proxy
|
||||||
echo "Match Address 127.0.0.1" >>$OBJ/sshd_proxy
|
echo "Match Address 127.0.0.1 # comment" >>$OBJ/sshd_proxy
|
||||||
echo "PermitOpen 127.0.0.1:2 127.0.0.1:3 127.0.0.1:$PORT" >>$OBJ/sshd_proxy
|
echo "PermitOpen 127.0.0.1:2 127.0.0.1:3 127.0.0.1:$PORT" >>$OBJ/sshd_proxy
|
||||||
|
|
||||||
${SUDO} ${SSHD} -f $OBJ/sshd_config -T >/dev/null || \
|
${SUDO} ${SSHD} -f $OBJ/sshd_config -T >/dev/null || \
|
||||||
|
|
|
@ -9,17 +9,17 @@ Match host a
|
||||||
|
|
||||||
Match host b
|
Match host b
|
||||||
Banner /bb
|
Banner /bb
|
||||||
Include $OBJ/sshd_config.i.*
|
Include $OBJ/sshd_config.i.* # comment
|
||||||
|
|
||||||
Match host c
|
Match host c
|
||||||
Include $OBJ/sshd_config.i.*
|
Include $OBJ/sshd_config.i.* # comment
|
||||||
Banner /cc
|
Banner /cc
|
||||||
|
|
||||||
Match host m
|
Match host m
|
||||||
Include $OBJ/sshd_config.i.*
|
Include $OBJ/sshd_config.i.*
|
||||||
|
|
||||||
Match Host d
|
Match Host d
|
||||||
Banner /dd
|
Banner /dd # comment
|
||||||
|
|
||||||
Match Host e
|
Match Host e
|
||||||
Banner /ee
|
Banner /ee
|
||||||
|
@ -64,7 +64,7 @@ Match host a
|
||||||
Match host b
|
Match host b
|
||||||
Banner /bbbb
|
Banner /bbbb
|
||||||
|
|
||||||
Match host c
|
Match host c # comment
|
||||||
Banner /cccc
|
Banner /cccc
|
||||||
|
|
||||||
Match Host d
|
Match Host d
|
||||||
|
|
Loading…
Reference in New Issue