mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
pg_upgrade: Check version of target cluster binaries
This expands the binary validation in pg_upgrade with a version check per binary to ensure that the target cluster installation only contains binaries from the target version. In order to reduce duplication, validate_exec is exported from port.h and the local copy in pg_upgrade is removed. Author: Daniel Gustafsson <daniel@yesql.se> Discussion: https://www.postgresql.org/message-id/flat/9328.1552952117@sss.pgh.pa.us
This commit is contained in:
@@ -49,7 +49,6 @@
|
||||
#define getcwd(cwd,len) GetCurrentDirectory(len, cwd)
|
||||
#endif
|
||||
|
||||
static int validate_exec(const char *path);
|
||||
static int resolve_symlinks(char *path);
|
||||
|
||||
#ifdef WIN32
|
||||
@@ -63,7 +62,7 @@ static BOOL GetTokenUser(HANDLE hToken, PTOKEN_USER *ppTokenUser);
|
||||
* -1 if the regular file "path" does not exist or cannot be executed.
|
||||
* -2 if the file is otherwise valid but cannot be read.
|
||||
*/
|
||||
static int
|
||||
int
|
||||
validate_exec(const char *path)
|
||||
{
|
||||
struct stat buf;
|
||||
|
Reference in New Issue
Block a user