Use less permissive chmod in secret key test
Switch to using 644 instead of 777 for a trivial increase in "best practice security". Closes Bug: #1422891 Change-Id: I74dad5ae017b234f23d6e4a1b9099c62a1cd1e09
This commit is contained in:
parent
59d3ff49f8
commit
1149cd8566
|
@ -247,7 +247,7 @@ class SecretKeyTests(test.TestCase):
|
|||
|
||||
# Key file only be read/writable by user:
|
||||
self.assertEqual("0600", oct(os.stat(key_file).st_mode & 0o777))
|
||||
os.chmod(key_file, 0o777)
|
||||
os.chmod(key_file, 0o644)
|
||||
self.assertRaises(secret_key.FilePermissionError,
|
||||
secret_key.generate_or_read_from_file, key_file)
|
||||
os.remove(key_file)
|
||||
|
|
Loading…
Reference in New Issue