head	1.3;
access;
symbols
	release_4_2:1.3
	aix_ok:1.2;
locks; strict;
comment	@ * @;


1.3
date	94.02.07.11.56.31;	author aoki;	state Exp;
branches;
next	1.2;

1.2
date	93.01.05.02.31.00;	author aoki;	state Exp;
branches;
next	1.1;

1.1
date	92.12.29.01.34.31;	author aoki;	state Exp;
branches;
next	;


desc
@header for kerberos authentication hooks
@


1.3
log
@proto fixes
@
text
@/*----------------------------------------------------------------
 *   FILE
 *	auth.h
 *	
 *   DESCRIPTION
 *	Definitions for network authentication routines
 *
 *   NOTES
 *
 *   IDENTIFICATION
 *	$Header: /import/faerie/faerie/aoki/postgres/src/backend/libpq/RCS/auth.h,v 1.2 1993/01/05 02:31:00 aoki Exp aoki $
 *----------------------------------------------------------------
 */

#ifndef AuthIncluded		/* Include this file only once */
#define	AuthIncluded	1

#include "tmp/c.h"
#include "tmp/pqcomm.h"

/*----------------------------------------------------------------
 * Common routines and definitions
 *----------------------------------------------------------------
 */

/* what we call "no authentication system" */
#define	UNAUTHNAME		"unauth"

/* what a frontend uses by default */
#if !defined(KRB4) && !defined(KRB5)
#define	DEFAULT_CLIENT_AUTHSVC	UNAUTHNAME
#else /* KRB4 || KRB5 */
#define	DEFAULT_CLIENT_AUTHSVC	"kerberos"
#endif /* KRB4 || KRB5 */

extern		fe_sendauth ARGS((MsgType msgtype,
				  Port *port,
				  char *hostname));
extern char    *fe_getauthname ARGS((void));
extern void	fe_setauthsvc ARGS((char *name));
extern MsgType	fe_getauthsvc ARGS((void));

extern		be_recvauth ARGS((MsgType msgtype,
				  Port *port,
				  char *username));
extern void	be_setauthsvc ARGS((char *name));
extern int	be_getauthsvc ARGS((MsgType msgtype));

#define	PG_KRB4_VERSION	"PGVER4.1"	/* at most KRB_SENDAUTH_VLEN chars */
#define	PG_KRB5_VERSION	"PGVER5.1"

#endif /* !defined(AuthIncluded) */
@


1.2
log
@removed stuff that is now passed through Makefile variables.
@
text
@d11 1
a11 1
 *	$Header: /home2/aoki/postgres/src/backend/libpq/RCS/auth.h,v 1.1 1992/12/29 01:34:31 aoki Exp aoki $
d39 1
a39 1
extern char    *fe_getauthname ARGS(());
d41 1
a41 1
extern MsgType	fe_getauthsvc ARGS(());
d43 1
a43 1
extern		be_recvauth ARGS((Msgtype msgtype,
d47 1
a47 1
extern int	be_getauthsvc ARGS(());
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
/* ----------------------------------------------------------------
d11 2
a12 2
 *	$Header$
 * ----------------------------------------------------------------
d21 1
a21 1
/* ----------------------------------------------------------------
d23 1
a23 1
 * ----------------------------------------------------------------
d30 1
d32 3
d36 3
d43 3
a48 13
extern		pg_sendauth ARGS((MsgType msgtype, Port *port,
				  char *hostname));
extern		pg_recvauth ARGS((Msgtype msgtype, Port *port,
				  char *username));

/* ----------------------------------------------------------------
 * MIT Kerberos authentication system, protocol version 4
 *	Note that the srvtab you use must be readable by a non-root
 *	user, i.e., "postgres".
 * ----------------------------------------------------------------
 */
#ifdef KRB4
#define	PG_KRB4_SERVICE	"postgres_dbms"
d50 1
a50 14
#define	PG_KRB4_SRVTAB	"/etc/srvtab"
#endif /* KRB4 */

/* ----------------------------------------------------------------
 * MIT Kerberos authentication system, protocol version 5
 *	Note that the srvtab you use must be readable by a non-root
 *	user, i.e., "postgres".
 * ----------------------------------------------------------------
 */
#ifdef KRB5
#define	PG_KRB5_SERVICE	"postgres_dbms"
#define	PG_KRB5_VERSION	"PGVER5.1"	/* at most KRB_SENDAUTH_VLEN chars */
#define	PG_KRB5_SRVTAB	"/etc/srvtab"
#endif /* KRB5 */
@
