mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Fix incorrect error message reported for non-existent users
Previously, lookups of non-existent user names could return "Success"; it will now return "User does not exist" by resetting errno. This also centralizes the user name lookup code in libpgport. Report and analysis by Nicolas Marchildon; patch by me
This commit is contained in:
@@ -473,6 +473,10 @@ extern pqsigfunc pqsignal(int signo, pqsigfunc func);
|
||||
/* port/quotes.c */
|
||||
extern char *escape_single_quotes_ascii(const char *src);
|
||||
|
||||
/* port/username.c */
|
||||
extern const char *get_user_name(char **errstr);
|
||||
extern const char *get_user_name_or_exit(const char *progname);
|
||||
|
||||
/* port/wait_error.c */
|
||||
extern char *wait_result_to_str(int exit_status);
|
||||
|
||||
|
Reference in New Issue
Block a user