check_postgres
check_postgres copied to clipboard
psql path check is too restrictive
ID: 81 Version: unspecified Date: 2011-07-28 10:39 EDT Author: Peter Eisentraut ([email protected])
When using the --PSQL option, the path check is too restrictive, for example:
./check_postgres.pl --PSQL=/usr/lib/postgresql/8.4/bin/psql --action=connection
--db=test
ERROR: Invalid psql argument: must be full path to a file named psql
The code is fairly simple-minded about this:
$PSQL =~ m{^/[\w\d\/]*psql$}
I would just simplify this to something like
$PSQL =~ m{^/.*/psql$}
(or remove it altogether). Consider typical paths on Windows (bug 36).
Author: Greg Sabino Mullane ([email protected]) Date: 2011-08-01 15:17:27 EDT
Dot star is too loose, but we can try and loosen it up a little more, or remove it. I think the original rational was to prevent running arbitrary psql binaries, but perhaps that's not such an issue. I'm leaning towards removal unless anyone objects?
Author: Cédric Villemain ([email protected]) Date: 2012-01-24 07:37:59 EST
(In reply to comment 1)
Dot star is too loose, but we can try and loosen it up a little more, or remove it. I think the original rational was to prevent running arbitrary psql binaries, but perhaps that's not such an issue. I'm leaning towards removal unless anyone objects?
no objections, I just proposed to remove the NO_PSQL_OPTION which is going together with this test. The name of the binary itself does not protect a lot of things.
Remove it.
Hello ALL
I have this error ERROR: Invalid argument: must be full path to a file nomed psql ,however, I did modify the variable $NO_PSQL_OPTION= 0 and I defined the path on the psql variable like this $opt{PSQL}= "C:Program FilesPostgreSQL\13\bin". I am on windows 10 and i have postgres13.Need Help please