mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-28 08:02:54 +00:00
nuageinit: Fix tests
Commit07d17ca189
set the recommended permissions for the SSH authorized keys file and directory. The tests, however, were failing on CI. Use stat to check for the proper permissions. Fixes:07d17ca189
nuageinit: Set recommended SSH permissions Reported by: Jenkins
This commit is contained in:
parent
7aecd689e3
commit
8edd6c07c8
@ -17,8 +17,8 @@ addsshkey_body() {
|
||||
if [ ! -f .ssh/authorized_keys ]; then
|
||||
atf_fail "ssh key not added"
|
||||
fi
|
||||
atf_check -o inline:".ssh: 040700 [drwx------ ] -> 040700 [drwx------ ]\n" chmod -vv 0700 .ssh
|
||||
atf_check -o inline:".ssh/authorized_keys: 0100600 [-rw------- ] -> 0100600 [-rw------- ]\n" chmod -vv 0600 .ssh/authorized_keys
|
||||
atf_check -o inline:"40700\n" stat -f %p .ssh
|
||||
atf_check -o inline:"100600\n" stat -f %p .ssh/authorized_keys
|
||||
atf_check -o inline:"mykey\n" cat .ssh/authorized_keys
|
||||
atf_check /usr/libexec/flua $(atf_get_srcdir)/addsshkey.lua
|
||||
atf_check -o inline:"mykey\nmykey\n" cat .ssh/authorized_keys
|
||||
|
Loading…
Reference in New Issue
Block a user