diff options
author | Magnus Hagander <magnus@hagander.net> | 2007-07-23 10:16:54 +0000 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2007-07-23 10:16:54 +0000 |
commit | f70866fb2353dba162fc296f644e7ce77af6d79f (patch) | |
tree | b061ad6406fcd27c42b2fb3c210925c7b11dfb33 /src/backend/libpq/pqcomm.c | |
parent | a0dab332a2e1961f45b38b23bd428859621e6f3c (diff) | |
download | postgresql-f70866fb2353dba162fc296f644e7ce77af6d79f.tar.gz postgresql-f70866fb2353dba162fc296f644e7ce77af6d79f.zip |
SSPI authentication on Windows. GSSAPI compatible client when doing Kerberos
against a Unix server, and Windows-specific server-side authentication
using SSPI "negotiate" method (Kerberos or NTLM).
Only builds properly with MSVC for now.
Diffstat (limited to 'src/backend/libpq/pqcomm.c')
-rw-r--r-- | src/backend/libpq/pqcomm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index a40e6a6cb27..f5dccfda7ab 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -30,7 +30,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.193 2007/07/10 13:14:20 mha Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.194 2007/07/23 10:16:54 mha Exp $ * *------------------------------------------------------------------------- */ @@ -173,15 +173,21 @@ pq_close(int code, Datum arg) { if (MyProcPort != NULL) { +#if defined(ENABLE_GSS) || defined(ENABLE_SSPI) #ifdef ENABLE_GSS OM_uint32 min_s; + /* Shutdown GSSAPI layer */ if (MyProcPort->gss->ctx) gss_delete_sec_context(&min_s, MyProcPort->gss->ctx, NULL); if (MyProcPort->gss->cred) gss_release_cred(&min_s, MyProcPort->gss->cred); -#endif +#endif /* ENABLE_GSS */ + /* GSS and SSPI share the port->gss struct */ + + free(MyProcPort->gss); +#endif /* ENABLE_GSS || ENABLE_SSPI */ /* Cleanly shut down SSL layer */ secure_close(MyProcPort); |