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-30 23:02:13 +0000
commitd2d322b0123e7654529c800664861b836de0daf2 (patch)
tree5a1d295dc5e03c82ca290cc47897a802e98f6bb6
parent2cbf9eff2d97a8e87f55928f6dbd8bcb1799e98d (diff)
downloadsrc-d2d322b0123e7654529c800664861b836de0daf2.tar.gz
src-d2d322b0123e7654529c800664861b836de0daf2.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 77c0e216ec80..45d9fe44c650 100755
--- a/tools/tools/nanobsd/defaults.sh
+++ b/tools/tools/nanobsd/defaults.sh
@@ -728,7 +728,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
)