diff options
Diffstat (limited to 'src/include/libpq')
| -rw-r--r-- | src/include/libpq/hba.h | 5 | ||||
| -rw-r--r-- | src/include/libpq/libpq-be.h | 31 | ||||
| -rw-r--r-- | src/include/libpq/pqcomm.h | 4 |
3 files changed, 36 insertions, 4 deletions
diff --git a/src/include/libpq/hba.h b/src/include/libpq/hba.h index 155db7314d..b68aa5899b 100644 --- a/src/include/libpq/hba.h +++ b/src/include/libpq/hba.h @@ -4,7 +4,7 @@ * Interface to hba.c * * - * $PostgreSQL: pgsql/src/include/libpq/hba.h,v 1.45 2006/11/05 22:42:10 tgl Exp $ + * $PostgreSQL: pgsql/src/include/libpq/hba.h,v 1.46 2007/07/10 13:14:21 mha Exp $ * *------------------------------------------------------------------------- */ @@ -22,7 +22,8 @@ typedef enum UserAuth uaIdent, uaPassword, uaCrypt, - uaMD5 + uaMD5, + uaGSS #ifdef USE_PAM ,uaPAM #endif /* USE_PAM */ diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h index 5e18b7ff2b..095ac91957 100644 --- a/src/include/libpq/libpq-be.h +++ b/src/include/libpq/libpq-be.h @@ -11,7 +11,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/libpq/libpq-be.h,v 1.58 2007/01/05 22:19:55 momjian Exp $ + * $PostgreSQL: pgsql/src/include/libpq/libpq-be.h,v 1.59 2007/07/10 13:14:21 mha Exp $ * *------------------------------------------------------------------------- */ @@ -29,6 +29,10 @@ #include <netinet/tcp.h> #endif +#ifdef ENABLE_GSS +#include <gssapi/gssapi.h> +#endif + #include "libpq/hba.h" #include "libpq/pqcomm.h" #include "utils/timestamp.h" @@ -39,6 +43,20 @@ typedef enum CAC_state CAC_OK, CAC_STARTUP, CAC_SHUTDOWN, CAC_RECOVERY, CAC_TOOMANY } CAC_state; + +/* + * GSSAPI specific state information + */ +#ifdef ENABLE_GSS +typedef struct +{ + gss_cred_id_t cred; /* GSSAPI connection cred's */ + gss_ctx_id_t ctx; /* GSSAPI connection context */ + gss_name_t name; /* GSSAPI client name */ + gss_buffer_desc outbuf; /* GSSAPI output token buffer */ +} pg_gssinfo; +#endif + /* * This is used by the postmaster in its communication with frontends. It * contains all state information needed during this communication before the @@ -98,6 +116,17 @@ typedef struct Port int keepalives_interval; int keepalives_count; +#ifdef ENABLE_GSS + /* + * If GSSAPI is supported, store GSSAPI information. + * Oterwise, store a NULL pointer to make sure offsets + * in the struct remain the same. + */ + pg_gssinfo *gss; +#else + void *gss; +#endif + /* * SSL structures (keep these last so that USE_SSL doesn't affect * locations of other fields) diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h index 50118e4d94..8e66aaa968 100644 --- a/src/include/libpq/pqcomm.h +++ b/src/include/libpq/pqcomm.h @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/libpq/pqcomm.h,v 1.104 2007/07/08 18:28:55 tgl Exp $ + * $PostgreSQL: pgsql/src/include/libpq/pqcomm.h,v 1.105 2007/07/10 13:14:21 mha Exp $ * *------------------------------------------------------------------------- */ @@ -156,6 +156,8 @@ extern bool Db_user_namespace; #define AUTH_REQ_CRYPT 4 /* crypt password */ #define AUTH_REQ_MD5 5 /* md5 password */ #define AUTH_REQ_SCM_CREDS 6 /* transfer SCM credentials */ +#define AUTH_REQ_GSS 7 /* GSSAPI without wrap() */ +#define AUTH_REQ_GSS_CONT 8 /* Continue GSS exchanges */ typedef uint32 AuthRequest; |
