From 7d0cbb3fd535b10b6a26898c1a3d915e1c008fbd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sat, 12 Feb 2005 19:39:34 +0000 Subject: [PATCH] - up for 4.0 Changed files: anubis-boundary.patch -> 1.2 anubis-configure_gpgme.patch -> 1.2 anubis-info.patch -> 1.4 anubis-nolibnsl.patch -> 1.2 anubis-securityfixes.patch -> 1.2 --- anubis-boundary.patch | 38 --------- anubis-configure_gpgme.patch | 11 --- anubis-info.patch | 15 ++-- anubis-nolibnsl.patch | 23 ++++-- anubis-securityfixes.patch | 148 ----------------------------------- 5 files changed, 24 insertions(+), 211 deletions(-) delete mode 100644 anubis-boundary.patch delete mode 100644 anubis-configure_gpgme.patch delete mode 100644 anubis-securityfixes.patch diff --git a/anubis-boundary.patch b/anubis-boundary.patch deleted file mode 100644 index 42057fc..0000000 --- a/anubis-boundary.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -urN anubis-3.6.2/src/net.c anubis-3.6.2-fix/src/net.c ---- anubis-3.6.2/src/net.c Wed Dec 11 15:37:56 2002 -+++ anubis-3.6.2-fix/src/net.c Thu Jun 5 23:38:49 2003 -@@ -122,6 +122,7 @@ - int sd = 0; - unsigned long inaddr; - struct sockaddr_in addr; -+ int true = 1; - - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; -@@ -153,6 +154,8 @@ - else - addr.sin_addr.s_addr = htonl(INADDR_ANY); - -+ setsockopt (sd, SOL_SOCKET, SO_REUSEADDR, &true, sizeof(true)); -+ - if (bind(sd, (struct sockaddr *)&addr, sizeof(addr))) - anubis_error(HARD, _("bind() failed: %s."), strerror(errno)); - info(VERBOSE, _("GNU Anubis bound to %s:%u"), inet_ntoa(addr.sin_addr), -diff -urN anubis-3.6.2/src/tunnel.c anubis-3.6.2-fix/src/tunnel.c ---- anubis-3.6.2/src/tunnel.c Sun Dec 8 19:04:51 2002 -+++ anubis-3.6.2-fix/src/tunnel.c Tue Mar 11 11:04:10 2003 -@@ -554,9 +554,11 @@ - ptr1 = strstr(boundary_buf, "boundary="); - if (ptr1 == 0) { - plist = plist->next; -- safe_strcpy(boundary_buf, plist->line); -- change_to_lower(boundary_buf); -- ptr1 = strstr(boundary_buf, "boundary="); -+ if (plist) { -+ safe_strcpy(boundary_buf, plist->line); -+ change_to_lower(boundary_buf); -+ ptr1 = strstr(boundary_buf, "boundary="); -+ } - } - - if (ptr1) { diff --git a/anubis-configure_gpgme.patch b/anubis-configure_gpgme.patch deleted file mode 100644 index 6f9c136..0000000 --- a/anubis-configure_gpgme.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- anubis-3.6.2.orig/configure.ac 2003-01-26 19:28:33.000000000 +0100 -+++ anubis-3.6.2/configure.ac 2003-01-26 19:49:52.000000000 +0100 -@@ -79,7 +74,7 @@ - dnl Use option --without-gpgme to NOT compile the GnuPG (GPGME library) support. - AC_ARG_WITH(gpgme, - [ --without-gpgme disable the GnuPG (GPGME library) support], -- [with_gpgme=no], -+ [with_gpgme=$withval], - [with_gpgme=yes]) - if test "$with_gpgme" = "no"; then - AC_DEFINE(NOGPG, 1, [Define to 1 if NOGPG is requested.]) diff --git a/anubis-info.patch b/anubis-info.patch index 29c49e0..cef0408 100644 --- a/anubis-info.patch +++ b/anubis-info.patch @@ -1,11 +1,12 @@ ---- anubis-3.6.2/doc/anubis.texi~ 2003-01-26 18:19:50.000000000 +0100 -+++ anubis-3.6.2/doc/anubis.texi 2003-01-26 18:20:38.000000000 +0100 -@@ -25,7 +25,7 @@ +diff -urN anubis-4.0.org/doc/anubis.texi anubis-4.0/doc/anubis.texi +--- anubis-4.0.org/doc/anubis.texi 2004-12-18 12:45:44.000000000 +0100 ++++ anubis-4.0/doc/anubis.texi 2005-02-12 20:35:04.000000000 +0100 +@@ -31,7 +31,7 @@ @ifinfo - @dircategory GNU Packages + @dircategory Email @direntry --* Anubis: (anubis). The GNU outgoing mail processor. -+* Anubis: (anubis). The GNU outgoing mail processor +-* Anubis: (anubis). The GNU SMTP message submission daemon. ++* Anubis: (anubis). The GNU SMTP message submission daemon. @end direntry @end ifinfo - Copyright @copyright{} 2001, 2002 Wojciech Polak. + diff --git a/anubis-nolibnsl.patch b/anubis-nolibnsl.patch index 816261e..7b4677b 100644 --- a/anubis-nolibnsl.patch +++ b/anubis-nolibnsl.patch @@ -1,10 +1,19 @@ ---- anubis-3.6.2/configure.ac.orig 2003-10-25 02:09:07.000000000 +0200 -+++ anubis-3.6.2/configure.ac 2003-10-25 02:12:02.521033808 +0200 -@@ -205,7 +205,6 @@ +diff -urN anubis-4.0.org/configure.ac anubis-4.0/configure.ac +--- anubis-4.0.org/configure.ac 2004-12-18 12:10:03.000000000 +0100 ++++ anubis-4.0/configure.ac 2005-02-12 20:38:18.000000000 +0100 +@@ -95,7 +95,6 @@ + ]) + + AC_CHECK_LIB(socket, socket) +-AC_CHECK_LIB(nsl, gethostbyaddr) + + AC_SUBST(INCLUDES) + case $build in +@@ -397,7 +396,6 @@ [with_tcp_wrappers=no]) if test "$with_tcp_wrappers" = "yes"; then - AC_CHECK_LIB(wrap, main) -- AC_CHECK_LIB(nsl, main) - AC_CHECK_HEADERS(tcpd.h) - AC_MSG_RESULT([Enabling libwrap (TCP wrappers) support...]) + AC_CHECK_LIB(wrap, main,, with_tcp_wrappers=no) +- AC_CHECK_LIB(nsl, main,, with_tcp_wrappers=no) + AC_CHECK_HEADERS(tcpd.h,, with_tcp_wrappers=no) fi + if test "$with_tcp_wrappers" = "yes"; then diff --git a/anubis-securityfixes.patch b/anubis-securityfixes.patch deleted file mode 100644 index a40b202..0000000 --- a/anubis-securityfixes.patch +++ /dev/null @@ -1,148 +0,0 @@ -diff -urN anubis-3.6.2/src/auth.c anubis-3.6.2-fix/src/auth.c ---- anubis-3.6.2/src/auth.c Wed Dec 4 22:43:34 2002 -+++ anubis-3.6.2-fix/src/auth.c Wed Feb 25 20:29:40 2004 -@@ -42,6 +42,66 @@ - IDENT protocol support - ************************/ - -+#define USERNAME_C "USERID :" -+ -+/* If the reply matches sscanf expression -+ -+ "%*[^:]: USERID :%*[^:]:%s" -+ -+ and the length of "%s" part does not exceed size-1 bytes, -+ copies this part to USERNAME and returns 0. Otherwise, -+ returns 1 */ -+ -+static int -+ident_extract_username(char *reply, char *username, size_t size) -+{ -+ char *p; -+ -+ p = strchr (reply, ':'); -+ if (!p) -+ return 1; -+ if (p[1] != ' ' -+ || strncmp (p + 2, USERNAME_C, sizeof (USERNAME_C) - 1)) -+ return 1; -+ p += 2 + sizeof (USERNAME_C) - 1; -+ p = strchr (p, ':'); -+ if (!p) -+ return 1; -+ p++; -+ if (strlen (p) >= size) -+ return 1; -+ strcpy(username, p); -+ return 0; -+} -+ -+/* If the reply matches sscanf expression -+ -+ "%*[^ ] %*[^ ] %*[^ ] %*[^ ] %*[^ ] %s" -+ -+ and the length of "%s" part does not exceed size-1 bytes, -+ copies this part to USERNAME and returns 0. Otherwise, -+ returns 1 */ -+ -+static int -+crypt_extract_username(char *reply, char *username, size_t size) -+{ -+ int i; -+ char *p = reply; -+#define skip_word(c) while (*c && (*c) != ' ') c++ -+ -+ /* Skip five words */ -+ for (i = 0; i < 5; i++) { -+ skip_word(p); -+ if (!*p++) -+ return 1; -+ } -+ -+ if (strlen (p) >= size) -+ return 1; -+ strcpy(username, p); -+ return 0; -+} -+ - int - auth_ident(struct sockaddr_in *addr, char *user, int size) - { -@@ -51,7 +111,8 @@ - int sd = 0; - - if ((sd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { -- anubis_error(SOFT, _("IDENT: socket() failed: %s."), strerror(errno)); -+ anubis_error(SOFT, _("IDENT: socket() failed: %s."), -+ strerror(errno)); - return 0; - } - memcpy(&ident, addr, sizeof(ident)); -@@ -69,11 +130,7 @@ - info(VERBOSE, _("IDENT: connected to %s:%u"), - inet_ntoa(ident.sin_addr), ntohs(ident.sin_port)); - -- #ifdef HAVE_SNPRINTF - snprintf(buf, LINEBUFFER, -- #else -- sprintf(buf, -- #endif /* HAVE_SNPRINTF */ - "%u , %u"CRLF, ntohs(addr->sin_port), session.tunnel_port); - - if (send(sd, buf, strlen(buf), 0) == -1) { -@@ -89,7 +146,8 @@ - close_socket(sd); - memset(user, 0, size); - -- if (sscanf(buf, "%*[^:]: USERID :%*[^:]:%s", user) != 1) { -+ remcrlf (buf); -+ if (ident_extract_username(buf, user, size)) { - info(VERBOSE, _("IDENT: incorrect data.")); - return 0; - } -@@ -105,7 +163,8 @@ - if (rs == -1) - return 0; - -- if (sscanf(buf, "%*[^ ] %*[^ ] %*[^ ] %*[^ ] %*[^ ] %s", user) != 1) { -+ remcrlf (buf); -+ if (crypt_extract_username(buf, user, size)) { - info(VERBOSE, _("IDENT: incorrect data (DES deciphered).")); - return 0; - } -diff -urN anubis-3.6.2/src/errs.c anubis-3.6.2-fix/src/errs.c ---- anubis-3.6.2/src/errs.c Wed Dec 4 22:42:02 2002 -+++ anubis-3.6.2-fix/src/errs.c Wed Feb 25 20:33:49 2004 -@@ -51,7 +51,7 @@ - if (options.slogfile) - filelog(options.slogfile, txt); - else -- syslog(LOG_ERR | LOG_MAIL, txt); -+ syslog(LOG_ERR | LOG_MAIL, "%s", txt); - - if (options.ulogfile && options.uloglevel >= FAILS) - filelog(options.ulogfile, txt); -diff -urN anubis-3.6.2/src/log.c anubis-3.6.2-fix/src/log.c ---- anubis-3.6.2/src/log.c Wed Dec 4 22:42:26 2002 -+++ anubis-3.6.2-fix/src/log.c Wed Feb 25 20:32:30 2004 -@@ -70,7 +70,7 @@ - if (options.slogfile) - filelog(options.slogfile, txt); - else -- syslog(LOG_INFO | LOG_MAIL, txt); -+ syslog(LOG_INFO | LOG_MAIL, "%s", txt); - - if (options.ulogfile && options.uloglevel >= ALL) - filelog(options.ulogfile, txt); -diff -urN anubis-3.6.2/src/ssl.c anubis-3.6.2-fix/src/ssl.c ---- anubis-3.6.2/src/ssl.c Wed Dec 4 22:40:45 2002 -+++ anubis-3.6.2-fix/src/ssl.c Wed Feb 25 20:33:28 2004 -@@ -64,7 +64,7 @@ - if (options.termlevel != SILENT) { - #ifdef HAVE_SYSLOG - if ((topt & T_DAEMON) && !(topt & T_FOREGROUND)) -- syslog(LOG_ERR | LOG_MAIL, string_error); -+ syslog(LOG_ERR | LOG_MAIL, "%s", string_error); - else - #endif /* HAVE_SYSLOG */ - mprintf(">>%s", string_error); -- 2.43.0