summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHans Insulander <hin@cvs.openbsd.org>2001-11-03 00:07:54 +0000
committerHans Insulander <hin@cvs.openbsd.org>2001-11-03 00:07:54 +0000
commit8053500a21eafa9902b1f97a6b98a4cd375818bc (patch)
treedc53ee6563e402459de87d7ee8f6f65027003eae /lib
parentd421f2608deabd4afa8f54fe41a8f9b9492d1711 (diff)
Telnet client shouldn't say it does Kerberos unless there actually exists
a krb4 or krb5 ticket file. ok art@
Diffstat (limited to 'lib')
-rw-r--r--lib/libtelnet/enc-proto.h12
-rw-r--r--lib/libtelnet/kerberos.c4
-rw-r--r--lib/libtelnet/kerberos5.c4
3 files changed, 16 insertions, 4 deletions
diff --git a/lib/libtelnet/enc-proto.h b/lib/libtelnet/enc-proto.h
index 21aa13524ab..3663556b034 100644
--- a/lib/libtelnet/enc-proto.h
+++ b/lib/libtelnet/enc-proto.h
@@ -142,3 +142,15 @@ int ofb64_keyid (int, unsigned char *, int *);
void ofb64_printsub (unsigned char *, int, unsigned char *, int);
#endif
+
+#ifdef KRB4
+int check_krb4_tickets();
+#else
+#define check_krb4_tickets() 0
+#endif
+
+#ifdef KRB5
+int check_krb5_tickets();
+#else
+#define check_krb5_tickets() 0
+#endif
diff --git a/lib/libtelnet/kerberos.c b/lib/libtelnet/kerberos.c
index deeb90d43ac..9f2c67962e3 100644
--- a/lib/libtelnet/kerberos.c
+++ b/lib/libtelnet/kerberos.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kerberos.c,v 1.8 2001/06/29 21:21:46 millert Exp $ */
+/* $OpenBSD: kerberos.c,v 1.9 2001/11/03 00:07:52 hin Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -116,7 +116,7 @@ static int auth_done; /* XXX */
static int pack_cred(CREDENTIALS *cred, unsigned char *buf);
static int unpack_cred(unsigned char *buf, int len, CREDENTIALS *cred);
-static int
+int
check_krb4_tickets() {
int ret;
int retval = 0;
diff --git a/lib/libtelnet/kerberos5.c b/lib/libtelnet/kerberos5.c
index 4773ea5060a..fac1727808f 100644
--- a/lib/libtelnet/kerberos5.c
+++ b/lib/libtelnet/kerberos5.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kerberos5.c,v 1.3 2001/06/28 14:22:16 hin Exp $ */
+/* $OpenBSD: kerberos5.c,v 1.4 2001/11/03 00:07:52 hin Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -120,7 +120,7 @@ static krb5_ticket *ticket;
static krb5_context context;
static krb5_auth_context auth_context;
-static int
+int
check_krb5_tickets()
{
krb5_error_code ret;