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/createuser.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/createuser.c')
-rw-r--r--src/bin/scripts/createuser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c
index 61805917704..e3ce0dc455f 100644
--- a/src/bin/scripts/createuser.c
+++ b/src/bin/scripts/createuser.c
@@ -193,7 +193,7 @@ main(int argc, char *argv[])
if (getenv("PGUSER"))
newuser = getenv("PGUSER");
else
- newuser = get_user_name(progname);
+ newuser = get_user_name_or_exit(progname);
}
}