1996-10-11 11:12:18 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* hba.h--
|
|
|
|
* Interface to hba.c
|
|
|
|
*
|
|
|
|
*
|
1997-03-12 22:23:16 +01:00
|
|
|
* $Id: hba.h,v 1.3 1997/03/12 21:22:16 scrappy Exp $
|
1996-10-11 11:12:18 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef HBA_H
|
|
|
|
#define HBA_H
|
|
|
|
|
1997-03-12 22:23:16 +01:00
|
|
|
#include <libpq/pqcomm.h>
|
|
|
|
|
|
|
|
#define CONF_FILE "pg_hba.conf"
|
|
|
|
/* Name of the config file */
|
|
|
|
|
|
|
|
#define MAP_FILE "pg_ident.conf"
|
|
|
|
/* Name of the usermap file */
|
|
|
|
|
|
|
|
#define OLD_CONF_FILE "pg_hba"
|
|
|
|
/* Name of the config file in prior releases of Postgres. */
|
|
|
|
|
|
|
|
#define MAX_LINES 255
|
|
|
|
/* Maximum number of config lines that can apply to one database */
|
|
|
|
|
|
|
|
#define MAX_TOKEN 80
|
|
|
|
/* Maximum size of one token in the configuration file */
|
|
|
|
|
|
|
|
#define USERMAP_NAME_SIZE 16 /* Max size of a usermap name */
|
|
|
|
|
|
|
|
#define IDENT_PORT 113
|
|
|
|
/* Standard TCP port number for Ident service. Assigned by IANA */
|
|
|
|
|
|
|
|
#define IDENT_USERNAME_MAX 512
|
|
|
|
/* Max size of username ident server can return */
|
|
|
|
|
|
|
|
enum Userauth {Trust, Ident, Password};
|
1996-10-11 11:12:18 +02:00
|
|
|
|
|
|
|
extern int
|
|
|
|
hba_recvauth(const Port *port, const char database[], const char user[],
|
|
|
|
const char DataDir[]);
|
1997-03-12 22:23:16 +01:00
|
|
|
void find_hba_entry(const char DataDir[], const struct in_addr ip_addr,
|
|
|
|
const char database[],
|
|
|
|
bool *host_ok_p, enum Userauth *userauth_p,
|
|
|
|
char usermap_name[], bool find_password_entries);
|
1996-10-11 11:12:18 +02:00
|
|
|
|
|
|
|
#endif
|