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:
Gabriel Hurley 2015-02-10 22:40:15 -08:00
parent 59d3ff49f8
commit 1149cd8566
1 changed files with 1 additions and 1 deletions

View File

@ -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)