diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2000-07-04 16:32:01 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2000-07-04 16:32:01 +0000 |
commit | 554e56e6280f380f1c55d487aa4b8ea75fa4daad (patch) | |
tree | 770d0c47edcf9fa360ef98fde8a75b926803cfa3 /src/backend/libpq/auth.c | |
parent | 1c2f735aa76f2e4bccb02de1cbc7fcc584a35e87 (diff) | |
download | postgresql-554e56e6280f380f1c55d487aa4b8ea75fa4daad.tar.gz postgresql-554e56e6280f380f1c55d487aa4b8ea75fa4daad.zip |
Expand secondary password file feature, so that you can use these
files to restrict the set of users that can connect to a database
but can still use the pg_shadow password. (You just leave off the
password field in the secondary file.)
Diffstat (limited to 'src/backend/libpq/auth.c')
-rw-r--r-- | src/backend/libpq/auth.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index 5cd049062cb..4f0dc6a31a0 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.47 2000/05/27 04:13:05 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.48 2000/07/04 16:31:53 petere Exp $ * *------------------------------------------------------------------------- */ @@ -52,9 +52,6 @@ static void auth_failed(Port *port); #ifdef KRB4 -/* This has to be ifdef'd out because krb.h does exist. This needs - to be fixed. -*/ /*---------------------------------------------------------------- * MIT Kerberos authentication system - protocol version 4 *---------------------------------------------------------------- @@ -141,9 +138,6 @@ pg_krb4_recvauth(Port *port) #ifdef KRB5 -/* This needs to be ifdef'd out because krb5.h doesn't exist. This needs - to be fixed. -*/ /*---------------------------------------------------------------- * MIT Kerberos authentication system - protocol version 5 *---------------------------------------------------------------- @@ -692,16 +686,14 @@ readPasswordPacket(void *arg, PacketLen len, void *pkt) /* - * Use the local flat password file if clear passwords are used and the file is - * specified. Otherwise use the password in the pg_shadow table, encrypted or - * not. + * Handle `password' and `crypt' records. If an auth argument was + * specified, use the respective file. Else use pg_shadow passwords. */ - static int checkPassword(Port *port, char *user, char *password) { - if (port->auth_method == uaPassword && port->auth_arg[0] != '\0') - return verify_password(port->auth_arg, user, password); + if (port->auth_arg[0] != '\0') + return verify_password(port, user, password); return crypt_verify(port, user, password); } |