summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2003-10-18 08:20:34 +0000
committerGuillem Jover <guillem@hadrons.org>2010-06-10 23:21:14 +0200
commit576ee09db75e6ff98c1225826bcd7d5e4114d9b2 (patch)
treec9b71c25cee32f5f6711f0f4c92123730fbd3e47 /debian/patches
parent77ac969a4d6a142251d2500068e40320bfdb606f (diff)
downloadinetutils-576ee09db75e6ff98c1225826bcd7d5e4114d9b2.tar.gz
Release inetutils 2:1.4.2+20030703-71.4.2+20030703-7
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/inetd_pidfile.patch31
-rw-r--r--debian/patches/syslogd.c.patch95
2 files changed, 126 insertions, 0 deletions
diff --git a/debian/patches/inetd_pidfile.patch b/debian/patches/inetd_pidfile.patch
new file mode 100644
index 0000000..9323511
--- /dev/null
+++ b/debian/patches/inetd_pidfile.patch
@@ -0,0 +1,31 @@
+diff -ur inetutils-20030703.old/inetd/inetd.c inetutils-20030703/inetd/inetd.c
+--- inetutils-20030703.old/inetd/inetd.c 2002-04-29 21:02:54.000000000 +0000
++++ inetutils-20030703/inetd/inetd.c 2003-08-29 13:36:07.000000000 +0000
+@@ -359,6 +359,16 @@
+
+ openlog ("inetd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
+
++ { FILE *fp = fopen ("PATH_INETDPID", "w");
++ if (fp != NULL)
++ {
++ fprintf (fp, "%d\n", getpid ());
++ (void) fclose (fp);
++ }
++ else
++ syslog (LOG_CRIT, "can't open PATH_INETDPID: %s\n", strerror (errno));
++ }
++
+ #if defined(HAVE_SIGACTION)
+ {
+ struct sigaction sa;
+diff -ur inetutils-20030703.old/paths inetutils-20030703/paths
+--- inetutils-20030703.old/paths 2001-06-13 16:46:42.000000000 +0000
++++ inetutils-20030703/paths 2003-08-29 13:30:05.000000000 +0000
+@@ -82,6 +82,7 @@
+ PATH_FTPDPID $(localstatedir)/run/ftpd.pid
+ PATH_INETDCONF $(sysconfdir)/inetd.conf
+ PATH_INETDDIR $(sysconfdir)/inetd.d
++PATH_INETDPID $(localstatedir)/run/inetd.pid
+ PATH_UTMP <utmp.h> <utmp.h>:UTMP_FILE $(localstatedir)/run/utmp search:utmp:/var/run:/var/adm:/etc
+ PATH_UTMPX <utmpx.h> <utmpx.h>:UTMPX_FILE $(localstatedir)/run/utmpx search:utmpx:/var/run:/var/adm:/etc
+ PATH_WTMP <utmp.h> <utmp.h>:WTMP_FILE $(localstatedir)/log/wtmp search:wtmp:/var/log:/var/adm:/etc
diff --git a/debian/patches/syslogd.c.patch b/debian/patches/syslogd.c.patch
new file mode 100644
index 0000000..910ffa1
--- /dev/null
+++ b/debian/patches/syslogd.c.patch
@@ -0,0 +1,95 @@
+#DPATCHLEVEL=0
+--- syslogd/syslogd.c.orig 2003-08-23 22:34:40.000000000 +0100
++++ syslogd/syslogd.c 2003-08-24 00:39:27.000000000 +0100
+@@ -1613,13 +1613,13 @@
+ {
+ FILE *cf;
+ struct filed *f, *next, **nextp;
+- char *p;
++ char *p, *q;
+ #ifndef LINE_MAX
+ #define LINE_MAX 2048
+ #endif
+ size_t line_max = LINE_MAX;
+ char *cbuf;
+- char *cline;
++ char *cline, *clinestart;
+ struct servent *sp;
+
+ (void) signo; /* Ignored. */
+@@ -1679,11 +1679,13 @@
+ cbuf = malloc (line_max);
+ if (cbuf == NULL)
+ {
+- /* There is no gracefull recovery here. */
++ /* There is no graceful recovery here. */
+ dbg_printf ("cannot allocate space for configuration\n");
+ return;
+ }
+- cline = cbuf;
++ cline = clinestart = cbuf;
++ /* cline points to current end of cbuf,
++ clinestart to start of current line of config file */
+
+ /* Line parsing :
+ - skip comments,
+@@ -1699,6 +1701,8 @@
+ /* No newline ? then line is too big for the buffer readjust. */
+ if (memchr (cline, '\n', len) == NULL)
+ {
++ size_t offset = cline - cbuf;
++ size_t offsetstart = clinestart - cbuf;
+ char *tmp;
+ tmp = realloc (cbuf, line_max * 2);
+ if (tmp == NULL)
+@@ -1711,22 +1715,27 @@
+ else
+ cbuf = tmp;
+ line_max *= 2;
+- strcpy (cbuf, cline);
+- cline += len;
++ cline = cbuf + offset + len - 1; /* reset cline for new cbuf */
++ clinestart = cbuf + offsetstart; /* ditto for clinestart */
+ continue;
+ }
+ else
+ cline = cbuf;
+
+ /* Glob the leading spaces. */
+- for (p = cline; isspace (*p); ++p)
++ for (p = clinestart; isspace (*p); ++p)
+ ;
+
+- /* Skip comments and empty line. */
+- if (*p == '\0' || *p == '#')
++ /* Skip comments and empty line, unless this is a continuation line. */
++ if ((clinestart == cbuf) && (*p == '\0' || *p == '#'))
+ continue;
+
+- strcpy (cline, p);
++ /* Can't technically use strcpy as these strings overlap, although
++ in practice, it should be OK */
++ /* strcpy (clinestart, p); */
++ q = clinestart;
++ while ((*q++ = *p++))
++ ;
+
+ /* Cut the trailing spaces. */
+ for (p = strchr (cline, '\0'); isspace (*--p);)
+@@ -1736,7 +1745,7 @@
+ if (*p == '\\')
+ {
+ *p = '\0';
+- cline = p;
++ cline = clinestart = p;
+ continue;
+ }
+
+@@ -1747,6 +1756,7 @@
+ *nextp = f;
+ nextp = &f->f_next;
+ cfline (cbuf, f);
++ clinestart = cbuf;
+ }
+
+ /* Close the configuration file. */