test/units: add missing -m 0700 to mkdir of root/.ssh

mkdir without -m treats 0700 as another directory name argument.

Follow-up to https://github.com/systemd/systemd/commit/52d863defcd05d0b676ce743b9eaf1060131f9a1
This commit is contained in:
Jan Macku
2026-08-07 15:16:25 +01:00
committed by Luca Boccassi
parent a399bc519c
commit a24a50cfc2
+2 -1
View File
@@ -31,7 +31,8 @@ removesshid() {
ssh-keygen -N '' -C '' -t rsa -f "$ROOTID"
mkdir -p 0700 /root/.ssh
# shellcheck disable=SC2174
mkdir -p -m 0700 /root/.ssh
# Add a newline in case authorized_keys wasn't terminated correctly.
echo >>/root/.ssh/authorized_keys
cat "$ROOTID".pub >>/root/.ssh/authorized_keys