Don't globally change PGPASSFILE

https://github.com/webmin/webmin/issues/2592
This commit is contained in:
Jamie Cameron
2025-11-29 14:22:52 -08:00
parent 9f4a4fadf7
commit 7945a9f0e6

View File

@@ -1234,7 +1234,7 @@ if (&supports_pgpass()) {
push(@main::temporary_files, $pgpass); push(@main::temporary_files, $pgpass);
$cmd = "HOME=$temphome $cmd"; $cmd = "HOME=$temphome $cmd";
} }
$ENV{'PGPASSFILE'} = $pgpass; $cmd = "PGPASSFILE=$pgpass $cmd";
open(PGPASS, ">$pgpass"); open(PGPASS, ">$pgpass");
print PGPASS "*:*:*:$user:$pass\n"; print PGPASS "*:*:*:$user:$pass\n";
close(PGPASS); close(PGPASS);