1996-07-09 08:22:35 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* fe-auth.h
|
1997-09-07 07:04:48 +02:00
|
|
|
*
|
|
|
|
* Definitions for network authentication routines
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
2003-08-04 04:40:20 +02:00
|
|
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
2003-08-04 04:40:20 +02:00
|
|
|
* $Id: fe-auth.h,v 1.17 2003/08/04 02:40:16 momjian Exp $
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef FE_AUTH_H
|
1997-09-07 07:04:48 +02:00
|
|
|
#define FE_AUTH_H
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1998-01-26 02:42:53 +01:00
|
|
|
#include "libpq-fe.h"
|
1998-08-17 05:50:43 +02:00
|
|
|
#include "libpq-int.h"
|
1998-01-26 02:42:53 +01:00
|
|
|
|
|
|
|
|
1996-07-09 08:22:35 +02:00
|
|
|
/*----------------------------------------------------------------
|
|
|
|
* Common routines and definitions
|
|
|
|
*----------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* what we call "no authentication system" */
|
1997-09-07 07:04:48 +02:00
|
|
|
#define UNAUTHNAME "unauth"
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/* what a frontend uses by default */
|
|
|
|
#if !defined(KRB4) && !defined(KRB5)
|
1997-09-07 07:04:48 +02:00
|
|
|
#define DEFAULT_CLIENT_AUTHSVC UNAUTHNAME
|
|
|
|
#else /* KRB4 || KRB5 */
|
|
|
|
#define DEFAULT_CLIENT_AUTHSVC "kerberos"
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* KRB4 || KRB5 */
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
extern int fe_sendauth(AuthRequest areq, PGconn *conn, const char *hostname,
|
1998-08-17 05:50:43 +02:00
|
|
|
const char *password, char *PQerrormsg);
|
|
|
|
extern MsgType fe_getauthsvc(char *PQerrormsg);
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void fe_setauthsvc(const char *name, char *PQerrormsg);
|
1998-08-17 05:50:43 +02:00
|
|
|
extern char *fe_getauthname(char *PQerrormsg);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define PG_KRB4_VERSION "PGVER4.1" /* at most KRB_SENDAUTH_VLEN chars */
|
|
|
|
#define PG_KRB5_VERSION "PGVER5.1"
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* FE_AUTH_H */
|