Enforce 0600 permissions on private SSH key file.
Change-Id: Ic0864c5cd8f5ad196e76b3cea45f95662121a582 Closes-Bug: #1859244 Signed-off-by: Luke Short <ekultails@gmail.com>
This commit is contained in:
parent
a4ca6e83ba
commit
3d06657c90
|
@ -1451,6 +1451,7 @@ def ssh_private_key(workdir, key):
|
|||
return None
|
||||
if (isinstance(key, six.string_types) and
|
||||
os.path.exists(key)):
|
||||
os.chmod(key, 0o600)
|
||||
return key
|
||||
|
||||
path = os.path.join(workdir, 'ssh_private_key')
|
||||
|
|
Loading…
Reference in New Issue