aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Luis Duran <jlduran@gmail.com>2021-07-16 17:11:47 +0000
committerWarner Losh <imp@FreeBSD.org>2021-07-31 00:02:51 +0000
commitf8b424526bcc259b1cd2b46a4612b55f1b598db3 (patch)
tree5082e99841f75cbdc09f76ca0d853169159ccd44
parentab1dedd4946098fe7202e825d299a2cbec81dae0 (diff)
downloadsrc-f8b424526bcc259b1cd2b46a4612b55f1b598db3.tar.gz
src-f8b424526bcc259b1cd2b46a4612b55f1b598db3.zip
Fix the pattern for changing PermitRootLogin
The previous pattern had the (harmless) side-effect of duplicating the entry in the config file. No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/510 (cherry picked from commit 73358cd2cfccf9aafde069ffcb8185a0f3420ffd)
-rwxr-xr-xtools/tools/nanobsd/defaults.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh
index cc75e3527bca..4e219531b0f1 100755
--- a/tools/tools/nanobsd/defaults.sh
+++ b/tools/tools/nanobsd/defaults.sh
@@ -731,7 +731,7 @@ cust_comconsole ( ) (
# Allow root login via ssh
cust_allow_ssh_root ( ) (
- sed -i "" -e '/PermitRootLogin/s/.*/PermitRootLogin yes/' \
+ sed -i "" -E 's/^#?PermitRootLogin.*/PermitRootLogin yes/' \
${NANO_WORLDDIR}/etc/ssh/sshd_config
)