mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
Fix password file permission
Invalid permission makes file unreadable by owner if he is not root. Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
61db3527e3
commit
07341990d9
@ -34,7 +34,7 @@ class IPAOpenSSHTransport(OpenSSHTransport):
|
||||
elif self.host.ssh_password:
|
||||
password_file = os.path.join(self.control_dir.path, "password")
|
||||
with open(password_file, "w") as f:
|
||||
os.fchmod(f.fileno(), 600)
|
||||
os.fchmod(f.fileno(), 0o600)
|
||||
f.write(self.host.ssh_password)
|
||||
f.write("\n")
|
||||
argv = ["sshpass", f"-f{password_file}"] + argv
|
||||
|
Loading…
Reference in New Issue
Block a user