summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2008-04-11 05:23:34 +0000
committerGuillem Jover <guillem@hadrons.org>2010-06-10 23:21:23 +0200
commit40d583d44b4d17cef3260c3410de07108d8f8427 (patch)
tree1a134818d4590ef43ca7c8dc01cf06d6ea55ce93 /debian
parent7fc362a335cd0c6f2cdfdcc0c7e845d6fd6b6d25 (diff)
downloadinetutils-40d583d44b4d17cef3260c3410de07108d8f8427.tar.gz
Delay initialization of Shishi until telnet knows Kerberos is needed
Thanks-to: Simon Josefsson <simon@josefsson.org>
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog5
-rw-r--r--debian/patches/05_shishi_delayed_init.patch92
-rw-r--r--debian/patches/series1
3 files changed, 98 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index bc386ef..6dd0290 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -31,6 +31,11 @@ inetutils (2:1.5.dfsg.1-5) UNRELEASED; urgency=low
* Fix a race condition when setting the SIGALRM signal in syslogd parent
when starting the daemon, causing it to exit with a non-zero status.
- debian/patches/52_sigalarm.patch: New file.
+ * Delay initialization of Shishi until telnet knows Kerberos is needed.
+ Reducing the output when creating the directory has been fixed in
+ shishi itself. (Closes: #423944)
+ - debian/patches/05_shishi_delayed_init.patch: New file.
+ Thanks to Simon Josefsson <simon@josefsson.org>.
-- Guillem Jover <guillem@debian.org> Fri, 18 May 2007 07:37:19 +0300
diff --git a/debian/patches/05_shishi_delayed_init.patch b/debian/patches/05_shishi_delayed_init.patch
new file mode 100644
index 0000000..702c7b8
--- /dev/null
+++ b/debian/patches/05_shishi_delayed_init.patch
@@ -0,0 +1,92 @@
+Index: b/libtelnet/shishi.c
+===================================================================
+--- a/libtelnet/shishi.c 2008-04-11 08:09:20.000000000 +0300
++++ b/libtelnet/shishi.c 2008-04-11 08:11:55.000000000 +0300
+@@ -1,5 +1,4 @@
+-/* Copyright (C) 2002, 2003, 2007 Simon Josefsson
+- Copyright (C) 2003 Free Software Foundation, Inc.
++/* Copyright (C) 2002, 2003, 2007, 2008 Free Software Foundation, Inc.
+
+ This file is part of Shishi / GNU Inetutils.
+
+@@ -59,7 +58,7 @@ static unsigned char str_data[2048] = {
+ #define KRB_ACCEPT 2 /* Accepted */
+ #define KRB_RESPONSE 3 /* Response for mutual auth. */
+
+-Shishi *shishi_handle = 0;
++Shishi *shishi_handle = NULL;
+ Shishi_ap *auth_handle;
+
+ #define DEBUG(c) if (auth_debug_mode) printf c
+@@ -105,14 +104,29 @@ int
+ krb5shishi_init (TN_Authenticator * ap, int server)
+ {
+ if (server)
++ str_data[3] = TELQUAL_REPLY;
++ else
++ str_data[3] = TELQUAL_IS;
++
++ if (!shishi_check_version (SHISHI_VERSION))
++ return 0;
++
++ return 1;
++}
++
++static int
++delayed_shishi_init (void)
++{
++ if (shishi_handle)
++ return 1;
++
++ if (str_data[3] == TELQUAL_REPLY)
+ {
+- str_data[3] = TELQUAL_REPLY;
+ if (!shishi_handle && shishi_init_server (&shishi_handle) != SHISHI_OK)
+ return 0;
+ }
+ else
+ {
+- str_data[3] = TELQUAL_IS;
+ if (!shishi_handle && shishi_init (&shishi_handle) != SHISHI_OK)
+ return 0;
+ }
+@@ -123,11 +137,11 @@ krb5shishi_init (TN_Authenticator * ap,
+ void
+ krb5shishi_cleanup (TN_Authenticator * ap)
+ {
+- if (shishi_handle == 0)
++ if (shishi_handle == NULL)
+ return;
+
+ shishi_done (shishi_handle);
+- shishi_handle = 0;
++ shishi_handle = NULL;
+ }
+
+ int
+@@ -143,6 +157,12 @@ krb5shishi_send (TN_Authenticator * ap)
+ char *apreq;
+ size_t apreq_len;
+
++ if (!delayed_shishi_init ())
++ {
++ DEBUG (("telnet: Kerberos V5: shishi initialization failed\r\n"));
++ return 0;
++ }
++
+ tmp = malloc (strlen ("host/") + strlen (RemoteHostName) + 1);
+ sprintf (tmp, "host/%s", RemoteHostName);
+ memset (&hint, 0, sizeof (hint));
+@@ -385,6 +405,12 @@ krb5shishi_is_auth (TN_Authenticator * a
+ Session_Key skey;
+ #endif
+
++ if (!delayed_shishi_init ())
++ {
++ DEBUG (("telnet: Kerberos V5: shishi initialization failed\r\n"));
++ return 0;
++ }
++
+ rc = shishi_ap (shishi_handle, &auth_handle);
+ if (rc != SHISHI_OK)
+ {
diff --git a/debian/patches/series b/debian/patches/series
index 77152c6..e618e18 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,6 +3,7 @@
02_missing_config.rpath.patch -p0
03_ifreq_typo.patch -p0
04_shishi_telnet.patch -p0
+05_shishi_delayed_init.patch
10_syslog_klog_doc.patch -p0
22_syslogd_conf.patch -p1
30_ping_suid_perms.patch -p0