aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-auth.h
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1997-03-12 21:23:16 +0000
committerMarc G. Fournier <scrappy@hub.org>1997-03-12 21:23:16 +0000
commit3a7c93e7f32b555defdc2ea0b0554f6dd0a34c41 (patch)
tree39e3c59630f15d44aaa3ad7ad0ae4fac7723f68b /src/interfaces/libpq/fe-auth.h
parent5dde558ce60db1f8747bbf745d56bd9cd5f4c7b7 (diff)
downloadpostgresql-3a7c93e7f32b555defdc2ea0b0554f6dd0a34c41.tar.gz
postgresql-3a7c93e7f32b555defdc2ea0b0554f6dd0a34c41.zip
From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] password authentication This patch adds support for plaintext password authentication. To use it, you add a line like host all 0.0.0.0 0.0.0.0 password pg_pwd.conf to your pg_hba.conf, where 'pg_pwd.conf' is the name of a file containing the usernames and password hashes in the format of the first two fields of a Unix /etc/passwd file. (Of course, you can use a specific database name or IP instead.) Then, to connect with a password through libpq, you use the PQconnectdb() function, specifying the "password=" tag in the connect string and also adding the tag "authtype=password". I also added a command-line switch '-u' to psql that tells it to prompt for a username and password and use password authentication.
Diffstat (limited to 'src/interfaces/libpq/fe-auth.h')
-rw-r--r--src/interfaces/libpq/fe-auth.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-auth.h b/src/interfaces/libpq/fe-auth.h
index fa939ac122f..646f93df37a 100644
--- a/src/interfaces/libpq/fe-auth.h
+++ b/src/interfaces/libpq/fe-auth.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: fe-auth.h,v 1.2 1996/08/06 16:16:44 scrappy Exp $
+ * $Id: fe-auth.h,v 1.3 1997/03/12 21:23:04 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,7 +28,9 @@
#define DEFAULT_CLIENT_AUTHSVC "kerberos"
#endif /* KRB4 || KRB5 */
-extern int fe_sendauth(MsgType msgtype, Port *port, const char *hostname, const char* PQerromsg);
+extern int fe_sendauth(MsgType msgtype, Port *port, const char *hostname,
+ const char *user, const char *password,
+ const char* PQerromsg);
extern void fe_setauthsvc(const char *name, char* PQerrormsg);
#define PG_KRB4_VERSION "PGVER4.1" /* at most KRB_SENDAUTH_VLEN chars */