Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
alpine
alpine-conf
Commits
5482ee34
Commit
5482ee34
authored
May 24, 2022
by
Natanael Copa
Browse files
setup-sshd: fix backwards compat with -c
Do not enter interactive mode if -c was set, for backwards compatiblity.
parent
90d5d98a
Pipeline
#123363
passed with stage
in 44 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
setup-sshd.in
View file @
5482ee34
...
...
@@ -57,7 +57,7 @@ shift $(( $OPTIND - 1 ))
case
"
$1
"
in
openssh|dropbear|none
)
sshdchoice
=
"
$1
"
;;
""
)
interactive
=
1
;;
""
)
[
-z
"
$sshdchoice
"
]
&&
interactive
=
1
;;
*
)
usage
"1"
>
&2
;;
esac
...
...
tests/setup_sshd_test
View file @
5482ee34
...
...
@@ -6,6 +6,7 @@ init_tests \
setup_sshd_empty
\
setup_sshd_dropbear
\
setup_sshd_openssh
\
setup_sshd_openssh_c_compat
\
setup_sshd_interactive_openssh_nologin
\
setup_sshd_interactive_openssh_prohibitpass
\
setup_sshd_interactive_openssh_nokey
\
...
...
@@ -45,6 +46,17 @@ setup_sshd_openssh_body() {
grep
'ssh-id FOOBAR'
root/.ssh/authorized_keys
||
atf_fail
"failed to wget ssh key"
}
setup_sshd_openssh_c_compat_body
()
{
init_env
atf_check
-s
exit
:0
\
-e
empty
\
-o
match:
"^apk add .* openssh"
\
-o
match:
"service sshd added"
\
-o
match:
"Starting sshd"
\
-o
not-match:
"Allow root ssh"
\
setup-sshd
-c
openssh
}
setup_sshd_interactive_openssh_nologin_body
()
{
init_env
mkdir
-p
etc/ssh
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment