Merge "Enforce 0600 permissions on private SSH key file." into stable/train

This commit is contained in:
Zuul
2020-01-30 02:55:10 +00:00
committed by Gerrit Code Review

View File

@@ -1206,6 +1206,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')