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
|
|
|
*
|
|
|
|
* Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
1997-09-08 23:56:23 +02:00
|
|
|
* $Id: fe-auth.h,v 1.6 1997/09/08 21:55:35 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
|
|
|
|
|
|
|
/*----------------------------------------------------------------
|
|
|
|
* 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"
|
|
|
|
#endif /* KRB4 || KRB5 */
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
extern int
|
1997-09-08 23:56:23 +02:00
|
|
|
fe_sendauth(MsgType msgtype, Port *port, const char *hostname,
|
1997-09-07 07:04:48 +02:00
|
|
|
const char *user, const char *password,
|
|
|
|
const char *PQerromsg);
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void fe_setauthsvc(const char *name, 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"
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#endif /* FE_AUTH_H */
|