|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /proc/17567/root/usr/src/cloud-init/tests/integration_tests/ |
Upload File : |
"""Integration tests relating to cloud-init's logging."""
class TestVarLogCloudInitOutput:
"""Integration tests relating to /var/log/cloud-init-output.log."""
def test_var_log_cloud_init_output_not_world_readable(self, client):
"""
The log can contain sensitive data, it shouldn't be world-readable.
LP: #1918303
"""
# Check the file exists
assert client.execute("test -f /var/log/cloud-init-output.log").ok
# Check its permissions are as we expect
perms, user, group = client.execute(
"stat -c %a:%U:%G /var/log/cloud-init-output.log"
).split(":")
assert "640" == perms
assert "root" == user
assert "adm" == group