Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package courier-authlib for openSUSE:Factory checked in at 2022-03-08 20:32:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/courier-authlib (Old) and /work/SRC/openSUSE:Factory/.courier-authlib.new.2349 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "courier-authlib" Tue Mar 8 20:32:29 2022 rev:53 rq:960231 version:0.71.4 Changes: -------- --- /work/SRC/openSUSE:Factory/courier-authlib/courier-authlib.changes 2021-09-09 23:08:20.500886494 +0200 +++ /work/SRC/openSUSE:Factory/.courier-authlib.new.2349/courier-authlib.changes 2022-03-11 11:41:11.418602510 +0100 @@ -1,0 +2,8 @@ +Tue Mar 8 13:47:40 UTC 2022 - Arjen de Korte <suse+bu...@de-korte.org> + +- update to 0.71.4: + * Fix a theoretical memory corruption during authentication if the + process runs out of memory. The server does not do much memory + allocation prior to authentication, this is mostly academic. + +------------------------------------------------------------------- Old: ---- courier-authlib-0.71.3.tar.bz2 courier-authlib-0.71.3.tar.bz2.sig New: ---- courier-authlib-0.71.4.tar.bz2 courier-authlib-0.71.4.tar.bz2.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ courier-authlib.spec ++++++ --- /var/tmp/diff_new_pack.uSqs8v/_old 2022-03-11 11:41:11.850602995 +0100 +++ /var/tmp/diff_new_pack.uSqs8v/_new 2022-03-11 11:41:11.854602999 +0100 @@ -1,7 +1,7 @@ # # spec file for package courier-authlib # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: courier-authlib -Version: 0.71.3 +Version: 0.71.4 Release: 0 Summary: Courier authentication library License: SUSE-GPL-3.0-with-openssl-exception ++++++ courier-authlib-0.71.3.tar.bz2 -> courier-authlib-0.71.4.tar.bz2 ++++++ ++++ 2178 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/authdaemonrc.in new/courier-authlib-0.71.4/authdaemonrc.in --- old/courier-authlib-0.71.3/authdaemonrc.in 2021-03-14 18:44:49.000000000 +0100 +++ new/courier-authlib-0.71.4/authdaemonrc.in 2021-05-15 21:01:30.000000000 +0200 @@ -1,4 +1,4 @@ -##VERSION: $Id:$ +##VERSION: $Id: 7b218a8185f424046f3ef3322a37443983e443e3-20210515150130$ # # Copyright 2000-2005 Double Precision, Inc. See COPYING for # distribution information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/authldaprc new/courier-authlib-0.71.4/authldaprc --- old/courier-authlib-0.71.3/authldaprc 2016-01-08 03:46:50.000000000 +0100 +++ new/courier-authlib-0.71.4/authldaprc 2021-11-07 22:40:46.000000000 +0100 @@ -1,4 +1,4 @@ -##VERSION: $Id: 7ee49247d1dbf52d4bb8e0b1a180f2411aa3628a-20160107214650$ +##VERSION: $Id: c473c49f63772e95a791fb3b90275796c033920e-20211107164046$ # # Copyright 2000-2016 Double Precision, Inc. See COPYING for # distribution information. @@ -241,6 +241,9 @@ # into the following search string. "@user@" and "@realm@" are placeholders # for the user and the realm portions of the login ID. # +# This is an LDAP search filter, so \40 can be used to represent a literal +# @ character in the search string. +# # LDAP_EMAILMAP (&(userid=@user@)(realm=@realm@)) ##NAME: LDAP_EMAILMAP_BASEDN:0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/authmysqlrc new/courier-authlib-0.71.4/authmysqlrc --- old/courier-authlib-0.71.3/authmysqlrc 2016-04-18 14:32:35.000000000 +0200 +++ new/courier-authlib-0.71.4/authmysqlrc 2021-05-15 21:01:30.000000000 +0200 @@ -1,4 +1,4 @@ -##VERSION: $Id: 01c3b327e4d5b8f4123500ce4c8d0ef7a690c10d-20160418083235$ +##VERSION: $Id: 01c3b327e4d5b8f4123500ce4c8d0ef7a690c10d-20210515150130$ # # Copyright 2000-2007 Double Precision, Inc. See COPYING for # distribution information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/authpgsqlrc new/courier-authlib-0.71.4/authpgsqlrc --- old/courier-authlib-0.71.3/authpgsqlrc 2016-05-01 14:20:12.000000000 +0200 +++ new/courier-authlib-0.71.4/authpgsqlrc 2021-05-15 21:01:30.000000000 +0200 @@ -1,4 +1,4 @@ -##VERSION: $Id: c6a82fc8c0bd0e858ca7c133640ed14769e3e04c-20160501082012$ +##VERSION: $Id: c6a82fc8c0bd0e858ca7c133640ed14769e3e04c-20210515150130$ # # Copyright 2000-2004 Double Precision, Inc. See COPYING for # distribution information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/authsasl.c new/courier-authlib-0.71.4/authsasl.c --- old/courier-authlib-0.71.3/authsasl.c 2020-03-01 03:13:00.000000000 +0100 +++ new/courier-authlib-0.71.4/authsasl.c 2022-03-07 16:02:14.000000000 +0100 @@ -154,7 +154,7 @@ if ((*authdata_ptr=strdup(externalauth)) == NULL) { - free(authtype_ptr); + free(*authtype_ptr); return AUTHSASL_ABORTED; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/authsqliterc new/courier-authlib-0.71.4/authsqliterc --- old/courier-authlib-0.71.3/authsqliterc 2016-05-07 17:51:08.000000000 +0200 +++ new/courier-authlib-0.71.4/authsqliterc 2021-05-15 21:01:30.000000000 +0200 @@ -1,4 +1,4 @@ -##VERSION: $Id: 33c3875d1a259c6bca0f14cafb3a3e9b69b340e7-20160507115108$ +##VERSION: $Id: 098f1a6ea09983825bf6156d57a871f5fcf27b35-20210515150130$ # # Copyright 2012 Double Precision, Inc. See COPYING for # distribution information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/configure.ac new/courier-authlib-0.71.4/configure.ac --- old/courier-authlib-0.71.3/configure.ac 2021-04-13 02:51:58.000000000 +0200 +++ new/courier-authlib-0.71.4/configure.ac 2022-03-08 02:23:37.000000000 +0100 @@ -5,7 +5,7 @@ dnl distribution information. AC_PREREQ(2.63) -AC_INIT([courier-authlib],[0.71.3],[courier-us...@lists.sourceforge.net]) +AC_INIT([courier-authlib],[0.71.4],[courier-us...@lists.sourceforge.net]) AC_CONFIG_SRCDIR([courierauth.h]) @@ -76,11 +76,17 @@ CFLAGS="$CFLAGS -Ilibs -I${srcdir}/libs" CXXFLAGS="$CXXFLAGS -Ilibs -I${srcdir}/libs" -AC_MSG_CHECKING(whether -lm is needed for floor) -AC_TRY_LINK_FUNC(floor, - AC_MSG_RESULT(no), - LIBM="-lm" - AC_MSG_RESULT(yes)) +AC_MSG_CHECKING(whether -lm is needed for linking) + +OLDLIBS="$LIBS" +LIBS="$LIBS -lm" +AC_TRY_LINK([ +], [ +], + AC_MSG_RESULT(yes) + LIBM="-lm", + AC_MSG_RESULT(no)) +LIBS="$OLDLIBS" AC_ARG_WITH(pkgconfdir, [ --with-pkgconfdir=d Install config files in directory ], @@ -91,30 +97,60 @@ NETLIBS="" USENSL=no -AC_CHECK_LIB(socket,socket,result=yes,result=no) -if test $result = yes; then - NETLIBS="-lsocket" -else - AC_CHECK_LIB(socket,socket,result=yes,result=no,-lnsl) - if test $result = yes; then - NETLIBS = "-lsocket -lnsl" - USENSL=yes - else - AC_CHECK_LIB(socket,connect,result=yes,result=no) - if test $result = yes; then - NETLIBS="-lsocket" - else - AC_CHECK_LIB(socket,connect,result=yes,result=no,-lnsl) - if test $result = yes; then - NETLIBS="-lsocket -lnsl" - USENSL=yes - fi - fi - fi -fi +LIBS="$OLDLIBS -lsocket" + +AC_TRY_LINK([ +#include <sys/types.h> +#include <sys/socket.h> +], [ +(void)socket(0, 0, 0); +], [ + NETLIBS="-lsocket" +], +[ + +LIBS="$saveLIBS -lsocket -lnsl" + +AC_TRY_LINK([ +#include <sys/types.h> +#include <sys/socket.h> +], [ +(void)socket(0, 0, 0); +], [ + NETLIBS="-lsocket -lnsl" + USENSL=yes +], [ + +LIBS="$saveLIBS -lsocket" + +AC_TRY_LINK([ +#include <sys/types.h> +#include <sys/socket.h> +], [ +(void)connect(0, 0, 0); +], [ + NETLIBS="-lsocket" +], +[ + +LIBS="$saveLIBS -lsocket -lnsl" +AC_TRY_LINK([ +#include <sys/types.h> +#include <sys/socket.h> +], [ +(void)connect(0, 0, 0); +], [ + NETLIBS="-lsocket -lnsl" + USENSL=yes +], +[ +]) +]) +]) +]) if test $USENSL != yes; then - LIBS="$LIBS $NETLIBS" + LIBS="$saveLIBS $NETLIBS" AC_TRY_LINK_FUNC(inet_addr, [ : ], [ AC_CHECK_LIB(nsl,inet_addr,result=yes,result=no) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/courier-authlib.spec new/courier-authlib-0.71.4/courier-authlib.spec --- old/courier-authlib-0.71.3/courier-authlib.spec 2021-04-13 02:52:19.000000000 +0200 +++ new/courier-authlib-0.71.4/courier-authlib.spec 2022-03-08 02:29:31.000000000 +0100 @@ -14,7 +14,7 @@ ################################################################################ Name: courier-authlib -Version: 0.71.3 +Version: 0.71.4 Release: 1%{?dist}%{?courier_release} Summary: Courier authentication library diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/liblog/courierlogger.1 new/courier-authlib-0.71.4/liblog/courierlogger.1 --- old/courier-authlib-0.71.3/liblog/courierlogger.1 2020-10-29 03:04:01.000000000 +0100 +++ new/courier-authlib-0.71.4/liblog/courierlogger.1 2021-05-22 03:15:40.000000000 +0200 @@ -4,12 +4,12 @@ .\" Title: courierlogger .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 10/28/2020 +.\" Date: 05/21/2021 .\" Manual: Double Precision, Inc. .\" Source: Double Precision, Inc. .\" Language: English .\" -.TH "COURIERLOGGER" "1" "10/28/2020" "Double Precision, Inc." "Double Precision, Inc." +.TH "COURIERLOGGER" "1" "05/21/2021" "Double Precision, Inc." "Double Precision, Inc." .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/bdbobj/bdbobj2.c new/courier-authlib-0.71.4/libs/bdbobj/bdbobj2.c --- old/courier-authlib-0.71.3/libs/bdbobj/bdbobj2.c 2013-08-25 20:50:44.000000000 +0200 +++ new/courier-authlib-0.71.4/libs/bdbobj/bdbobj2.c 2022-01-18 11:00:03.000000000 +0100 @@ -70,6 +70,9 @@ } #endif + if (!key.data) + return 0; + *keylen=key.size; *vallen=value.size; if ((*val=(char *)malloc(*vallen + 1)) == 0) return (0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/gdbmobj/configure.ac new/courier-authlib-0.71.4/libs/gdbmobj/configure.ac --- old/courier-authlib-0.71.3/libs/gdbmobj/configure.ac 2020-04-22 11:00:03.000000000 +0200 +++ new/courier-authlib-0.71.4/libs/gdbmobj/configure.ac 2021-05-22 03:14:28.000000000 +0200 @@ -49,27 +49,4 @@ dnl Checks for library functions. -AC_LANG_CPLUSPLUS -AC_CACHE_CHECK([if the C++ compiler needs -fhandle-exceptions], - ac_cv_need_handlexceptions, - -AC_TRY_COMPILE([], -[ -throw; -], ac_cv_need_handlexceptions=no, -ac_cv_need_handlexceptions=yes) -) - -if test "$ac_cv_need_handlexceptions" = "yes" -then - case "$CXXFLAGS" in - *handle-exceptions*) - ;; - *) - CXXFLAGS="-fhandle-exceptions $CXXFLAGS" - CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-O2//'` - ;; - esac -fi - AC_OUTPUT(Makefile) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/liblock/configure.ac new/courier-authlib-0.71.4/libs/liblock/configure.ac --- old/courier-authlib-0.71.3/libs/liblock/configure.ac 2020-04-22 11:00:03.000000000 +0200 +++ new/courier-authlib-0.71.4/libs/liblock/configure.ac 2021-05-22 03:14:28.000000000 +0200 @@ -42,8 +42,8 @@ liblock_cv_hasoff64t="no" AC_TRY_COMPILE([ #include <sys/types.h> -],[ off64_t n; +],[ n=0; ], liblock_cv_hasoff64t="yes") @@ -72,8 +72,8 @@ #if HAVE_SYS_FCNTL_H #include <sys/fcntl.h> #endif -],[ flock_t t; +],[ ], liblock_cv_hasflock_t="yes")) if test "$liblock_cv_hasflock_t" = "yes" @@ -95,8 +95,8 @@ AC_TRY_LINK([ #define LL_OFFSET_TYPE $LL_OFFSET_TYPE #include "${srcdir}/lockfcntl.c" -],[ int n; +],[ ], liblock_cv_hasfcntl="yes")) if test "$liblock_cv_hasfcntl" = "yes" then @@ -109,8 +109,8 @@ AC_TRY_LINK([ #define LL_OFFSET_TYPE $LL_OFFSET_TYPE #include "${srcdir}/lockflock.c" -],[ int n; +],[ ], liblock_cv_hasflock="yes")) if test "$liblock_cv_hasflock" = "yes" then @@ -123,8 +123,8 @@ AC_TRY_LINK([ #define LL_OFFSET_TYPE $LL_OFFSET_TYPE #include "${srcdir}/locklockf.c" -],[ int n; +],[ ], liblock_cv_haslockf="yes")) if test "$liblock_cv_haslockf" = "yes" then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/liblock/lockmail.1 new/courier-authlib-0.71.4/libs/liblock/lockmail.1 --- old/courier-authlib-0.71.3/libs/liblock/lockmail.1 2020-10-29 03:04:01.000000000 +0100 +++ new/courier-authlib-0.71.4/libs/liblock/lockmail.1 2021-05-22 03:15:40.000000000 +0200 @@ -4,12 +4,12 @@ .\" Title: lockmail .\" Author: Sam Varshavchik .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 10/28/2020 +.\" Date: 05/21/2021 .\" Manual: Double Precision, Inc. .\" Source: Courier Mail Server .\" Language: English .\" -.TH "LOCKMAIL" "1" "10/28/2020" "Courier Mail Server" "Double Precision, Inc\&." +.TH "LOCKMAIL" "1" "05/21/2021" "Courier Mail Server" "Double Precision, Inc\&." .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/liblock/locktest.c new/courier-authlib-0.71.4/libs/liblock/locktest.c --- old/courier-authlib-0.71.3/libs/liblock/locktest.c 2014-07-13 15:58:08.000000000 +0200 +++ new/courier-authlib-0.71.4/libs/liblock/locktest.c 2021-05-22 03:14:28.000000000 +0200 @@ -13,6 +13,13 @@ #if USE_LOCKF #include "locklockf.c" #endif +#if HAVE_UNISTD_H +#include <unistd.h> +#endif +#include <sys/types.h> +#if HAVE_SYS_WAIT_H +#include <sys/wait.h> +#endif #include <signal.h> #include <stdlib.h> #include <string.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/md5/configure.ac new/courier-authlib-0.71.4/libs/md5/configure.ac --- old/courier-authlib-0.71.3/libs/md5/configure.ac 2020-04-22 11:00:03.000000000 +0200 +++ new/courier-authlib-0.71.4/libs/md5/configure.ac 2021-05-22 03:14:28.000000000 +0200 @@ -35,7 +35,7 @@ dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(sys/types.h) +AC_CHECK_HEADERS(sys/types.h stdint.h) AC_ARG_WITH(int32, @@ -49,8 +49,11 @@ #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif +#if HAVE_STDINT_H +#include <stdint.h> +#endif +uint32_t i; ],[ - uint32_t i=0; ], [ AC_MSG_RESULT(yes) ; int32="uint32_t"], [ AC_MSG_RESULT(no) @@ -60,8 +63,11 @@ #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif +#if HAVE_STDINT_H +#include <stdint.h> +#endif +u_int32_t i; ],[ - u_int32_t i=0; ], [AC_MSG_RESULT(yes); int32="u_int32_t"],[ AC_MSG_RESULT(no) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/md5/md5.h new/courier-authlib-0.71.4/libs/md5/md5.h --- old/courier-authlib-0.71.3/libs/md5/md5.h 2013-08-25 20:50:44.000000000 +0200 +++ new/courier-authlib-0.71.4/libs/md5/md5.h 2021-05-22 03:14:28.000000000 +0200 @@ -24,6 +24,9 @@ #include <sys/types.h> #endif +#if HAVE_STDINT_H +#include <stdint.h> +#endif #define MD5_DIGEST_SIZE 16 #define MD5_BLOCK_SIZE 64 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/numlib/changeuidgid.c new/courier-authlib-0.71.4/libs/numlib/changeuidgid.c --- old/courier-authlib-0.71.3/libs/numlib/changeuidgid.c 2013-08-25 20:50:44.000000000 +0200 +++ new/courier-authlib-0.71.4/libs/numlib/changeuidgid.c 2022-03-07 11:00:04.000000000 +0100 @@ -47,16 +47,21 @@ } } -void libmail_changeusername(const char *uname, const gid_t *forcegrp) +/** + * Obtain the uid associated to uname and, optionally, the user primary gid + */ +uid_t libmail_getuid(const char *uname, gid_t *pw_gid) { -struct passwd *pw; -uid_t changeuid; -gid_t changegid; - -/* uname might be a pointer returned from a previous called to getpw(), -** and libc has a problem getting it back. -*/ -char *p=malloc(strlen(uname)+1); + size_t bufsize; + char *buf; + struct passwd pwbuf; + struct passwd *pw; + + /* + ** uname might be a pointer returned from a previous called to getpw(), + ** and libc has a problem getting it back. + */ + char *p=malloc(strlen(uname)+1); if (!p) { @@ -65,8 +70,29 @@ } strcpy(p, uname); +#ifdef _SC_GETGR_R_SIZE_MAX + bufsize = sysconf(_SC_GETGR_R_SIZE_MAX); + if (bufsize == -1) /* Value was indeterminate */ + { +#endif + bufsize = 16384; /* Should be more than enough */ + } + + buf = malloc(bufsize); + if (buf == NULL) + { + perror("malloc"); + exit(1); + } + + errno=ENOENT; - if ((pw=getpwnam(p)) == 0) + + getpwnam_r(p, &pwbuf, buf, bufsize, &pw); + + free(buf); + + if (pw == 0) { free(p); perror("getpwnam"); @@ -74,11 +100,19 @@ } free(p); - changeuid=pw->pw_uid; + if ( pw_gid ) *pw_gid = pw->pw_gid; + + return pw->pw_uid; +} + +void libmail_changeusername(const char *uname, const gid_t *forcegrp) +{ +uid_t changeuid; +gid_t changegid; - if ( !forcegrp ) forcegrp= &pw->pw_gid; + changeuid=libmail_getuid(uname, &changegid); - changegid= *forcegrp; + if ( forcegrp ) changegid= *forcegrp; if ( setgid( changegid )) { @@ -87,7 +121,7 @@ } #if HAVE_INITGROUPS - if ( getuid() == 0 && initgroups(pw->pw_name, changegid) ) + if ( getuid() == 0 && initgroups(uname, changegid) ) { perror("initgroups"); exit(1); @@ -108,3 +142,58 @@ exit(1); } } + +gid_t libmail_getgid(const char *gname) +{ + gid_t g; + struct group grp; + struct group *result; + char *buf; + size_t bufsize; + int s; + char *p=malloc(strlen(gname)+1); + + if (!p) + { + perror("malloc"); + exit(1); + } + strcpy(p, gname); + +#ifdef _SC_GETGR_R_SIZE_MAX + bufsize = sysconf(_SC_GETGR_R_SIZE_MAX); + if (bufsize == -1) /* Value was indeterminate */ +#endif + { + bufsize = 16384; /* Should be more than enough */ + } + + buf = malloc(bufsize); + if (buf == NULL) + { + perror("malloc"); + exit(1); + } + + s = getgrnam_r(p, &grp, buf, bufsize, &result); + free(p); + + if (result == NULL) + { + if (s == 0) + { + fprintf(stderr, "CRIT: Group %s not found\n", gname); + } + else + { + errno = s; + perror("getpwnam_r"); + } + exit(1); + } + + g = grp.gr_gid; + free(buf); + + return g; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/numlib/numlib.h new/courier-authlib-0.71.4/libs/numlib/numlib.h --- old/courier-authlib-0.71.3/libs/numlib/numlib.h 2013-08-25 20:50:44.000000000 +0200 +++ new/courier-authlib-0.71.4/libs/numlib/numlib.h 2022-03-07 11:00:04.000000000 +0100 @@ -95,6 +95,9 @@ ** no aux group IDs for the user, any AUX ids are cleared. */ +uid_t libmail_getuid(const char *, gid_t *); +gid_t libmail_getgid(const char *); + #ifdef __cplusplus } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/rfc822/config.h.in new/courier-authlib-0.71.4/libs/rfc822/config.h.in --- old/courier-authlib-0.71.3/libs/rfc822/config.h.in 2021-02-06 15:52:03.000000000 +0100 +++ new/courier-authlib-0.71.4/libs/rfc822/config.h.in 2021-05-22 03:15:28.000000000 +0200 @@ -21,18 +21,12 @@ /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H -/* Define to 1 if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP - /* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the `strncasecmp' function. */ -#undef HAVE_STRNCASECMP - /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/rfc822/configure.ac new/courier-authlib-0.71.4/libs/rfc822/configure.ac --- old/courier-authlib-0.71.3/libs/rfc822/configure.ac 2020-04-22 11:00:03.000000000 +0200 +++ new/courier-authlib-0.71.4/libs/rfc822/configure.ac 2021-05-22 03:14:28.000000000 +0200 @@ -29,7 +29,7 @@ dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(locale.h) +AC_CHECK_HEADERS(locale.h strings.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -58,28 +58,31 @@ AC_MSG_CHECKING([if Libidn should be used]) AC_MSG_RESULT($libidn) -AC_CHECK_FUNCS(strcasecmp strncasecmp setlocale) +AC_CHECK_FUNCS(setlocale) AC_CACHE_CHECK([how to calculate alternate timezone],librfc822_cv_SYS_TIMEZONE, AC_TRY_COMPILE([ #include <time.h> +time_t t; ],[ -time_t t=altzone; +t=altzone; ], librfc822_cv_SYS_TIMEZONE=altzone, AC_TRY_COMPILE([ #include <time.h> +int n; ],[ -int n=daylight; + n=daylight; ], librfc822_cv_SYS_TIMEZONE=daylight, AC_TRY_COMPILE([ #include <time.h> extern struct tm dummy; +long n; ],[ -long n=dummy.tm_gmtoff; + n=dummy.tm_gmtoff; ] ,librfc822_cv_SYS_TIMEZONE=tm_gmtoff, librfc822_cv_SYS_TIMEZONE=unknown ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/rfc822/imapsubj.c new/courier-authlib-0.71.4/libs/rfc822/imapsubj.c --- old/courier-authlib-0.71.3/libs/rfc822/imapsubj.c 2013-08-25 20:50:44.000000000 +0200 +++ new/courier-authlib-0.71.4/libs/rfc822/imapsubj.c 2021-05-22 03:14:28.000000000 +0200 @@ -10,19 +10,10 @@ #include <ctype.h> #include <stdlib.h> #include <string.h> -#include "rfc822.h" - -#if HAVE_STRCASECMP - -#else -#define strcasecmp stricmp -#endif - -#if HAVE_STRNCASECMP - -#else -#define strncasecmp strnicmp +#if HAVE_STRINGS_H +#include <strings.h> #endif +#include "rfc822.h" /* Skip over blobs */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/rfc822/rfc822.3 new/courier-authlib-0.71.4/libs/rfc822/rfc822.3 --- old/courier-authlib-0.71.3/libs/rfc822/rfc822.3 2020-10-29 03:04:01.000000000 +0100 +++ new/courier-authlib-0.71.4/libs/rfc822/rfc822.3 2021-05-22 03:15:29.000000000 +0200 @@ -4,12 +4,12 @@ .\" Title: rfc822 .\" Author: Sam Varshavchik .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 10/28/2020 +.\" Date: 05/21/2021 .\" Manual: Double Precision, Inc. .\" Source: Courier Mail Server .\" Language: English .\" -.TH "RFC822" "3" "10/28/2020" "Courier Mail Server" "Double Precision, Inc\&." +.TH "RFC822" "3" "05/21/2021" "Courier Mail Server" "Double Precision, Inc\&." .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/sha1/configure.ac new/courier-authlib-0.71.4/libs/sha1/configure.ac --- old/courier-authlib-0.71.3/libs/sha1/configure.ac 2020-04-22 11:00:03.000000000 +0200 +++ new/courier-authlib-0.71.4/libs/sha1/configure.ac 2021-05-22 03:14:28.000000000 +0200 @@ -32,7 +32,7 @@ dnl Checks for header files. -AC_CHECK_HEADERS(sys/types.h) +AC_CHECK_HEADERS(sys/types.h stdint.h) AC_ARG_WITH(int32, [ --with-int32='type' use 'type' for an unsigned 32 bit integer type @@ -45,8 +45,11 @@ #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif +#if HAVE_STDINT_H +#include <stdint.h> +#endif +uint32_t i; ],[ - uint32_t i=0; ], [ AC_MSG_RESULT(yes) ; int32="uint32_t"], [ AC_MSG_RESULT(no) @@ -56,8 +59,11 @@ #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif +#if HAVE_STDINT_H +#include <stdint.h> +#endif +u_int32_t i; ],[ - u_int32_t i=0; ], [AC_MSG_RESULT(yes); int32="u_int32_t"],[ AC_MSG_RESULT(no) @@ -99,8 +105,11 @@ #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif +#if HAVE_STDINT_H +#include <stdint.h> +#endif +uint64_t i; ],[ - uint64_t i=0; ], [ AC_MSG_RESULT(yes) ; int64="uint64_t"], [ AC_MSG_RESULT(no) @@ -110,8 +119,11 @@ #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif +#if HAVE_STDINT_H +#include <stdint.h> +#endif +u_int64_t i; ],[ - u_int64_t i=0; ], [AC_MSG_RESULT(yes); int64="u_int64_t"],[ AC_MSG_RESULT(no) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/courier-authlib-0.71.3/libs/sha1/sha1.h new/courier-authlib-0.71.4/libs/sha1/sha1.h --- old/courier-authlib-0.71.3/libs/sha1/sha1.h 2013-08-25 20:50:44.000000000 +0200 +++ new/courier-authlib-0.71.4/libs/sha1/sha1.h 2021-05-22 03:14:28.000000000 +0200 @@ -14,6 +14,9 @@ #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif +#if HAVE_STDINT_H +#include <stdint.h> +#endif #define SHA1_DIGEST_SIZE 20 #define SHA1_BLOCK_SIZE 64