aboutsummaryrefslogtreecommitdiff
path: root/src/backend/libpq/password.c
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1998-12-14 06:50:32 +0000
committerMarc G. Fournier <scrappy@hub.org>1998-12-14 06:50:32 +0000
commitdf1468e251df8ea14ad2a4c6904bd0135cba44e5 (patch)
tree6e9f8bcec750c78a5b6c4d52621518bf592a6bd1 /src/backend/libpq/password.c
parent7c3b7d27446cbe7e4d1ccf6f51caf2d38f55916c (diff)
downloadpostgresql-df1468e251df8ea14ad2a4c6904bd0135cba44e5.tar.gz
postgresql-df1468e251df8ea14ad2a4c6904bd0135cba44e5.zip
Many more cleanups...
Diffstat (limited to 'src/backend/libpq/password.c')
-rw-r--r--src/backend/libpq/password.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/backend/libpq/password.c b/src/backend/libpq/password.c
index af3a4c6f7e2..e6c1d816a8b 100644
--- a/src/backend/libpq/password.c
+++ b/src/backend/libpq/password.c
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 1994, Regents of the University of California
+ *
+ * $Id: password.c,v 1.19 1998/12/14 06:50:26 scrappy Exp $
+ *
+ */
+
#include <postgres.h>
#include <miscadmin.h>
#include <libpq/password.h>
@@ -23,7 +30,7 @@ verify_password(char *auth_arg, char *user, char *password)
pw_file = AllocateFile(pw_file_fullname, "r");
if (!pw_file)
{
- sprintf(PQerrormsg,
+ snprintf(PQerrormsg, ERROR_MSG_LENGTH,
"verify_password: couldn't open password file '%s'\n",
pw_file_fullname);
fputs(PQerrormsg, stderr);
@@ -68,7 +75,7 @@ verify_password(char *auth_arg, char *user, char *password)
return STATUS_OK;
}
- sprintf(PQerrormsg,
+ snprintf(PQerrormsg, ERROR_MSG_LENGTH,
"verify_password: password mismatch for '%s'.\n",
user);
fputs(PQerrormsg, stderr);
@@ -80,7 +87,7 @@ verify_password(char *auth_arg, char *user, char *password)
}
}
- sprintf(PQerrormsg,
+ snprintf(PQerrormsg, ERROR_MSG_LENGTH,
"verify_password: user '%s' not found in password file.\n",
user);
fputs(PQerrormsg, stderr);