From 6d70d550e6b8f54750ef2c560888f98969c51557 Mon Sep 17 00:00:00 2001 From: Bryan Henderson Date: Fri, 11 Oct 1996 09:12:18 +0000 Subject: [PATCH] Prepare for new host-based authentication --- src/include/libpq/hba.h | 20 ++++++++++++++++++++ src/include/libpq/pqcomm.h | 15 +++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/include/libpq/hba.h diff --git a/src/include/libpq/hba.h b/src/include/libpq/hba.h new file mode 100644 index 0000000000..72e374bdc8 --- /dev/null +++ b/src/include/libpq/hba.h @@ -0,0 +1,20 @@ +/*------------------------------------------------------------------------- + * + * hba.h-- + * Interface to hba.c + * + * + * $Id: hba.h,v 1.1 1996/10/11 09:12:17 bryanh Exp $ + * + *------------------------------------------------------------------------- + */ +#ifndef HBA_H +#define HBA_H + +#include + +extern int +hba_recvauth(const Port *port, const char database[], const char user[], + const char DataDir[]); + +#endif diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h index 7955280d92..e9049aec00 100644 --- a/src/include/libpq/pqcomm.h +++ b/src/include/libpq/pqcomm.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pqcomm.h,v 1.1 1996/08/28 07:23:02 scrappy Exp $ + * $Id: pqcomm.h,v 1.2 1996/10/11 09:12:18 bryanh Exp $ * * NOTES * Some of this should move to libpq.h @@ -31,6 +31,16 @@ #define PATH_SIZE 64 #define ARGV_SIZE 64 +/* The various kinds of startup messages are for the various kinds of + user authentication systems. In the beginning, there was only + STARTUP_MSG and all connections were unauthenticated. Now, there are + several choices of authentication method (the client picks one, but + the server needn't necessarily accept it). So now, the STARTUP_MSG + message means to start either an unauthenticated or a host-based + authenticated connection, depending on what the server prefers. This + is possible because the protocol between server and client is the same + in both cases (basically, no negotiation is required at all). + */ typedef enum _MsgType { ACK_MSG = 0, /* acknowledge a message */ @@ -45,7 +55,8 @@ typedef enum _MsgType { INVALID_MSG=9, /* for some control functions */ STARTUP_KRB4_MSG=10, /* krb4 session follows startup packet */ STARTUP_KRB5_MSG=11, /* krb5 session follows startup packet */ - STARTUP_HBA_MSG=12 /* use host-based authentication */ + STARTUP_HBA_MSG=12, /* use host-based authentication */ + STARTUP_UNAUTH_MSG=13 /* use unauthenticated connection */ /* insert new values here -- DO NOT REORDER OR DELETE ENTRIES */ } MsgType; -- 2.11.0