summaryrefslogtreecommitdiff
path: root/src/backend/libpq/password.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1997-08-25 19:41:52 +0000
committerBruce Momjian <bruce@momjian.us>1997-08-25 19:41:52 +0000
commitf8fda03d12971361781546e3f74d1a703d1841c3 (patch)
tree209bf2f4f47f623a4011f23ee5632cda2f4d6891 /src/backend/libpq/password.c
parent8d0e658d06bf73ae45db0a4e3912a355605b949a (diff)
pg_password utility. Cleanup for psql passwords. New datetime contrib stuff for new version. Fix for strutils needing config.h.
Diffstat (limited to 'src/backend/libpq/password.c')
-rw-r--r--src/backend/libpq/password.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/libpq/password.c b/src/backend/libpq/password.c
index afbd95ad1ae..346d59e8bf6 100644
--- a/src/backend/libpq/password.c
+++ b/src/backend/libpq/password.c
@@ -79,7 +79,8 @@ verify_password(char *user, char *password, Port *port,
}
/* kill the newline */
- test_pw[strlen(test_pw)-1] = '\0';
+ if (test_pw[strlen(test_pw)-1] == '\n')
+ test_pw[strlen(test_pw)-1] = '\0';
strNcpy(salt, test_pw, 2);