OSDN Git Service

e4676fcd97ba815748bf6549103e6962980fb1ac
[pg-rex/syncrep.git] / src / interfaces / libpq / fe-auth.h
1 /*-------------------------------------------------------------------------
2  *
3  * fe-auth.h
4  *
5  *        Definitions for network authentication routines
6  *
7  * Copyright (c) 1994, Regents of the University of California
8  *
9  * $Id: fe-auth.h,v 1.7 1998/01/26 01:42:26 scrappy Exp $
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef FE_AUTH_H
14 #define FE_AUTH_H
15
16 #include "libpq-fe.h"
17
18
19 /*----------------------------------------------------------------
20  * Common routines and definitions
21  *----------------------------------------------------------------
22  */
23
24 /* what we call "no authentication system" */
25 #define UNAUTHNAME                              "unauth"
26
27 /* what a frontend uses by default */
28 #if !defined(KRB4) && !defined(KRB5)
29 #define DEFAULT_CLIENT_AUTHSVC  UNAUTHNAME
30 #else                                                   /* KRB4 || KRB5 */
31 #define DEFAULT_CLIENT_AUTHSVC  "kerberos"
32 #endif                                                  /* KRB4 || KRB5 */
33
34 extern int
35 fe_sendauth(AuthRequest areq, PGconn *conn, const char *hostname,
36                         const char *password, const char *PQerromsg);
37 extern void fe_setauthsvc(const char *name, char *PQerrormsg);
38
39 #define PG_KRB4_VERSION "PGVER4.1"              /* at most KRB_SENDAUTH_VLEN chars */
40 #define PG_KRB5_VERSION "PGVER5.1"
41
42 #endif                                                  /* FE_AUTH_H */