]> granicus.if.org Git - postgresql/blobdiff - src/backend/libpq/pqcomm.c
From: Dan McGuirk <mcguirk@indirect.com>
[postgresql] / src / backend / libpq / pqcomm.c
index 928bc281b8d9a3f773e36ebd6fb89e1e5522c6fb..6b8ecdac28bc0d5673acd6f84ba6ae303324e8d3 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.11 1997/02/14 04:15:29 momjian Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.12 1997/03/12 21:17:58 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -703,3 +703,29 @@ StreamOpen(char *hostName, short portName, Port *port)
     
     return(STATUS_OK);
 }
+
+static char *authentication_type_name[] = {
+    0, 0, 0, 0, 0, 0, 0, 
+    "the default authentication type", 
+    0, 0,
+    "Kerberos v4",
+    "Kerberos v5",
+    "host-based authentication",
+    "unauthenication",
+    "plaintext password authentication"
+};
+
+char *name_of_authentication_type(int type)
+{
+    char *result = 0;
+
+    if(type >= 1 && type <= LAST_AUTHENTICATION_TYPE) {
+       result = authentication_type_name[type];
+    }
+
+    if(result == 0) {
+       result = "<unknown authentication type>";
+    }
+
+    return result;
+}