rpms/ssmtp/F-7 ssmtp-md5auth-non-rsa,NONE,1.1 ssmtp.spec,1.8,1.9
Manuel Wolfshant (wolfy)
fedora-extras-commits at redhat.com
Wed Oct 17 00:30:02 UTC 2007
Author: wolfy
Update of /cvs/pkgs/rpms/ssmtp/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3097
Modified Files:
ssmtp.spec
Added Files:
ssmtp-md5auth-non-rsa
Log Message:
* Tue Oct 16 2007 lonely wolf <wolfy at nobugconsulting.ro> 2.61-11.4
- includes patch from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340803
replacing md5 from RSA with a version released under GPLv2+
- fix URL for upstream
--- NEW FILE ssmtp-md5auth-non-rsa ---
diff -Nupr ssmtp-2.61.orig/configure ssmtp-2.61/configure
--- ssmtp-2.61.orig/configure 2007-10-17 02:20:25.000000000 +0300
+++ ssmtp-2.61/configure 2007-10-17 02:29:18.000000000 +0300
@@ -1,37 +1,325 @@
#! /bin/sh
-
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.59.
#
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
[...7029 lines suppressed...]
+ ASCII representation of the message digest.
+
+ IMPORTANT: On some systems, RESBUF must be aligned to a 32-bit
+ boundary. */
+extern void *__md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) __THROW;
+
+
+/* Put result from CTX in first 16 bytes following RESBUF. The result is
+ always in little endian byte order, so that a byte-wise output yields
+ to the wanted ASCII representation of the message digest.
+
+ IMPORTANT: On some systems, RESBUF must be aligned to a 32-bit
+ boundary. */
+extern void *__md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) __THROW;
+
+
+/* Compute MD5 message digest for bytes read from STREAM. The
+ resulting message digest number will be written into the 16 bytes
+ beginning at RESBLOCK. */
+extern int __md5_stream (FILE *stream, void *resblock) __THROW;
+
+/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
+ result is always in little endian byte order, so that a byte-wise
+ output yields to the wanted ASCII representation of the message
+ digest. */
+extern void *__md5_buffer (const char *buffer, size_t len,
+ void *resblock) __THROW;
-License to copy and use this software is granted provided that it
-is identified as the "RSA Data Security, Inc. MD5 Message-Digest
-Algorithm" in all material mentioning or referencing this software
-or this function.
-
-License is also granted to make and use derivative works provided
-that such works are identified as "derived from the RSA Data
-Security, Inc. MD5 Message-Digest Algorithm" in all material
-mentioning or referencing the derived work.
-
-RSA Data Security, Inc. makes no representations concerning either
-the merchantability of this software or the suitability of this
-software for any particular purpose. It is provided "as is"
-without express or implied warranty of any kind.
-
-These notices must be retained in any copies of any part of this
-documentation and/or software.
- */
-
-/* MD5 context. */
-typedef struct {
- UINT4 state[4]; /* state (ABCD) */
- UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
- unsigned char buffer[64]; /* input buffer */
-} MD5_CTX;
-
-void MD5Init PROTO_LIST ((MD5_CTX *));
-void MD5Update PROTO_LIST
- ((MD5_CTX *, unsigned char *, unsigned int));
-void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
+#endif /* md5.h */
diff -Nupr ssmtp-2.61.orig/md5auth/memxor.c ssmtp-2.61/md5auth/memxor.c
--- ssmtp-2.61.orig/md5auth/memxor.c 1970-01-01 02:00:00.000000000 +0200
+++ ssmtp-2.61/md5auth/memxor.c 2007-10-17 02:29:18.000000000 +0300
@@ -0,0 +1,37 @@
+/* memxor.c -- perform binary exclusive OR operation of two memory blocks.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Simon Josefsson. The interface was inspired by memxor
+ in Niels Möller's Nettle. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "memxor.h"
+
+void *
+memxor (void *restrict dest, const void *restrict src, size_t n)
+{
+ char const *s = src;
+ char *d = dest;
+
+ for (; n > 0; n--)
+ *d++ ^= *s++;
+
+ return dest;
+}
diff -Nupr ssmtp-2.61.orig/md5auth/memxor.h ssmtp-2.61/md5auth/memxor.h
--- ssmtp-2.61.orig/md5auth/memxor.h 1970-01-01 02:00:00.000000000 +0200
+++ ssmtp-2.61/md5auth/memxor.h 2007-10-17 02:29:18.000000000 +0300
@@ -0,0 +1,31 @@
+/* memxor.h -- perform binary exclusive OR operation on memory blocks.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Simon Josefsson. The interface was inspired by memxor
+ in Niels Möller's Nettle. */
+
+#ifndef MEMXOR_H
+# define MEMXOR_H
+
+#include <stddef.h>
+
+/* Compute binary exclusive OR of memory areas DEST and SRC, putting
+ the result in DEST, of length N bytes. Returns a pointer to
+ DEST. */
+void *memxor (void *restrict dest, const void *restrict src, size_t n);
+
+#endif /* MEMXOR_H */
diff -Nupr ssmtp-2.61.orig/md5auth/README ssmtp-2.61/md5auth/README
--- ssmtp-2.61.orig/md5auth/README 2007-10-17 02:20:25.000000000 +0300
+++ ssmtp-2.61/md5auth/README 1970-01-01 02:00:00.000000000 +0200
@@ -1,3 +0,0 @@
-The copyright on this software appears not to be free enough to distribut
-within Debian. I have left it here as a aid for users to compile support into
-their own binary but give other support to this code.
diff -Nupr ssmtp-2.61.orig/ssmtp.c ssmtp-2.61/ssmtp.c
--- ssmtp-2.61.orig/ssmtp.c 2007-10-17 02:20:25.000000000 +0300
+++ ssmtp-2.61/ssmtp.c 2007-10-17 02:29:18.000000000 +0300
@@ -35,7 +35,9 @@
#include <openssl/err.h>
#endif
#ifdef MD5AUTH
-#include "md5auth/hmac_md5.h"
+#include "md5auth/hmac.h"
+#define MD5_BLOCK_LEN 64
+#define MD5_DIGEST_LEN 16
#endif
#include "ssmtp.h"
#include <fcntl.h>
@@ -618,7 +620,7 @@ int crammd5(char *challengeb64, char *us
return 0;
from64tobits(challenge, challengeb64);
- hmac_md5(challenge, strlen(challenge), secret, strlen(secret), digest);
+ hmac_md5(secret, strlen(secret), challenge, strlen(challenge), digest);
for (i = 0; i < MD5_DIGEST_LEN; i++) {
digascii[2 * i] = hextab[digest[i] >> 4];
diff -Nupr ssmtp-2.61.orig/ssmtp.c.orig ssmtp-2.61/ssmtp.c.orig
--- ssmtp-2.61.orig/ssmtp.c.orig 2007-10-17 02:20:25.000000000 +0300
+++ ssmtp-2.61/ssmtp.c.orig 2007-10-17 02:29:11.000000000 +0300
@@ -708,6 +708,10 @@ void header_save(char *str)
else if(strncasecmp(ht->string, "Bcc:", 4) == 0) {
p = (ht->string + 4);
rcpt_parse(p);
+ /* Undo adding the header to the list: */
+ free(ht->string);
+ ht->string = NULL;
+ return;
}
else if(strncasecmp(ht->string, "CC:", 3) == 0) {
p = (ht->string + 3);
@@ -1406,6 +1410,7 @@ int ssmtp(char *argv[])
struct passwd *pw;
int i, sock;
uid_t uid;
+ bool_t minus_v_save;
int timeout = 0;
outbytes = 0;
@@ -1522,7 +1527,12 @@ int ssmtp(char *argv[])
#ifdef MD5AUTH
}
#endif
+ /* We do NOT want the password output to STDERR
+ * even base64 encoded.*/
+ minus_v_save = minus_v;
+ minus_v = False;
outbytes += smtp_write(sock, "%s", buf);
+ minus_v = minus_v_save;
(void)alarm((unsigned) MEDWAIT);
if(smtp_okay(sock, buf) == False) {
Index: ssmtp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ssmtp/F-7/ssmtp.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ssmtp.spec 27 Aug 2007 23:59:25 -0000 1.8
+++ ssmtp.spec 17 Oct 2007 00:29:30 -0000 1.9
@@ -1,10 +1,10 @@
Name: ssmtp
Version: 2.61
-Release: 11.3%{?dist}.1
+Release: 11.4%{?dist}
Summary: Extremely simple MTA to get mail off the system to a Mailhub
Group: Applications/Internet
License: GPLv2+
-URL: http://packages.debian.org/stable/mail/ssmtp.html
+URL: http://packages.debian.org/stable/mail/ssmtp
Source0: ftp://ftp.debian.org/debian/pool/main/s/%{name}/%{name}_%{version}.orig.tar.gz
#Patch0 http://ftp.debian.org/debian/pool/main/s/ssmtp/ssmtp_2.61-9.diff.gz
Patch0: %{name}-%{version}.6.patch
@@ -13,6 +13,9 @@
Patch3: %{name}-ssl.certificate.nomatch.patch
Patch4: %{name}-password-leak.patch
Patch5: %{name}-bcc-fix.patch
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340803
+# replaces RSA's md5 with a GPL compatible implementation
+Patch6: %{name}-md5auth-non-rsa
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Provides: MTA smtpdaemon %{_sbindir}/sendmail
Requires(post): %{_sbindir}/alternatives
@@ -38,6 +41,7 @@
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
%build
@@ -111,6 +115,11 @@
%changelog
+* Tue Oct 16 2007 lonely wolf <wolfy at nobugconsulting.ro> 2.61-11.4
+- includes patch from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340803
+ replacing md5 from RSA with a version released under GPLv2+
+- fix URL for upstream
+
* Fri Aug 22 2007 lonely wolf <wolfy at nobugconsulting.ro> 2.61-11.3.1
- rebuilt
More information about the fedora-extras-commits
mailing list