diff options
-rwxr-xr-x | tests/setup_sshd_test | 4 | ||||
-rwxr-xr-x | tests/setup_user_test | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/setup_sshd_test b/tests/setup_sshd_test index f2677ad..3d62f62 100755 --- a/tests/setup_sshd_test +++ b/tests/setup_sshd_test @@ -48,6 +48,8 @@ setup_sshd_openssh_body() { || atf_fail "failed to wget ssh key" # check that permissions are set properly + atf_check -o match:"^700$" \ + stat -c '%a' root/.ssh atf_check -o match:"^600$" \ stat -c '%a' root/.ssh/authorized_keys } @@ -154,6 +156,8 @@ setup_sshd_openssh_ssh_key_body() { || atf_fail "did not add ssh key" # check that permissions are set properly + atf_check -o match:"^700$" \ + stat -c '%a' root/.ssh atf_check -o match:"^600$" \ stat -c '%a' root/.ssh/authorized_keys } diff --git a/tests/setup_user_test b/tests/setup_user_test index 9d660d9..2211f67 100755 --- a/tests/setup_user_test +++ b/tests/setup_user_test @@ -119,6 +119,8 @@ setup_user_interactive_suggest_ssh_body() { setup-user <answers grep -x "$WGETCONTENT" home/testuser/.ssh/authorized_keys \ || atf_fail "ssh key not fetched from alpinelinux" + atf_check -o match:"^700$" \ + stat -c "%a" home/testuser/.ssh atf_check -o match:"^600$" \ stat -c "%a" home/testuser/.ssh/authorized_keys } @@ -161,6 +163,8 @@ setup_user_keys_opt_body() { setup-user -k https://gitlab.alpinelinux.org/user.keys testuser grep -x "$WGETCONTENT" home/testuser/.ssh/authorized_keys \ || atf_fail "ssh key not fetched from alpinelinux" + atf_check -o match:"^700$" \ + stat -c "%a" home/testuser/.ssh atf_check -o match:"^600$" \ stat -c "%a" home/testuser/.ssh/authorized_keys } |