Set proper permissions for ansible-vault view
This commit is contained in:
parent
67fb39451a
commit
faa2449f55
1 changed files with 2 additions and 0 deletions
|
@ -281,8 +281,10 @@ class VaultEditor(object):
|
|||
tmpdata = self.read_data(self.filename)
|
||||
this_vault = VaultLib(self.password)
|
||||
dec_data = this_vault.decrypt(tmpdata)
|
||||
old_umask = os.umask(0o077)
|
||||
_, tmp_path = tempfile.mkstemp()
|
||||
self.write_data(dec_data, tmp_path)
|
||||
os.umask(old_umask)
|
||||
|
||||
# drop the user into pager on the tmp file
|
||||
call(self._pager_shell_command(tmp_path))
|
||||
|
|
Loading…
Reference in a new issue