1996-10-11 11:12:18 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* hba.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* Interface to hba.c
|
1996-10-11 11:12:18 +02:00
|
|
|
*
|
|
|
|
*
|
2001-10-28 07:26:15 +01:00
|
|
|
* $Id: hba.h,v 1.30 2001/10/28 06:26:07 momjian Exp $
|
1996-10-11 11:12:18 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef HBA_H
|
1997-09-07 07:04:48 +02:00
|
|
|
#define HBA_H
|
1996-10-11 11:12:18 +02:00
|
|
|
|
2001-08-24 18:59:10 +02:00
|
|
|
#ifndef WIN32
|
1998-01-26 02:42:53 +01:00
|
|
|
#include <netinet/in.h>
|
2001-08-24 18:59:10 +02:00
|
|
|
#endif
|
1998-01-26 02:42:53 +01:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define CONF_FILE "pg_hba.conf"
|
|
|
|
/* Name of the config file */
|
1997-03-12 22:23:16 +01:00
|
|
|
|
1999-05-10 17:17:17 +02:00
|
|
|
#define USERMAP_FILE "pg_ident.conf"
|
1997-09-07 07:04:48 +02:00
|
|
|
/* Name of the usermap file */
|
1997-03-12 22:23:16 +01:00
|
|
|
|
|
|
|
#define OLD_CONF_FILE "pg_hba"
|
1997-09-07 07:04:48 +02:00
|
|
|
/* Name of the config file in prior releases of Postgres. */
|
1997-03-12 22:23:16 +01:00
|
|
|
|
|
|
|
#define IDENT_PORT 113
|
1997-09-07 07:04:48 +02:00
|
|
|
/* Standard TCP port number for Ident service. Assigned by IANA */
|
1997-03-12 22:23:16 +01:00
|
|
|
|
1999-10-23 05:13:33 +02:00
|
|
|
#define MAX_AUTH_ARG 80 /* Max size of an authentication arg */
|
1997-03-12 22:23:16 +01:00
|
|
|
|
1998-02-26 05:46:47 +01:00
|
|
|
typedef enum UserAuth
|
|
|
|
{
|
2001-10-28 07:26:15 +01:00
|
|
|
uaReject,
|
|
|
|
uaKrb4,
|
|
|
|
uaKrb5,
|
|
|
|
uaTrust,
|
|
|
|
uaIdent,
|
|
|
|
uaPassword,
|
|
|
|
uaCrypt,
|
|
|
|
uaMD5
|
2001-09-21 22:31:49 +02:00
|
|
|
#ifdef USE_PAM
|
2001-10-28 07:26:15 +01:00
|
|
|
,uaPAM
|
2001-10-25 07:50:21 +02:00
|
|
|
#endif /* USE_PAM */
|
1998-01-26 02:42:53 +01:00
|
|
|
} UserAuth;
|
|
|
|
|
1999-09-27 05:13:16 +02:00
|
|
|
typedef struct Port hbaPort;
|
|
|
|
|
2001-10-25 07:50:21 +02:00
|
|
|
extern int hba_getauthmethod(hbaPort *port);
|
|
|
|
extern int authident(hbaPort *port);
|
2001-08-01 00:55:45 +02:00
|
|
|
extern void load_hba_and_ident(void);
|
2001-10-28 07:26:15 +01:00
|
|
|
|
1996-10-11 11:12:18 +02:00
|
|
|
#endif
|