Merge "Enforce 0600 permissions on private SSH key file." into stable/train
This commit is contained in:
@@ -1206,6 +1206,7 @@ def ssh_private_key(workdir, key):
|
|||||||
return None
|
return None
|
||||||
if (isinstance(key, six.string_types) and
|
if (isinstance(key, six.string_types) and
|
||||||
os.path.exists(key)):
|
os.path.exists(key)):
|
||||||
|
os.chmod(key, 0o600)
|
||||||
return key
|
return key
|
||||||
|
|
||||||
path = os.path.join(workdir, 'ssh_private_key')
|
path = os.path.join(workdir, 'ssh_private_key')
|
||||||
|
|||||||
Reference in New Issue
Block a user