Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2013-12-18 17:16:16 +0000
committerBruce Momjian2013-12-18 17:16:21 +0000
commit613c6d26bd42dd8c2dd0664315be9551475b8864 (patch)
treee0eb178bf76220fc9b082d9e849bee67c03f9e13 /src/bin/scripts/createlang.c
parent11ac4c73cb89551d7e0d0180b58d82186f072f8d (diff)
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
Diffstat (limited to 'src/bin/scripts/createlang.c')
-rw-r--r--src/bin/scripts/createlang.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/scripts/createlang.c b/src/bin/scripts/createlang.c
index ff544a803d1..5cfba8e3d5a 100644
--- a/src/bin/scripts/createlang.c
+++ b/src/bin/scripts/createlang.c
@@ -127,7 +127,7 @@ main(int argc, char *argv[])
else if (getenv("PGUSER"))
dbname = getenv("PGUSER");
else
- dbname = get_user_name(progname);
+ dbname = get_user_name_or_exit(progname);
}
initPQExpBuffer(&sql);