diff -Nru dovecot-2.3.21.1+dfsg1/aclocal.m4 dovecot-2.4.1+dfsg1/aclocal.m4 --- dovecot-2.3.21.1+dfsg1/aclocal.m4 2024-08-13 06:37:57.000000000 -0400 +++ dovecot-2.4.1+dfsg1/aclocal.m4 2025-03-28 07:32:37.000000000 -0400 @@ -3422,29 +3422,24 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -m4_include([m4/ac_checktype2.m4]) m4_include([m4/ac_typeof.m4]) m4_include([m4/arc4random.m4]) m4_include([m4/blockdev.m4]) -m4_include([m4/c99_vsnprintf.m4]) -m4_include([m4/clock_gettime.m4]) m4_include([m4/crypt.m4]) m4_include([m4/crypt_xpg6.m4]) m4_include([m4/dbqlk.m4]) m4_include([m4/dirent_dtype.m4]) m4_include([m4/dovecot.m4]) +m4_include([m4/dovecot_pro.m4]) +m4_include([m4/faccessat2.m4]) m4_include([m4/fd_passing.m4]) -m4_include([m4/fdatasync.m4]) -m4_include([m4/flexible_array_member.m4]) m4_include([m4/glibc.m4]) m4_include([m4/gmtime_max.m4]) m4_include([m4/gmtime_tm_gmtoff.m4]) m4_include([m4/ioloop.m4]) m4_include([m4/iovec.m4]) -m4_include([m4/ipv6.m4]) m4_include([m4/libcap.m4]) m4_include([m4/libtool.m4]) -m4_include([m4/libwrap.m4]) m4_include([m4/linux_mremap.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) @@ -3462,17 +3457,16 @@ m4_include([m4/quota.m4]) m4_include([m4/random.m4]) m4_include([m4/rlimit.m4]) +m4_include([m4/sched.m4]) m4_include([m4/sendfile.m4]) m4_include([m4/size_t_signed.m4]) m4_include([m4/sockpeercred.m4]) m4_include([m4/sql.m4]) m4_include([m4/ssl.m4]) m4_include([m4/st_tim.m4]) -m4_include([m4/static_array.m4]) m4_include([m4/test_with.m4]) m4_include([m4/time_t.m4]) m4_include([m4/typeof.m4]) -m4_include([m4/typeof_dev_t.m4]) m4_include([m4/uoff_t_max.m4]) m4_include([m4/vararg.m4]) m4_include([m4/want_apparmor.m4]) @@ -3480,21 +3474,17 @@ m4_include([m4/want_bzlib.m4]) m4_include([m4/want_cassandra.m4]) m4_include([m4/want_cdb.m4]) -m4_include([m4/want_checkpassword.m4]) -m4_include([m4/want_clucene.m4]) -m4_include([m4/want_db.m4]) +m4_include([m4/want_flatcurve.m4]) m4_include([m4/want_gssapi.m4]) m4_include([m4/want_icu.m4]) m4_include([m4/want_ldap.m4]) m4_include([m4/want_lua.m4]) m4_include([m4/want_lz4.m4]) -m4_include([m4/want_lzma.m4]) m4_include([m4/want_mysql.m4]) m4_include([m4/want_pam.m4]) m4_include([m4/want_passwd.m4]) m4_include([m4/want_pgsql.m4]) m4_include([m4/want_prefetch.m4]) -m4_include([m4/want_shadow.m4]) m4_include([m4/want_sodium.m4]) m4_include([m4/want_solr.m4]) m4_include([m4/want_sqlite.m4]) @@ -3502,5 +3492,5 @@ m4_include([m4/want_systemd.m4]) m4_include([m4/want_textcat.m4]) m4_include([m4/want_unwind.m4]) -m4_include([m4/want_zlib.m4]) m4_include([m4/want_zstd.m4]) +m4_include([m4/zlib.m4]) diff -Nru dovecot-2.3.21.1+dfsg1/AUTHORS dovecot-2.4.1+dfsg1/AUTHORS --- dovecot-2.3.21.1+dfsg1/AUTHORS 2024-08-13 06:37:50.000000000 -0400 +++ dovecot-2.4.1+dfsg1/AUTHORS 2025-03-28 07:32:27.000000000 -0400 @@ -21,4 +21,6 @@ SMTP fuzzer code by Catena cyber +FTS flatcurve by Michael Slusarz + Grepping 'Patch by' from ChangeLog shows up more people. diff -Nru dovecot-2.3.21.1+dfsg1/build-aux/compile dovecot-2.4.1+dfsg1/build-aux/compile --- dovecot-2.3.21.1+dfsg1/build-aux/compile 1969-12-31 19:00:00.000000000 -0500 +++ dovecot-2.4.1+dfsg1/build-aux/compile 2025-03-28 07:32:40.000000000 -0400 @@ -0,0 +1,348 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN* | MSYS*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/* | msys/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff -Nru dovecot-2.3.21.1+dfsg1/build-aux/config.guess dovecot-2.4.1+dfsg1/build-aux/config.guess --- dovecot-2.3.21.1+dfsg1/build-aux/config.guess 1969-12-31 19:00:00.000000000 -0500 +++ dovecot-2.4.1+dfsg1/build-aux/config.guess 2025-03-28 07:32:40.000000000 -0400 @@ -0,0 +1,1480 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2018 Free Software Foundation, Inc. + +timestamp='2018-02-24' + +# This file 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 3 of the License, 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, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2018 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > "$dummy.c" ; + for c in cc gcc c89 c99 ; do + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval "$set_cc_for_build" + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval "$set_cc_for_build" + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "$UNAME_VERSION" in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "$machine-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; + *:ekkoBSD:*:*) + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; + *:SolidBSD:*:*) + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:MirBSD:*:*) + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval "$set_cc_for_build" + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos"$UNAME_RELEASE" + ;; + sun4) + echo sparc-sun-sunos"$UNAME_RELEASE" + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + then + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] + then + echo m88k-dg-dgux"$UNAME_RELEASE" + else + echo m88k-dg-dguxbcs"$UNAME_RELEASE" + fi + else + echo i586-dg-dgux"$UNAME_RELEASE" + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ "$HP_ARCH" = hppa2.0w ] + then + eval "$set_cc_for_build" + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" + exit ;; + 3050*:HI-UX:*:*) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo "$UNAME_MACHINE"-unknown-osf1mk + else + echo "$UNAME_MACHINE"-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:BSD/OS:*:*) + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case "$UNAME_PROCESSOR" in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + i*:CYGWIN*:*) + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; + *:MINGW*:*) + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys + exit ;; + i*:PW*:*) + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; + *:Interix*:*) + case "$UNAME_MACHINE" in + x86) + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; + IA64) + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; + esac ;; + i*:UWIN*:*) + echo "$UNAME_MACHINE"-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + *:GNU:*:*) + # the GNU system + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; + i*86:Minix:*:*) + echo "$UNAME_MACHINE"-pc-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arm*:Linux:*:*) + eval "$set_cc_for_build" + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + else + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + cris:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + crisv32:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + frv:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + hexagon:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + ia64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m32r*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m68*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + ;; + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-"$LIBC" + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-"$LIBC" + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-"$LIBC" + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; + sh64*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sh*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + tile*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + vax:Linux:*:*) + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; + x86_64:Linux:*:*) + if objdump -f /bin/sh | grep -q elf32-x86-64; then + echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 + else + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + fi + exit ;; + xtensa*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo "$UNAME_MACHINE"-unknown-stop + exit ;; + i*86:atheos:*:*) + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo "$UNAME_MACHINE"-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; + i*86:*DOS:*:*) + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo "$UNAME_MACHINE"-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo "$UNAME_MACHINE"-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv"$UNAME_RELEASE" + else + echo mips-unknown-sysv"$UNAME_RELEASE" + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Rhapsody:*:*) + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval "$set_cc_for_build" + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; + *:DragonFly:*:*) + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + exit ;; + i*86:rdos:*:*) + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; +esac + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 </dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-functions 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff -Nru dovecot-2.3.21.1+dfsg1/build-aux/config.rpath dovecot-2.4.1+dfsg1/build-aux/config.rpath --- dovecot-2.3.21.1+dfsg1/build-aux/config.rpath 1969-12-31 19:00:00.000000000 -0500 +++ dovecot-2.4.1+dfsg1/build-aux/config.rpath 2025-03-28 07:32:30.000000000 -0400 @@ -0,0 +1,684 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2020 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit , 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# known workaround is to choose shorter directory names for the build +# directory and/or the installation directory. + +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +shrext=.so + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's _LT_COMPILER_PIC. + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + ecc*) + wl='-Wl,' + ;; + icc* | ifort*) + wl='-Wl,' + ;; + lf95*) + wl='-Wl,' + ;; + nagfor*) + wl='-Wl,-Wl,,' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; + xl* | bgxl* | bgf* | mpixl*) + wl='-Wl,' + ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ F* | *Sun*Fortran*) + wl= + ;; + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; + esac + ;; + newsos6) + ;; + *nto* | *qnx*) + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + rdos*) + ;; + solaris*) + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + wl='-Qoption ld ' + ;; + *) + wl='-Wl,' + ;; + esac + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + wl='-Wl,' + ;; + unicos*) + wl='-Wl,' + ;; + uts4*) + ;; + esac +fi + +# Code taken from libtool.m4's _LT_LINKER_SHLIBS. + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + case "$host_os" in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32* | cegcc*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + haiku*) + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + fi + ;; + amigaos*) + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + bsdi[45]*) + ;; + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + hardcode_direct=no + if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then + : + else + ld_shlibs=no + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd2.[01]*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd* | dragonfly*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + ;; + *) + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + *nto* | *qnx*) + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + ;; + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 +libname_spec='lib$name' +case "$host_os" in + aix3*) + library_names_spec='$libname.a' + ;; + aix[4-9]*) + library_names_spec='$libname$shrext' + ;; + amigaos*) + case "$host_cpu" in + powerpc*) + library_names_spec='$libname$shrext' ;; + m68k) + library_names_spec='$libname.a' ;; + esac + ;; + beos*) + library_names_spec='$libname$shrext' + ;; + bsdi[45]*) + library_names_spec='$libname$shrext' + ;; + cygwin* | mingw* | pw32* | cegcc*) + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' + ;; + darwin* | rhapsody*) + shrext=.dylib + library_names_spec='$libname$shrext' + ;; + dgux*) + library_names_spec='$libname$shrext' + ;; + freebsd[23].*) + library_names_spec='$libname$shrext$versuffix' + ;; + freebsd* | dragonfly*) + library_names_spec='$libname$shrext' + ;; + gnu*) + library_names_spec='$libname$shrext' + ;; + haiku*) + library_names_spec='$libname$shrext' + ;; + hpux9* | hpux10* | hpux11*) + case $host_cpu in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + library_names_spec='$libname$shrext' + ;; + interix[3-9]*) + library_names_spec='$libname$shrext' + ;; + irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' + ;; + netbsd*) + library_names_spec='$libname$shrext' + ;; + newsos6) + library_names_spec='$libname$shrext' + ;; + *nto* | *qnx*) + library_names_spec='$libname$shrext' + ;; + openbsd*) + library_names_spec='$libname$shrext$versuffix' + ;; + os2*) + libname_spec='$name' + shrext=.dll + library_names_spec='$libname.a' + ;; + osf3* | osf4* | osf5*) + library_names_spec='$libname$shrext' + ;; + rdos*) + ;; + solaris*) + library_names_spec='$libname$shrext' + ;; + sunos4*) + library_names_spec='$libname$shrext$versuffix' + ;; + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' + ;; + sysv4*MP*) + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + tpf*) + library_names_spec='$libname$shrext' + ;; + uts4*) + library_names_spec='$libname$shrext' + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2018 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo "$1" | sed 's/-[^-]*$//'` + if [ "$basic_machine" != "$1" ] + then os=`echo "$1" | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ + | pyramid-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-pc + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2*) + basic_machine=m68k-bull + os=-sysv3 + ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + x64) + basic_machine=x86_64-pc + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases that might get confused + # with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4*) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; + -nacl*) + ;; + -ios) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + pru-*) + os=-elf + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` + ;; +esac + +echo "$basic_machine$os" +exit + +# Local variables: +# eval: (add-hook 'write-file-functions 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff -Nru dovecot-2.3.21.1+dfsg1/build-aux/depcomp dovecot-2.4.1+dfsg1/build-aux/depcomp --- dovecot-2.3.21.1+dfsg1/build-aux/depcomp 1969-12-31 19:00:00.000000000 -0500 +++ dovecot-2.4.1+dfsg1/build-aux/depcomp 2025-03-28 07:32:44.000000000 -0400 @@ -0,0 +1,791 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1999-2020 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff -Nru dovecot-2.3.21.1+dfsg1/build-aux/git-abi-version-gen dovecot-2.4.1+dfsg1/build-aux/git-abi-version-gen --- dovecot-2.3.21.1+dfsg1/build-aux/git-abi-version-gen 1969-12-31 19:00:00.000000000 -0500 +++ dovecot-2.4.1+dfsg1/build-aux/git-abi-version-gen 2025-03-28 07:32:27.000000000 -0400 @@ -0,0 +1,39 @@ +#!/bin/sh + +set -eu + +# serial 2 + +# Converts version to ABI version (discards extra information) + +mangle_version() +{ + case "$1" in + # Convert YYYY.nn-foo+bar (rolling release) to + # YYYY.ABIvnn + 20*[[:digit:]].*[[:digit:]]) + echo \"`echo $1 | sed -e "s/^\(20[0-9]*\)\.\([0-9]*\).*/\1.ABIv\2/"`\" + ;; + # Convert 2.x.x-foo+bar and 3.x.x-foo+bar to + # MAJOR.MINOR.ABIvPATCH + [23].*[[:digit:]].*[[:digit:]]) + echo \"`echo $1 | sed -e "s/^\([0-9]*\.[0-9]*\)\.\([0-9]*\).*/\1.ABIv\2/"`\" + ;; + *) + echo "\"0.0.ABIv0\"" + ;; + esac +} + +if test "${VERSION:-}" != ""; then + : +elif test -f version; then + VERSION="`cat version`" +elif test -e .git; then + VERSION="0.0.0" +else + echo "Cannot determine version number">&2 + exit 1 +fi + +mangle_version $VERSION diff -Nru dovecot-2.3.21.1+dfsg1/build-aux/git-version-gen dovecot-2.4.1+dfsg1/build-aux/git-version-gen --- dovecot-2.3.21.1+dfsg1/build-aux/git-version-gen 1969-12-31 19:00:00.000000000 -0500 +++ dovecot-2.4.1+dfsg1/build-aux/git-version-gen 2025-03-28 07:32:27.000000000 -0400 @@ -0,0 +1,18 @@ +#!/bin/sh + +# serial 2 + +if test "${VERSION}" != ""; then + VN="${VERSION}" +elif test -s version; then + VN=`cat version` +elif test -e .git; then + VN="0.0.0-`git rev-list --count HEAD`+`git describe --always`" + git update-index -q --refresh >/dev/null 2>&1 + test x = x"`git diff-index --name-only HEAD --`" || VN="${VN}-dirty" +else + echo "Cannot determine version number">&2 + exit 1 +fi + +echo $VN diff -Nru dovecot-2.3.21.1+dfsg1/build-aux/install-sh dovecot-2.4.1+dfsg1/build-aux/install-sh --- dovecot-2.3.21.1+dfsg1/build-aux/install-sh 1969-12-31 19:00:00.000000000 -0500 +++ dovecot-2.4.1+dfsg1/build-aux/install-sh 2025-03-28 07:32:40.000000000 -0400 @@ -0,0 +1,541 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2020-11-14.01; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +tab=' ' +nl=' +' +IFS=" $tab$nl" + +# Set DOITPROG to "echo" to test this script. + +doit=${DOITPROG-} +doit_exec=${doit:-exec} + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +is_target_a_directory=possibly + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. + -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -p) cpprog="$cpprog -p";; + + -s) stripcmd=$stripprog;; + + -S) backupsuffix="$2" + shift;; + + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) is_target_a_directory=never;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename. + if test -d "$dst"; then + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? + fi + fi + + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir + shift + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff -Nru dovecot-2.3.21.1+dfsg1/build-aux/ltmain.sh dovecot-2.4.1+dfsg1/build-aux/ltmain.sh --- dovecot-2.3.21.1+dfsg1/build-aux/ltmain.sh 1969-12-31 19:00:00.000000000 -0500 +++ dovecot-2.4.1+dfsg1/build-aux/ltmain.sh 2025-03-28 07:32:34.000000000 -0400 @@ -0,0 +1,11251 @@ +#! /bin/sh +## DO NOT EDIT - This file generated from ./build-aux/ltmain.in +## by inline-source v2014-01-03.01 + +# libtool (GNU libtool) 2.4.6 +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool 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 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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, see . + + +PROGRAM=libtool +PACKAGE=libtool +VERSION="2.4.6 Debian-2.4.6-15" +package_revision=2.4.6 + + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2015-01-20.17; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# 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 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES 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, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac +fi + +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" + fi" +done + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" + +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + + +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + +# We want to be able to use the functions in this file before configure +# has figured out where the best binaries are kept, which means we have +# to search for them ourselves - except when the results are already set +# where we skip the searches. + +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + rm -f conftest.sed + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the grep that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. + +: ${CP="cp -f"} +: ${ECHO="printf %s\n"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} + + +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## + +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Same as above, but do not quote variable references. +sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' + +# Sed substitution that converts a w32 file name or path +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" + + +## ----------------- ## +## Global variables. ## +## ----------------- ## + +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. + +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: + +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. +exit_status=$EXIT_SUCCESS + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath=$0 + +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` + +# Make sure we have an absolute progpath for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` + progdir=`cd "$progdir" && pwd` + progpath=$progdir/$progname + ;; + *) + _G_IFS=$IFS + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS=$_G_IFS + test -x "$progdir/$progname" && break + done + IFS=$_G_IFS + test -n "$progdir" || progdir=`pwd` + progpath=$progdir/$progname + ;; +esac + + +## ----------------- ## +## Standard options. ## +## ----------------- ## + +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. + +opt_dry_run=false +opt_quiet=false +opt_verbose=false + +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= + +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue + +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all + + +## -------------------- ## +## Resource management. ## +## -------------------- ## + +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. + + +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () +{ + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='' + tc_bold=''; tc_standout='' + tc_red=''; tc_green='' + tc_blue=''; tc_cyan='' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } + + require_term_colors=: +} + + +## ----------------- ## +## Function library. ## +## ----------------- ## + +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. + + +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. + + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () +{ + $debug_cmd + + eval _G_current_value='`$ECHO $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac +} + + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () +{ + $debug_cmd + + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +eval 'func_dirname () +{ + $debug_cmd + + '"$_d"' +}' + + +# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT +# -------------------------------------------------------- +# Perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () +{ + $debug_cmd + + '"$_b"' + '"$_d"' +}' + + +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_echo_all ARG... +# -------------------- +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () +{ + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` + _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS +} + + +# func_error ARG... +# ----------------- +# Echo program name prefixed message to standard error. +func_error () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 +} + + +# func_fatal_error ARG... +# ----------------------- +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + $debug_cmd + + func_error "$*" + exit $EXIT_FAILURE +} + + +# func_grep EXPRESSION FILENAME +# ----------------------------- +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $debug_cmd + + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= + + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then + + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$_G_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + _G_dir_list=$_G_directory_path:$_G_dir_list + + # If the last portion added has no slash in it, the list is done + case $_G_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` + done + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` + + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$_G_dir" 2>/dev/null || : + done + IFS=$func_mkdir_p_IFS + + # Bail out if we (or some other process) failed to create a directory. + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" + fi +} + + +# func_mktempdir [BASENAME] +# ------------------------- +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, BASENAME is the basename for that directory. +func_mktempdir () +{ + $debug_cmd + + _G_template=${TMPDIR-/tmp}/${1-$progname} + + if test : = "$opt_dry_run"; then + # Return a directory name, but don't create it in dry-run mode + _G_tmpdir=$_G_template-$$ + else + + # If mktemp works, use that first and foremost + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` + + if test ! -d "$_G_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + _G_tmpdir=$_G_template-${RANDOM-0}$$ + + func_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" + fi + + $ECHO "$_G_tmpdir" +} + + +# func_normal_abspath PATH +# ------------------------ +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +func_normal_abspath () +{ + $debug_cmd + + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + + +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () +{ + $debug_cmd + + $opt_quiet || func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + + +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () +{ + $debug_cmd + + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. + + : +} + + +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. +func_quote_for_eval () +{ + $debug_cmd + + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi + + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" + ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; + esac + + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done +} + + +# func_quote_for_expand ARG +# ------------------------- +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + $debug_cmd + + case $1 in + *[\\\`\"]*) + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; + *) + _G_arg=$1 ;; + esac + + case $_G_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_arg=\"$_G_arg\" + ;; + esac + + func_quote_for_expand_result=$_G_arg +} + + +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; + esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" + + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} + + $opt_quiet || { + func_quote_for_expand "$_G_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" + fi + } +} + + +# func_tr_sh +# ---------- +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + $debug_cmd + + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $debug_cmd + + $opt_verbose && func_echo "$*" + + : +} + + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 +} + + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () +{ + $debug_cmd + + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + printf '%s\n%s\n' "$1" "$2" \ + | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n +} + +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2015-10-07.11; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# 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 3 of the License, 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, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" +} + + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; + esac + + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + _G_rc_run_hooks=false + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + if eval $_G_hook '"$@"'; then + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + _G_rc_run_hooks=: + fi + done + + $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result +} + + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, you may remove/edit +# any options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. In this case you also must return $EXIT_SUCCESS to let the +# hook's caller know that it should pay attention to +# '_result'. Returning $EXIT_FAILURE signalizes that +# arguments are left untouched by the hook and therefore caller will ignore the +# result variable. +# +# Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# # No change in '$@' (ignored completely by this hook). There is +# # no need to do the equivalent (but slower) action: +# # func_quote_for_eval ${1+"$@"} +# # my_options_prep_result=$func_quote_for_eval_result +# false +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# args_changed=false +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: +# args_changed=: +# ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# args_changed=: +# ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@", we could need that later +# # if $args_changed is true. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; +# esac +# done +# +# if $args_changed; then +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# fi +# +# $args_changed +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# false +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll also need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + + +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + _G_func_options_finish_exit=false + if func_run_hooks func_options ${1+"$@"}; then + func_options_finish_result=$func_run_hooks_result + _G_func_options_finish_exit=: + fi + + $_G_func_options_finish_exit +} + + +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd + + _G_rc_options=false + + for my_func in options_prep parse_options validate_options options_finish + do + if eval func_$my_func '${1+"$@"}'; then + eval _G_res_var='$'"func_${my_func}_result" + eval set dummy "$_G_res_var" ; shift + _G_rc_options=: + fi + done + + # Save modified positional parameters for caller. As a top-level + # options-parser function we always need to set the 'func_options_result' + # variable (regardless the $_G_rc_options value). + if $_G_rc_options; then + func_options_result=$_G_res_var + else + func_quote_for_eval ${1+"$@"} + func_options_result=$func_quote_for_eval_result + fi + + $_G_rc_options +} + + +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propagate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). +func_hookable func_options_prep +func_options_prep () +{ + $debug_cmd + + # Option defaults: + opt_verbose=false + opt_warning_types= + + _G_rc_options_prep=false + if func_run_hooks func_options_prep ${1+"$@"}; then + _G_rc_options_prep=: + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result + fi + + $_G_rc_options_prep +} + + +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () +{ + $debug_cmd + + func_parse_options_result= + + _G_rc_parse_options=false + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + if func_run_hooks func_parse_options ${1+"$@"}; then + eval set dummy "$func_run_hooks_result"; shift + _G_rc_parse_options=: + fi + + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break + + _G_match_parse_options=: + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; + + --warnings|--warning|-W) + if test $# = 0 && func_missing_arg $_G_opt; then + _G_rc_parse_options=: + break + fi + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) _G_rc_parse_options=: ; break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; + esac + + $_G_match_parse_options && _G_rc_parse_options=: + done + + + if $_G_rc_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result + fi + + $_G_rc_parse_options +} + + +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () +{ + $debug_cmd + + _G_rc_validate_options=false + + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + if func_run_hooks func_validate_options ${1+"$@"}; then + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result + _G_rc_validate_options=: + fi + + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + $_G_rc_validate_options +} + + + +## ----------------- ## +## Helper functions. ## +## ----------------- ## + +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + eval \$ECHO \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + + +# func_help +# --------- +# Echo long help message to standard output and exit. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message" + exit 0 +} + + +# func_missing_arg ARGNAME +# ------------------------ +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $debug_cmd + + func_error "Missing argument for '$1'." + exit_cmd=exit +} + + +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals + + +# func_split_short_opt SHORTOPT +# ----------------------------- +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt + + +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () +{ + $debug_cmd + + func_usage_message + $ECHO "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} + + +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} + + +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + + printf '%s\n' "$progname $scriptversion" + $SED -n ' + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + + exit $? +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: + +# Set a version string. +scriptversion='(GNU libtool) 2.4.6' + + +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () +{ + $debug_cmd + + $warning_func ${1+"$@"} +} + + +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" + +# Additional text appended to 'usage_message' in response to '--help'. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. When passed as first option, +'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname $scriptversion Debian-2.4.6-15 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to . +GNU libtool home page: . +General help using GNU software: ." + exit 0 +} + + +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. + +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' + + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } +fi + + +# func_fatal_configuration ARG... +# ------------------------------- +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func__fatal_error ${1+"$@"} \ + "See the $PACKAGE documentation for more information." \ + "Fatal configuration error." +} + + +# func_config +# ----------- +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + + +# func_features +# ------------- +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test yes = "$build_libtool_libs"; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test yes = "$build_old_libs"; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + + +# func_enable_tag TAGNAME +# ----------------------- +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname=$1 + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf=/$re_begincf/,/$re_endcf/p + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + + +# func_check_version_match +# ------------------------ +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () +{ + $debug_mode + + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false + + nonopt= + preserve_args= + + _G_rc_lt_options_prep=: + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + *) + _G_rc_lt_options_prep=false + ;; + esac + + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result + fi + + $_G_rc_lt_options_prep +} +func_add_hook func_options_prep libtool_options_prep + + +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd + + _G_rc_lt_parse_options=false + + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_match_lt_parse_options=: + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + case $1 in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; + + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; + esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: + done + + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result + fi + + $_G_rc_lt_parse_options +} +func_add_hook func_parse_options libtool_parse_options + + + +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift + fi + + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; then + func_error "unrecognized option '-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help=$help + help="Try '$progname --help --mode=$opt_mode' for more information." + } + + # Pass back the unparsed argument list + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result +} +func_add_hook func_validate_options libtool_validate_options + + +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift + + + +## ----------- ## +## Main. ## +## ----------- ## + +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' + +# Global variables. +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# func_generated_by_libtool +# True iff stdin has been generated by Libtool. This function is only +# a basic sanity check; it will hardly flush out determined imposters. +func_generated_by_libtool_p () +{ + $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_p file +# True iff FILE is a libtool '.la' library or '.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool '.la' library or '.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if 'file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case $lalib_p_line in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test yes = "$lalib_p" +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + test -f "$1" && + $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $debug_cmd + + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$sp$nl + eval cmd=\"$cmd\" + IFS=$save_ifs + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# 'FILE.' does not work on cygwin managed mounts. +func_source () +{ + $debug_cmd + + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case $lt_sysroot:$1 in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result='='$func_stripname_result + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $debug_cmd + + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with '--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' + else + write_lobj=none + fi + + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $debug_cmd + + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result= + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result"; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $debug_cmd + + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $debug_cmd + + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $debug_cmd + + if test -z "$2" && test -n "$1"; then + func_error "Could not determine host file name corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result=$1 + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $debug_cmd + + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " '$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result=$3 + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $debug_cmd + + case $4 in + $1 ) func_to_host_path_result=$3$func_to_host_path_result + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via '$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $debug_cmd + + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $debug_cmd + + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result=$1 +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result=$func_convert_core_msys_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result=$func_convert_core_file_wine_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via '$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $debug_cmd + + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd=func_convert_path_$func_stripname_result + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $debug_cmd + + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result=$1 +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_msys_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_path_wine_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + +# func_mode_compile arg... +func_mode_compile () +{ + $debug_cmd + + # Get the compilation command and the source file. + base_compile= + srcfile=$nonopt # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg=$arg + arg_mode=normal + ;; + + target ) + libobj=$arg + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify '-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + func_append later " $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs=$IFS; IFS=, + for arg in $args; do + IFS=$save_ifs + func_append_quoted lastarg "$arg" + done + IFS=$save_ifs + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + func_append base_compile " $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg=$srcfile + srcfile=$arg + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with '-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj=$func_basename_result + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from '$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name '$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test yes = "$build_old_libs"; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test yes = "$need_locks"; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test warn = "$need_locks"; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test yes = "$build_libtool_libs"; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test no != "$pic_mode"; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test warn = "$need_locks" && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test yes = "$suppress_opt"; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test yes = "$compiler_c_o"; then + func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test warn = "$need_locks" && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support '-c' and '-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test no != "$need_locks"; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test compile = "$opt_mode" && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a 'standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to '-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the '--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the 'install' or 'cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE use a list of object files found in FILE to specify objects + -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with '-') are ignored. + +Every other argument is treated as a filename. Files ending in '.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. + +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode '$opt_mode'" + ;; + esac + + echo + $ECHO "Try '$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test : = "$opt_help"; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | $SED -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + $SED '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $debug_cmd + + # The first argument is the command name. + cmd=$nonopt + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "'$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "'$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "'$file' was not linked with '-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir=$func_dirname_result + + if test -f "$dir/$objdir/$dlname"; then + func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir=$func_dirname_result + ;; + + *) + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir=$absdir + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic=$magic + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file=$progdir/$program + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file=$progdir/$program + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd=\$cmd$args + fi +} + +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $debug_cmd + + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "'$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument '$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and '=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_quiet && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the '-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the '$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the '$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the '$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test finish = "$opt_mode" && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $debug_cmd + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac + then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=false + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + func_append files " $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=: ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the '$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir=$func_dirname_result + destname=$func_basename_result + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "'$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "'$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic=$magic + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + func_append staticlibs " $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "'$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir=$func_dirname_result + func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking '$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname=$1 + shift + + srcname=$realname + test -n "$relink_command" && srcname=${realname}T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme=$stripme + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme= + ;; + esac + ;; + os2*) + case $realname in + *_dll.a) + tstripme= + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try 'ln -sf' first, because the 'ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib=$destdir/$realname + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name=$func_basename_result + instname=$dir/${name}i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile=$destdir/$destname + else + func_basename "$file" + destfile=$func_basename_result + destfile=$destdir/$destfile + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest=$destfile + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to '$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test yes = "$build_old_libs"; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile=$destdir/$destname + else + func_basename "$file" + destfile=$func_basename_result + destfile=$destdir/$destfile + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext= + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=.exe + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script '$wrapper'" + + finalize=: + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test no = "$fast_install" && test -n "$relink_command"; then + $opt_dry_run || { + if $finalize; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file=$func_basename_result + outputname=$tmpdir/$file + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_quiet || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink '$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file=$outputname + else + func_warning "cannot relink '$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name=$func_basename_result + + # Set up the ranlib parameters. + oldlib=$destdir/$name + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run '$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test install = "$opt_mode" && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} + my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms=${my_outputname}S.c + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist=$output_objdir/$my_outputname.nm + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + +/* External symbol declarations for the compiler. */\ +" + + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from '$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols=$output_objdir/$outputname.exp + $opt_dry_run || { + $RM $export_symbols + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from '$dlprefile'" + func_basename "$dlprefile" + name=$func_basename_result + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename= + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname"; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename=$func_basename_result + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename"; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[];\ +" + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" + echo >> "$output_objdir/$my_dlsyms" "\ + } +}" + fi + echo >> "$output_objdir/$my_dlsyms" "\ +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + $my_pic_p && pic_flag_for_symtable=" $pic_flag" + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) func_append symtab_cflags " $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' + + # Transform the symbol file into the correct name. + symfileobj=$output_objdir/${my_outputname}S.$objext + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for '$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $debug_cmd + + win32_libid_type=unknown + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s|.*|import| + p + q + } + }'` + ;; + esac + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $debug_cmd + + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $debug_cmd + + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive that possess that section. Heuristic: eliminate + # all those that have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $debug_cmd + + if func_cygming_gnu_implib_p "$1"; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1"; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result= + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test yes = "$lock_old_archive_extraction"; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $debug_cmd + + my_gentop=$1; shift + my_oldlibs=${1+"$@"} + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib=$func_basename_result + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" + cd "$darwin_curdir" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result=$my_oldobjs +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory where it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# 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+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ that is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options that match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test yes = "$fast_install"; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + \$ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + +/* declarations of non-ANSI functions */ +#if defined __MINGW32__ +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined __CYGWIN__ +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined other_platform || defined ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined _MSC_VER +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +#elif defined __MINGW32__ +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined __CYGWIN__ +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined other platforms ... */ +#endif + +#if defined PATH_MAX +# define LT_PATHMAX PATH_MAX +#elif defined MAXPATHLEN +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free (stale); stale = 0; } \ +} while (0) + +#if defined LT_DEBUGWRAPPER +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + size_t tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined HAVE_DOS_BASED_FILE_SYSTEM + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined HAVE_DOS_BASED_FILE_SYSTEM + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = (size_t) (q - p); + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (STREQ (str, pat)) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + size_t len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + size_t orig_value_len = strlen (orig_value); + size_t add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[--len] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $debug_cmd + + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_suncc_cstd_abi +# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! +# Several compiler flags select an ABI that is incompatible with the +# Cstd library. Avoid specifying it if any are in CXXFLAGS. +func_suncc_cstd_abi () +{ + $debug_cmd + + case " $compile_command " in + *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) + suncc_use_cstd_abi=no + ;; + *) + suncc_use_cstd_abi=yes + ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $debug_cmd + + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # what system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll that has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + os2dllname= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=false + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module=$wl-single_module + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg=$1 + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir=$arg + prev= + continue + ;; + dlfiles|dlprefiles) + $preload || { + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=: + } + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test no = "$dlself"; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test dlprefiles = "$prev"; then + dlself=yes + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test dlfiles = "$prev"; then + func_append dlfiles " $arg" + else + func_append dlprefiles " $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols=$arg + test -f "$arg" \ + || func_fatal_error "symbol file '$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex=$arg + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + if test none != "$pic_object"; then + # Prepend the subdirectory the object is found in. + pic_object=$xdir$pic_object + + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test dlprefiles = "$prev"; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg=$pic_object + fi + + # Non-PIC object. + if test none != "$non_pic_object"; then + # Prepend the subdirectory the object is found in. + non_pic_object=$xdir$non_pic_object + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object=$pic_object + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "'$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file '$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + os2dllname) + os2dllname=$arg + prev= + continue + ;; + precious_regex) + precious_files_regex=$arg + prev= + continue + ;; + release) + release=-$arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test rpath = "$prev"; then + case "$rpath " in + *" $arg "*) ;; + *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds=$arg + prev= + continue + ;; + weak) + func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg=$arg + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "'-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test X-export-symbols = "X$arg"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between '-L' and '$1'" + else + func_fatal_error "need path for '-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test X-lc = "X$arg" || test X-lm = "X$arg"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test X-lc = "X$arg" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc due to us having libc/libc_r. + test X-lc = "X$arg" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test X-lc = "X$arg" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test X-lc = "X$arg" && continue + ;; + esac + elif test X-lc_r = "X$arg"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + func_append deplibs " $arg" + continue + ;; + + -mllvm) + prev=mllvm + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; + + -multi_module) + single_module=$wl-multi_module + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -os2dllname) + prev=os2dllname + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs=$IFS; IFS=, + for flag in $args; do + IFS=$save_ifs + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" + done + IFS=$save_ifs + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs=$IFS; IFS=, + for flag in $args; do + IFS=$save_ifs + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" + done + IFS=$save_ifs + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # -fstack-protector* stack protector flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -specs=* GCC specs files + # -stdlib=* select c++ std lib with clang + # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC + # -static-* direct GCC to link specific libraries statically + # -fcilkplus Cilk Plus language extension features for C/C++ + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + func_append compile_command " $arg" + func_append finalize_command " $arg" + func_append compiler_flags " $arg" + continue + ;; + + -Z*) + if test os2 = "`expr $host : '.*\(os2\)'`"; then + # OS/2 uses -Zxxx to specify OS/2-specific options + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case $arg in + -Zlinker | -Zstack) + prev=xcompiler + ;; + esac + continue + else + # Otherwise treat like 'Some other compiler flag' below + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + fi + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + + *.$objext) + # A standard object. + func_append objs " $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + test none = "$pic_object" || { + # Prepend the subdirectory the object is found in. + pic_object=$xdir$pic_object + + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test dlprefiles = "$prev"; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg=$pic_object + } + + # Non-PIC object. + if test none != "$non_pic_object"; then + # Prepend the subdirectory the object is found in. + non_pic_object=$xdir$non_pic_object + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object=$pic_object + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir=$func_dirname_result + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "'$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + func_append deplibs " $arg" + func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test dlfiles = "$prev"; then + # This library was specified with -dlopen. + func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test dlprefiles = "$prev"; then + # The library was specified with -dlpreopen. + func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else + func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the '$prevarg' option requires an argument" + + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname=$func_basename_result + libobjs_save=$libobjs + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" + + func_dirname "$output" "/" "" + output_objdir=$func_dirname_result$objdir + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps; then + case "$libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append libs " $deplib" + done + + if test lib = "$linkmode"; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac + func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=false + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test lib,link = "$linkmode,$pass"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs=$tmp_deplibs + fi + + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs + deplibs= + fi + if test prog = "$linkmode"; then + case $pass in + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test lib,dlpreopen = "$linkmode,$pass"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) func_append deplibs " $deplib" ;; + esac + done + done + libs=$dlprefiles + fi + if test dlopen = "$pass"; then + # Collect dlpreopened libraries + save_deplibs=$deplibs + deplibs= + fi + + for deplib in $libs; do + lib= + found=false + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append compiler_flags " $deplib" + if test lib = "$linkmode"; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test lib = "$linkmode"; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib=$searchdir/lib$name$search_ext + if test -f "$lib"; then + if test .la = "$search_ext"; then + found=: + else + found=false + fi + break 2 + fi + done + done + if $found; then + # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll=$l + done + if test "X$ll" = "X$old_library"; then # only static version available + found=false + func_dirname "$lib" "" "." + ladir=$func_dirname_result + lib=$ladir/$old_library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + ;; # -l + *.ltframework) + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test lib = "$linkmode"; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test conv = "$pass" && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + continue + fi + if test scan = "$pass"; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "'-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test link = "$pass"; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=false + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=: + fi + ;; + pass_all) + valid_a_lib=: + ;; + esac + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + fi + ;; + esac + continue + ;; + prog) + if test link != "$pass"; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test conv = "$pass"; then + deplibs="$deplib $deplibs" + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append newdlfiles " $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=: + continue + ;; + esac # case $deplib + + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "'$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir=$func_dirname_result + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test conv = "$pass"; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for '$lib'" + fi + # It is a libtool convenience library, so add in its objects. + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib=$l + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for '$lib'" + fi + + # This library was specified with -dlopen. + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" + if test -z "$dlname" || + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + func_append dlprefiles " $lib $dependency_libs" + else + func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of '$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir=$ladir + fi + ;; + esac + func_basename "$lib" + laname=$func_basename_result + + # Find the relevant object directory and library name. + if test yes = "$installed"; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir + else + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir + fi + test yes = "$hardcode_automatic" && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir=$ladir + absdir=$abs_ladir + # Remove this search path later + func_append notinst_path " $abs_ladir" + else + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir + # Remove this search path later + func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" + fi + case $host in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test lib = "$linkmode"; then + deplibs="$dir/$old_library $deplibs" + elif test prog,link = "$linkmode,$pass"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test prog = "$linkmode" && test link != "$pass"; then + func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if $linkalldeplibs; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test prog,link = "$linkmode,$pass"; then + if test -n "$library_names" && + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then + # Make sure the rpath contains only unique directories. + case $temp_rpath: in + *"$absdir:"*) ;; + *) func_append temp_rpath "$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test built = "$use_static_libs" && test yes = "$installed"; then + use_static_libs=no + fi + if test -n "$library_names" && + { test no = "$use_static_libs" || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc* | *os2*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test no = "$installed"; then + func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule= + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule=$dlpremoduletest + break + fi + done + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then + echo + if test prog = "$linkmode"; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname=$1 + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname=$dlname + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc* | *os2*) + func_arith $current - $age + major=$func_arith_result + versuffix=-$major + ;; + esac + eval soname=\"$soname_spec\" + else + soname=$realname + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot=$soname + func_basename "$soroot" + soname=$func_basename_result + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from '$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for '$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test prog = "$linkmode" || test relink != "$opt_mode"; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test no = "$hardcode_direct"; then + add=$dir/$linklib + case $host in + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir=-L$dir ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we cannot + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library"; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add=$dir/$old_library + fi + elif test -n "$old_library"; then + add=$dir/$old_library + fi + fi + esac + elif test no = "$hardcode_minus_L"; then + case $host in + *-*-sunos*) add_shlibpath=$dir ;; + esac + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name + else + lib_linked=no + fi + ;; + relink) + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$absdir + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test yes != "$lib_linked"; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test prog = "$linkmode"; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + + if test prog = "$linkmode" || test relink = "$opt_mode"; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + add=-l$name + elif test yes = "$hardcode_automatic"; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib + else + add=$libdir/$linklib + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir=-L$libdir + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add=-l$name + fi + + if test prog = "$linkmode"; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test prog = "$linkmode"; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test yes = "$build_libtool_libs"; then + # Not a shared library + if test pass_all != "$deplibs_check_method"; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system cannot link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test yes = "$module"; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." + fi + if test no = "$build_old_libs"; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test lib = "$linkmode"; then + if test -n "$dependency_libs" && + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) func_append xrpath " $temp_xrpath";; + esac;; + *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs=$temp_deplibs + fi + + func_append newlib_search_path " $absdir" + # Link against this library + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi + func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test no != "$link_all_deplibs"; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path=$deplib ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" + path= + fi + fi + ;; + *) + path=-L$absdir/$objdir + ;; + esac + else + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "'$deplib' seems to be moved" + + path=-L$absdir + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test link = "$pass"; then + if test prog = "$linkmode"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test dlopen != "$pass"; then + test conv = "$pass" || { + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= + } + + if test prog,link = "$linkmode,$pass"; then + vars="compile_deplibs finalize_deplibs" + else + vars=deplibs + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) func_append tmp_libs " $deplib" ;; + esac + ;; + *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + + # Add Sun CC postdeps if required: + test CXX = "$tagname" && { + case $host_os in + linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C++ 5.9 + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + + solaris*) + func_cc_basename "$CC" + case $func_cc_basename_result in + CC* | sunCC*) + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + esac + } + + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i= + ;; + esac + if test -n "$i"; then + func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test prog = "$linkmode"; then + dlfiles=$newdlfiles + fi + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "'-l' and '-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "'-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "'-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "'-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "'-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "'-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs=$output + func_append objs "$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form 'libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" + + if test no != "$need_lib_prefix"; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + func_append libobjs " $objs" + fi + fi + + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" + + install_libdir=$1 + + oldlibs= + if test -z "$rpath"; then + if test yes = "$build_libtool_libs"; then + # Building a libtool convenience library. + # Some compilers have problems with a '.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "'-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "'-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs=$IFS; IFS=: + set dummy $vinfo 0 0 0 + shift + IFS=$save_ifs + + test -n "$7" && \ + func_fatal_help "too many parameters to '-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major=$1 + number_minor=$2 + number_revision=$3 + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # that has an extra 1 added just for fun + # + case $version_type in + # correct linux to gnu/linux during the next big refactor + darwin|freebsd-elf|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age=$number_minor + revision=$number_revision + ;; + freebsd-aout|qnx|sunos) + current=$number_major + revision=$number_minor + age=0 + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age=$number_minor + revision=$number_minor + lt_irix_increment=no + ;; + *) + func_fatal_configuration "$modename: unknown library version type '$version_type'" + ;; + esac + ;; + no) + current=$1 + revision=$2 + age=$3 + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $CC in + nagfor*) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac + ;; + + freebsd-aout) + major=.$current + versuffix=.$current.$revision + ;; + + freebsd-elf) + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + ;; + + irix | nonstopux) + if test no = "$lt_irix_increment"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring=$verstring_prefix$major.$revision + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test 0 -ne "$loop"; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring=$verstring_prefix$major.$iface:$verstring + done + + # Before this point, $major must not contain '.'. + major=.$major + versuffix=$major.$revision + ;; + + linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision + + # Add in all the interfaces that we are compatible with. + loop=$age + while test 0 -ne "$loop"; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring=$verstring:$iface.0 + done + + # Make executables depend on our current version. + func_append verstring ":$current.0" + ;; + + qnx) + major=.$current + versuffix=.$current + ;; + + sco) + major=.$current + versuffix=.$current + ;; + + sunos) + major=.$current + versuffix=.$current.$revision + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 file systems. + func_arith $current - $age + major=$func_arith_result + versuffix=-$major + ;; + + *) + func_fatal_configuration "unknown library version type '$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring=0.0 + ;; + esac + if test no = "$need_version"; then + versuffix= + else + versuffix=.0.0 + fi + fi + + # Remove version info from name if versioning should be avoided + if test yes,no = "$avoid_version,$need_version"; then + major= + versuffix= + verstring= + fi + + # Check to see if the archive will have undefined symbols. + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi + fi + else + # Don't allow undefined symbols. + allow_undefined_flag=$no_undefined_flag + fi + + fi + + func_generate_dlsyms "$libname" "$libname" : + func_append libobjs " $symfileobj" + test " " = "$libobjs" && libobjs= + + if test relink != "$opt_mode"; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + func_append removelist " $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then + func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles=$dlfiles + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) func_append dlfiles " $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles=$dlprefiles + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) func_append dlprefiles " $lib" ;; + esac + done + + if test yes = "$build_libtool_libs"; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test yes = "$build_libtool_need_lc"; then + func_append deplibs " -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release= + versuffix= + major= + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib=$potent_lib + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib= + break 2 + fi + done + done + fi + if test -n "$a_deplib"; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib= + ;; + esac + fi + if test -n "$a_deplib"; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib=$potent_lib # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib= + break 2 + fi + done + done + fi + if test -n "$a_deplib"; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs= + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test none = "$deplibs_check_method"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test yes = "$droppeddeps"; then + if test yes = "$module"; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." + fi + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test no = "$allow_undefined"; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + deplibs=$new_libs + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test yes = "$build_libtool_libs"; then + # Remove $wl instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test yes = "$hardcode_into_libs"; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath=$finalize_rpath + test relink = "$opt_mode" || rpath=$compile_rpath$rpath + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname=$1 + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname=$realname + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib=$output_objdir/$realname + linknames= + for link + do + func_append linknames " $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols=$output_objdir/$libname.uexp + func_append delfiles " $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + func_dll_def_p "$export_symbols" || { + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols=$export_symbols + export_symbols= + always_export_symbols=yes + } + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs=$IFS; IFS='~' + for cmd1 in $cmds; do + IFS=$save_ifs + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test yes = "$try_normal_branch" \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=$output_objdir/$output_la.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands, which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + func_append tmp_deplibs " $test_deplib" + ;; + esac + done + deplibs=$tmp_deplibs + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test yes = "$compiler_needs_object" && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test relink = "$opt_mode"; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test yes = "$module" && test -n "$module_cmds"; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test : != "$skipped_export" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test yes = "$compiler_needs_object"; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-$k.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test -z "$objlist" || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test 1 -eq "$k"; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-$k.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-$k.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + func_append delfiles " $output" + + else + output= + fi + + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + } + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs=$IFS; IFS='~' + for cmd in $concat_cmds; do + IFS=$save_ifs + $opt_quiet || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS=$save_ifs + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + ${skipped_export-false} && { + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands, which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + } + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test yes = "$module" && test -n "$module_cmds"; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs=$IFS; IFS='~' + for cmd in $cmds; do + IFS=$sp$nl + eval cmd=\"$cmd\" + IFS=$save_ifs + $opt_quiet || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS=$save_ifs + + # Restore the uninstalled library and exit + if test relink = "$opt_mode"; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test yes = "$module" || test yes = "$export_dynamic"; then + # On all known operating systems, these are identical. + dlname=$soname + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "'-l' and '-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "'-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "'-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "'-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "'-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object '$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj=$output + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # if reload_cmds runs $LD directly, get rid of -Wl from + # whole_archive_flag_spec and hope we can get by with turning comma + # into space. + case $reload_cmds in + *\$LD[\ \$]*) wl= ;; + esac + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags + else + gentop=$output_objdir/${obj}x + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects + + # Create the old-style object. + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs + + output=$obj + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + test yes = "$build_libtool_libs" || { + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + } + + if test -n "$pic_flag" || test default != "$pic_mode"; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output=$libobj + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "'-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "'-release' is ignored for programs" + + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test CXX = "$tagname"; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + func_append compile_command " $wl-bind_at_load" + func_append finalize_command " $wl-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs=$new_libs + + + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath=$rpath + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir=$hardcode_libdirs + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath=$rpath + + if test -n "$libobjs" && test yes = "$build_old_libs"; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" false + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=: + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=false + ;; + *cygwin* | *mingw* ) + test yes = "$build_libtool_libs" || wrappers_required=false + ;; + *) + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false + fi + ;; + esac + $wrappers_required || { + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command=$compile_command$compile_rpath + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' + fi + + exit $exit_status + } + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test yes = "$no_install"; then + # We don't need to create a wrapper script. + link_command=$compile_var$compile_command$compile_rpath + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host"; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience + build_libtool_libs=no + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) + oldobjs="$old_deplibs $non_pic_objects" + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac + + if test -n "$addlibs"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $addlibs + func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase=$func_basename_result + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" + ;; + *) func_append oldobjs " $obj" ;; + esac + done + fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj"; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test -z "$oldobjs"; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test yes = "$build_old_libs" && old_library=$libname.$libext + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test yes = "$hardcode_automatic"; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test yes = "$installed"; then + if test -z "$install_libdir"; then + break + fi + output=$output_objdir/${outputname}i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name=$func_basename_result + func_resolve_sysroot "$deplib" + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs=$newdependency_libs + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; + *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles=$newdlfiles + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles=$newdlprefiles + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlfiles " $abs" + done + dlfiles=$newdlfiles + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlprefiles " $abs" + done + dlprefiles=$newdlprefiles + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test -n "$bindir"; then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result/$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test no,yes = "$installed,$need_relink"; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $debug_cmd + + RM=$nonopt + files= + rmforce=false + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic=$magic + + for arg + do + case $arg in + -f) func_append RM " $arg"; rmforce=: ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir + else + odir=$dir/$objdir + fi + func_basename "$file" + name=$func_basename_result + test uninstall = "$opt_mode" && odir=$dir + + # Remember odir for removal later, being careful to avoid duplicates + if test clean = "$opt_mode"; then + case " $rmdirs " in + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif $rmforce; then + continue + fi + + rmfiles=$file + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + func_append rmfiles " $odir/$n" + done + test -n "$old_library" && func_append rmfiles " $odir/$old_library" + + case $opt_mode in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && test none != "$pic_object"; then + func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && test none != "$non_pic_object"; then + func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) + if test clean = "$opt_mode"; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the $objdir's in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi + +test -z "$opt_mode" && { + help=$generic_help + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode '$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# where we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff -Nru dovecot-2.3.21.1+dfsg1/build-aux/missing dovecot-2.4.1+dfsg1/build-aux/missing --- dovecot-2.3.21.1+dfsg1/build-aux/missing 1969-12-31 19:00:00.000000000 -0500 +++ dovecot-2.4.1+dfsg1/build-aux/missing 2025-03-28 07:32:40.000000000 -0400 @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff -Nru dovecot-2.3.21.1+dfsg1/build-aux/run-test.sh.in dovecot-2.4.1+dfsg1/build-aux/run-test.sh.in --- dovecot-2.3.21.1+dfsg1/build-aux/run-test.sh.in 1969-12-31 19:00:00.000000000 -0500 +++ dovecot-2.4.1+dfsg1/build-aux/run-test.sh.in 2025-03-28 07:32:27.000000000 -0400 @@ -0,0 +1,54 @@ +#!/bin/sh + +## serial 2 + +set -eu + +top_srcdir="@abs_top_srcdir@" +VALGRIND="@VALGRIND@" + +if test $# -eq 0 || test "$1" = ""; then + echo "Missing target binary" >&2 + exit 1 +fi + +if test "${NOUNDEF:-}" != ""; then + noundef="--undef-value-errors=no" +else + noundef="" +fi + +if test "${NOCHILDREN:-}" != ""; then + trace_children="--trace-children=no" +else + trace_children="--trace-children=yes" +fi + +skip_path="$top_srcdir/run-test-valgrind.exclude" +if test -r "$skip_path" && grep -w -q "$(basename $[1])" "$skip_path"; then + NOVALGRIND=true +fi + +if test "${NOVALGRIND:-}" != ""; then + "$@" + ret=$? +else + test_out="test.out~$$" + trap "rm -f $test_out" 0 1 2 3 15 + supp_path="$top_srcdir/run-test-valgrind.supp" + ret=0 + if test -r "$supp_path"; then + $VALGRIND -q $trace_children --error-exitcode=213 --leak-check=full --gen-suppressions=all --suppressions="$supp_path" --log-file=$test_out $noundef "$@" || ret=$? + else + $VALGRIND -q $trace_children --error-exitcode=213 --leak-check=full --gen-suppressions=all --log-file=$test_out $noundef "$@" || ret=$? + fi + if test -s $test_out; then + cat $test_out + ret=1 + fi +fi +if test $ret != 0; then + echo "Failed to run: $@" >&2 +fi + +exit $ret diff -Nru dovecot-2.3.21.1+dfsg1/build-aux/ylwrap dovecot-2.4.1+dfsg1/build-aux/ylwrap --- dovecot-2.3.21.1+dfsg1/build-aux/ylwrap 1969-12-31 19:00:00.000000000 -0500 +++ dovecot-2.4.1+dfsg1/build-aux/ylwrap 2025-03-28 07:32:43.000000000 -0400 @@ -0,0 +1,247 @@ +#! /bin/sh +# ylwrap - wrapper for lex/yacc invocations. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# +# Written by Tom Tromey . +# +# 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +get_dirname () +{ + case $1 in + */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';; + # Otherwise, we want the empty string (not "."). + esac +} + +# guard FILE +# ---------- +# The CPP macro used to guard inclusion of FILE. +guard () +{ + printf '%s\n' "$1" \ + | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \ + -e 's/__*/_/g' +} + +# quote_for_sed [STRING] +# ---------------------- +# Return STRING (or stdin) quoted to be used as a sed pattern. +quote_for_sed () +{ + case $# in + 0) cat;; + 1) printf '%s\n' "$1";; + esac \ + | sed -e 's|[][\\.*]|\\&|g' +} + +case "$1" in + '') + echo "$0: No files given. Try '$0 --help' for more information." 1>&2 + exit 1 + ;; + --basedir) + basedir=$2 + shift 2 + ;; + -h|--h*) + cat <<\EOF +Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... + +Wrapper for lex/yacc invocations, renaming files as desired. + + INPUT is the input file + OUTPUT is one file PROG generates + DESIRED is the file we actually want instead of OUTPUT + PROGRAM is program to run + ARGS are passed to PROG + +Any number of OUTPUT,DESIRED pairs may be used. + +Report bugs to . +EOF + exit $? + ;; + -v|--v*) + echo "ylwrap $scriptversion" + exit $? + ;; +esac + + +# The input. +input=$1 +shift +# We'll later need for a correct munging of "#line" directives. +input_sub_rx=`get_dirname "$input" | quote_for_sed` +case $input in + [\\/]* | ?:[\\/]*) + # Absolute path; do nothing. + ;; + *) + # Relative path. Make it absolute. + input=`pwd`/$input + ;; +esac +input_rx=`get_dirname "$input" | quote_for_sed` + +# Since DOS filename conventions don't allow two dots, +# the DOS version of Bison writes out y_tab.c instead of y.tab.c +# and y_tab.h instead of y.tab.h. Test to see if this is the case. +y_tab_nodot=false +if test -f y_tab.c || test -f y_tab.h; then + y_tab_nodot=true +fi + +# The parser itself, the first file, is the destination of the .y.c +# rule in the Makefile. +parser=$1 + +# A sed program to s/FROM/TO/g for all the FROM/TO so that, for +# instance, we rename #include "y.tab.h" into #include "parse.h" +# during the conversion from y.tab.c to parse.c. +sed_fix_filenames= + +# Also rename header guards, as Bison 2.7 for instance uses its header +# guard in its implementation file. +sed_fix_header_guards= + +while test $# -ne 0; do + if test x"$1" = x"--"; then + shift + break + fi + from=$1 + # Handle y_tab.c and y_tab.h output by DOS + if $y_tab_nodot; then + case $from in + "y.tab.c") from=y_tab.c;; + "y.tab.h") from=y_tab.h;; + esac + fi + shift + to=$1 + shift + sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;" + sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;" +done + +# The program to run. +prog=$1 +shift +# Make any relative path in $prog absolute. +case $prog in + [\\/]* | ?:[\\/]*) ;; + *[\\/]*) prog=`pwd`/$prog ;; +esac + +dirname=ylwrap$$ +do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' +trap "ret=129; $do_exit" 1 +trap "ret=130; $do_exit" 2 +trap "ret=141; $do_exit" 13 +trap "ret=143; $do_exit" 15 +mkdir $dirname || exit 1 + +cd $dirname + +case $# in + 0) "$prog" "$input" ;; + *) "$prog" "$@" "$input" ;; +esac +ret=$? + +if test $ret -eq 0; then + for from in * + do + to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"` + if test -f "$from"; then + # If $2 is an absolute path name, then just use that, + # otherwise prepend '../'. + case $to in + [\\/]* | ?:[\\/]*) target=$to;; + *) target=../$to;; + esac + + # Do not overwrite unchanged header files to avoid useless + # recompilations. Always update the parser itself: it is the + # destination of the .y.c rule in the Makefile. Divert the + # output of all other files to a temporary file so we can + # compare them to existing versions. + if test $from != $parser; then + realtarget=$target + target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` + fi + + # Munge "#line" or "#" directives. Don't let the resulting + # debug information point at an absolute srcdir. Use the real + # output file name, not yy.lex.c for instance. Adjust the + # include guards too. + sed -e "/^#/!b" \ + -e "s|$input_rx|$input_sub_rx|" \ + -e "$sed_fix_filenames" \ + -e "$sed_fix_header_guards" \ + "$from" >"$target" || ret=$? + + # Check whether files must be updated. + if test "$from" != "$parser"; then + if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then + echo "$to is unchanged" + rm -f "$target" + else + echo "updating $to" + mv -f "$target" "$realtarget" + fi + fi + else + # A missing file is only an error for the parser. This is a + # blatant hack to let us support using "yacc -d". If -d is not + # specified, don't fail when the header file is "missing". + if test "$from" = "$parser"; then + ret=1 + fi + fi + done +fi + +# Remove the directory. +cd .. +rm -rf $dirname + +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff -Nru dovecot-2.3.21.1+dfsg1/ChangeLog dovecot-2.4.1+dfsg1/ChangeLog --- dovecot-2.3.21.1+dfsg1/ChangeLog 2024-08-13 06:38:20.000000000 -0400 +++ dovecot-2.4.1+dfsg1/ChangeLog 2025-03-28 07:32:27.000000000 -0400 @@ -1,186332 +1,3 @@ -2024-08-09 12:24:39 +0300 Aki Tuomi (d492236fa0) +Please see https://github.com/dovecot/core/commits/ for history - configure: Update version - - -M configure.ac - -2024-08-08 15:13:19 +0300 Aki Tuomi (9a69ceda23) - - NEWS: Add news for 2.3.21.1 - - -M NEWS - -2024-04-24 10:45:46 +0000 Marco Bettini (ce88c33abc) - - lib-mail: message-parser - Limit headers total count to 50MB by default - - (including top headers and all mime-sections headers) - -M src/lib-mail/message-parser-private.h -M src/lib-mail/message-parser.c -M src/lib-mail/message-parser.h -M src/lib-mail/test-message-parser.c - -2024-04-12 15:06:43 +0000 Marco Bettini (f020e139c5) - - lib-mail: message-header-parser - Limit header block to 10MB by default - - -M src/lib-mail/message-header-parser.c -M src/lib-mail/message-header-parser.h -M src/lib-mail/test-message-header-parser.c - -2024-02-09 00:57:12 +0200 Timo Sirainen (1481c04f02) - - lib-mail, lib-imap: Optimize parsing large number of address headers - - Every header was appended to a linked list by walking through the whole - list, causing excessive CPU usage when the list became large enough. Fixed - by changing struct message_part_envelope to use struct message_address_list, - which stores also linked list tail pointers. This allows quickly appending - to the end of the linked list. - -M src/lib-imap/imap-envelope.c -M src/lib-mail/message-part-data.c -M src/lib-mail/message-part-data.h -M src/lib-storage/index/index-search-mime.c - -2024-01-30 22:17:38 +0200 Timo Sirainen (da61d20311) - - lib-mail: Add message_address_parse_full() and struct message_address_list - - -M src/lib-mail/message-address.c -M src/lib-mail/message-address.h -M src/lib-mail/test-message-address.c - -2024-02-04 00:26:57 +0200 Timo Sirainen (a1c9b04094) - - lib-mail: Change message_address to be doubly linked list - - -M src/lib-imap/imap-envelope.c -M src/lib-mail/message-address.c -M src/lib-mail/message-address.h -M src/lib-mail/test-message-address.c - -2024-01-30 22:42:50 +0200 Timo Sirainen (0bae091859) - - lib-mail: test-imap-envelope - Use test_assert_idx() where possible - - -M src/lib-imap/test-imap-envelope.c - -2024-02-09 00:33:00 +0200 Timo Sirainen (cee08202c7) - - lib: Add DLLIST2_JOIN() - - -M src/lib/llist.h -M src/lib/test-llist.c - -2024-02-09 00:32:39 +0200 Timo Sirainen (8e4c42dbb3) - - lib: test-llist - Fix dllist2 test name - - -M src/lib/test-llist.c - -2024-03-26 14:13:42 +0200 Aki Tuomi (57ee018642) - - auth: mech-oauth2 - Use the iterated passdb in oauth2_find_oidc_url() - - Fixes a crash when oauth2 passdb is not first. Broken in - 59647f483c49c9e54c43cade168bf10f44a49292 - -M src/auth/mech-oauth2.c - -2024-03-13 13:08:18 +0200 Timo Sirainen (b6f4074961) - - login-common: Add client_vfuncs.iostream_change_pre/post() - - -M src/login-common/client-common.c -M src/login-common/client-common.h - -2023-10-06 15:59:32 +0300 Timo Sirainen (955bff2155) - - lib: Fix sha2 functions to not produce wrong results with >500MB input - - -M src/lib/sha2.c -M src/lib/sha2.h -M src/lib/test-hash-method.c - -2023-10-03 13:11:49 +0000 Marco Bettini (ac2bc5da92) - - oauth: Accept multiple entries in aud field - - -M src/auth/db-oauth2.c -M src/lib-oauth2/oauth2-jwt.c - -2023-08-28 15:27:09 +0000 Marco Bettini (47349e2482) - - mail-crypt: mail_crypt_mailbox_allocated() - Force cross-user copies to - (de,re)encrypt the contents - - -M src/plugins/mail-crypt/mail-crypt-plugin.c - -2023-09-06 15:04:49 +0300 Aki Tuomi (aaaa810590) - - NEWS: Update NEWS with changes - - -M NEWS - -2023-09-06 08:34:51 +0300 Aki Tuomi (bafdc83211) - - lib-sql: driver-mysql - Use API state to check if there is connection - - db->mysql cannot be NULL. - - Broken in 542877c08eb8130733567e5b718933bc3cdc8426 - -M src/lib-sql/driver-mysql.c - -2023-09-05 13:39:40 +0300 Aki Tuomi (21927de9f4) - - dsync: Destroy name128_remotesep_hash in dsync_mailbox_tree_deinit() - - Forgotten in 678d0463849ba777106eb7875f27db07a5d8e3df - -M src/doveadm/dsync/dsync-mailbox-tree.c - -2023-09-02 17:50:55 +1000 Ted Phelps (6901e5fc1c) - - dsync: Fix an infinite loop - - Be sure to update 'name' when traversing the components of a path in - convert_name_to_remote_sep. Otherwise we end up allocating a lot of memory - and failing. - -M src/doveadm/dsync/dsync-mailbox-tree.c - -2023-08-30 13:19:47 +0300 Aki Tuomi (542877c08e) - - lib-sql: driver-mysql - Initialize MYSQL struct once - - Calling initialize more than once will leak memory. - -M src/lib-sql/driver-mysql.c - -2023-08-30 13:21:12 +0300 Aki Tuomi (939e47c94e) - - lib-sql: driver-mysql - Use driver_mysql_disconnect() in deinit - - This ensures we call mysql_close() only in one place. - -M src/lib-sql/driver-mysql.c - -2023-08-29 15:04:04 +0300 Aki Tuomi (f55acdc81c) - - lib-sql: driver-mysql - Use container_of instead of blind cast - - -M src/lib-sql/driver-mysql.c - -2023-07-17 10:36:32 +0300 Aki Tuomi (34f597596e) - - lib-sql: Disconnect SQL connection on error - - -M src/lib-sql/driver-mysql.c - -2023-06-22 10:48:13 +0300 Timo Sirainen (648b5a3a6e) - - mdbox: Fix crash still if fdatasync_path() fails - - Broken still in a8424a71d70e2f5c54d9e2aab8338cf9547b15b4 - -M src/lib-storage/index/dbox-multi/mdbox-save.c - -2023-08-30 15:46:20 +0300 Aki Tuomi (02bf7bd126) - - configure: Update version - - -M configure.ac - -2023-08-30 15:45:45 +0300 Aki Tuomi (c658ae5288) - - NEWS: Add news for 2.3.21 - - -M NEWS - -2023-06-15 13:32:11 +0200 Karl Fleischmann (daff6f22c1) - - stats: Allow empty event exporters when registering metrics - - -M src/stats/stats-metrics.c - -2023-08-29 10:13:34 +0000 Marco Bettini (c7a8868882) - - fts: doveadm - Add missing pool initialization in cmd_search_box() - - Broken by: 467a664b5fce33f3d47a3e1171ecacb508968d1a - -M src/plugins/fts/doveadm-fts.c - -2023-08-24 12:26:44 +0300 Aki Tuomi (526b66635d) - - auth: db-oauth2 - Set default value for active_attribute and active_value to - empty string - - Otherwise it will always require this attribute to be present when not - configured. - -M src/auth/db-oauth2.c - -2023-08-24 22:16:36 +0300 Aki Tuomi (476e03f65b) - - login-common: If authentication is aborted, clear out final response. - - -M src/login-common/sasl-server.c - -2023-06-01 10:47:50 +0000 Marco Bettini (bfb698553f) - - auth: db-oauth2 - Handle the case for check on attribute presence only - - -M src/auth/db-oauth2.c - -2023-06-01 08:37:56 +0000 Marco Bettini (b6e310356f) - - auth: db_oauth2_user_is_enabled() - Flatten the code - - -M src/auth/db-oauth2.c - -2022-05-17 15:19:49 -0400 Steve Mokris (7969d5be1d) - - auth: db-oauth2 - Fail login if active_attribute is missing - - If active_attribute is required by config, we should fail to login when it's - missing. - -M src/auth/db-oauth2.c - -2023-05-12 11:48:25 +0300 Aki Tuomi (f3e85d8f51) - - lib-oauth2: Do not send empty client_id or client_secret - - -M src/lib-oauth2/oauth2-request.c - -2023-05-12 11:47:41 +0300 Aki Tuomi (9ad55e6c04) - - lib-oauth2: Do not send client_id and client_secret as parameters in POST - queries - - They need to be configured in the URL as Basic auth instead. - -M src/lib-oauth2/oauth2-request.c - -2023-05-12 08:59:50 +0300 Aki Tuomi (e449757553) - - lib-oauth2: Do not send client_id & client_secret as POST parameters when - doing introspection - - -M src/lib-oauth2/oauth2-request.c - -2023-05-08 08:38:20 +0300 Aki Tuomi (8623cb0319) - - lib-oauth2: Validate scope when configured - - -M src/lib-oauth2/oauth2-jwt.c -M src/lib-oauth2/test-oauth2-jwt.c - -2023-05-08 08:23:39 +0300 Aki Tuomi (9c7f5a74a7) - - lib-oauth2: Remove typ check - - It is not really useful. And mostly just keeps breaking when people invent - new kty values. - -M src/lib-oauth2/oauth2-jwt.c - -2023-05-08 08:21:43 +0300 Aki Tuomi (63e0c9ede4) - - lib-oauth2: Ensure aud field has client_id when set. - - OpenID Connect 1.0 specification says that "aud" field must contain OAuth - 2.0 client_id of the Relying Party as an audience value. - -M src/lib-oauth2/oauth2-jwt.c - -2023-05-15 13:49:58 +0300 Aki Tuomi (18576fde01) - - auth: mech-oauth2 - Always fail with protocol specific error - - -M src/auth/mech-oauth2.c - -2023-05-15 11:51:19 +0300 Aki Tuomi (59647f483c) - - auth: mech-oauth2 - Look for openid configuration URL if missing - - -M src/auth/mech-oauth2.c -M src/auth/passdb-oauth2.c -M src/auth/passdb.h - -2023-05-04 15:44:15 +0300 Aki Tuomi (3db58fd809) - - lib-oauth2: Return failure instead of crash with invalid or missing token - - -M src/lib-oauth2/oauth2-request.c - -2022-12-14 10:10:12 +0200 Aki Tuomi (d6ff43f766) - - auth: db-oauth2 - Add accessor for OpenID configuration URL - - -M src/auth/db-oauth2.c -M src/auth/db-oauth2.h - -2023-06-02 14:20:08 +0300 Aki Tuomi (77e2d55092) - - auth: db-oauth2 - Store request username - - -M src/auth/db-oauth2.c - -2023-05-15 12:41:39 +0300 Aki Tuomi (3a69b83a35) - - auth: Add auth_request_fail_with_reply() - - -M src/auth/auth-request.c -M src/auth/auth-request.h - -2023-05-15 13:49:41 +0300 Aki Tuomi (d8fdd193f0) - - auth: Pass along final response with failure - - -M src/auth/auth-request-handler.c - -2023-05-15 12:28:53 +0300 Aki Tuomi (78b8d7c861) - - lib-auth: Move auth_client_request_continue() lower - - Simplifies next commit - -M src/lib-auth/auth-client-request.c - -2023-05-15 14:27:55 +0300 Aki Tuomi (7e5c9ad6da) - - login-common: Serve final response for client on failure - - -M src/login-common/client-common-auth.c -M src/login-common/client-common.c -M src/login-common/client-common.h -M src/login-common/sasl-server.c -M src/login-common/sasl-server.h - -2023-05-15 13:49:51 +0300 Aki Tuomi (dbb801a8f0) - - login-common: Ignore resp when present - - -M src/login-common/client-common-auth.c - -2023-05-03 14:35:54 +0300 sergey.kitov (5061e0c48a) - - acl: Fix wrong \HasChildren flags for parent mailboxes containing '*' and - '%' - - '*' in mailbox name is replaced with '%' while child mailboxes still have - '*' in their path, this results in wrong \HasNoChildren flag. - -M src/plugins/acl/acl-mailbox-list.c - -2023-05-03 14:35:18 +0300 sergey.kitov (f2e50d5676) - - lib-storage: Whitespace cleanup. - - -M src/lib-storage/list/mailbox-list-iter.c - -2023-05-09 07:22:15 +0000 Marco Bettini (50af4232c1) - - lib-storage: Add mail_get_message_id_no_validation() - - -M src/lib-storage/mail-storage.h -M src/lib-storage/mail.c - -2023-05-16 09:40:55 +0000 Marco Bettini (06aecd2b95) - - lib-dict: redis_reply_callback() - Don't crash if there is no callback - - -M src/lib-dict/dict-redis.c - -2023-04-18 00:08:40 +0300 Timo Sirainen (175043954c) - - lib-index: Delete dovecot.index.cache during purging if it becomes too large - - This only happens if the file was already too large before the purging - happens. This mainly fixes assert-crashes caused by old huge >1GB cache - files. - - Fixes: Panic: file mail-index-util.c: line 10 (mail_index_uint32_to_offset): - assertion failed: (offset < 0x40000000) - -M src/lib-index/mail-cache-purge.c - -2022-05-17 12:31:40 +0200 Timo Sirainen (9f903ee879) - - lib-master: Use ssl_require_crl setting only for server-side SSL settings - - We don't currently properly support checking CRLs when acting as SSL client. - The CRL would have to be stored as part of the CAs, which isn't commonly - done. This bug has been in the code ever since it was added in - 30c5c1fc3608ae575f11960281d3e338b6bf7bc8, but it became more noticeable with - recent changes that started using lib-master for getting all SSL client - settings, e.g. 1e5324b5805bf7299cd8196f7b659fe935f027bd - -M src/lib-master/master-service-ssl-settings.c - -2023-04-06 09:04:35 +0200 Karl Fleischmann (08528c38e1) - - stats: stats_metrics_add_dynamic() - Validate event exporter - - -M src/stats/stats-metrics.c - -2023-03-23 15:37:28 +0000 Marco Bettini (b3981ea5c6) - - lib-master: stats_client_deinit() - Ensure conn.output is flushed before - returning - - This prevents losing exported events still waiting in buffers while the - process exits. - -M src/lib-master/stats-client.c - -2023-03-27 08:19:38 +0000 Marco Bettini (e52db68ff4) - - lib-master: stats_event_callback() - Skip if conn.output is already closed - - This also prevents further errors from happening on the closed stream. - -M src/lib-master/stats-client.c - -2023-03-24 14:04:00 +0000 Marco Bettini (9c3e210f1e) - - lib-master: stats_client_send_event() - Also flush conn.output and check for - errors - - -M src/lib-master/stats-client.c - -2023-03-23 15:35:49 +0000 Marco Bettini (6231b7af67) - - lib-master: stats_event_write() - Don't accumulate more than IO_BLOCK_SIZE - bytes in str buffer - - -M src/lib-master/stats-client.c - -2023-02-24 14:06:14 +0200 Timo Sirainen (d6c67f24c4) - - lib: event-filter-parser.y - Add workaround for nerrs being unused warning - - Fixes with clang-17: warning: variable 'event_filter_parser_nerrs' set but - not used - -M src/lib/event-filter-parser.y - -2023-02-24 14:02:01 +0200 Timo Sirainen (6c22f4dc1f) - - global: Remove dead code - - -M src/lib-dict/test-dict-client.c -M src/lib-master/test-event-stats.c -M src/lib/test-mempool-allocfree.c - -2021-12-31 11:29:02 +0200 Timo Sirainen (7c73ba5364) - - lib-dict: test-dict-client - Handle shutdown cleanly with ctrl-c - - -M src/lib-dict/test-dict-client.c - -2022-07-07 13:58:02 +0300 Aki Tuomi (4c06fee481) - - login-common: Handle missing ssl_iostream in get_var_expand_table() - - It can be missing during connection disconnection when connection is lost - uncleanly. - -M src/login-common/client-common.c - -2023-04-04 11:51:22 +0300 Timo Sirainen (b0fd628d56) - - notify-status: Fix crash if user initialization fails - - The deinit code crashed if mail_namespaces_created hook hadn't been called - before user was deinitialized. - -M src/plugins/notify-status/notify-status-plugin.c - -2023-06-29 13:40:24 +0300 Aki Tuomi (2340275fad) - - lib-sql: pgsql - Use orig_ioloop instead of local variable - - orig_ioloop is used later, leaving it NULL here causes problems when timeout - is added by sqlpool. - - Broken in 8981a973987c237552e46b68075b64caa8c1f5bb - -M src/lib-sql/driver-pgsql.c - -2023-06-26 10:43:00 +0000 Marco Bettini (4c3ae0468e) - - dbox: Fix for dangling pointer being passed to cleanup_interval() - - Broken in 88eee28fd86d619b26ce6aebadca5b18e748dc6f - -M src/lib-storage/index/dbox-common/dbox-storage.c -M src/lib-storage/index/dbox-common/dbox-storage.h -M src/lib-storage/index/dbox-multi/mdbox-map.c - -2023-06-20 18:58:13 +0300 Timo Sirainen (7268e169ec) - - mdbox: Optimize mail_temp_scan_interval storage/ scanning - - Use the generic dbox scanning code, which avoids stat()ing the directory by - keeping the timestamp in index header. Also do the scanning while at session - deinit instead of startup, so the latency isn't visible to clients. - -M src/lib-storage/index/dbox-multi/mdbox-map.c - -2023-06-20 18:58:00 +0300 Timo Sirainen (37ddfe8efb) - - lib-storage: Split off index_mailbox_view_update_last_temp_file_scan() - - -M src/lib-storage/index/index-storage.c -M src/lib-storage/index/index-storage.h - -2023-06-20 22:28:35 +0300 Timo Sirainen (6b4a3f8e7b) - - dbox: mail_temp_scan_interval - Fix deleted temp file prefix - - dbox files are always created with DBOX_TEMP_FILE_PREFIX, not the mailbox - list-specific prefix. This was a problem only if dbox was used with - LAYOUT=Maildir++, which nobody was likely to do. Other layouts had identical - temp file prefixes to DBOX_TEMP_FILE_PREFIX. - -M src/lib-storage/index/dbox-common/dbox-storage.c - -2023-06-20 18:54:49 +0300 Timo Sirainen (41ddf30762) - - dbox: Split off dbox_mailbox_list_cleanup() - - -M src/lib-storage/index/dbox-common/dbox-storage.c -M src/lib-storage/index/dbox-common/dbox-storage.h - -2023-06-20 18:44:52 +0300 Timo Sirainen (58028ecbcf) - - mdbox: Don't do temp file scanning for mailbox directories - - The intention was to delete any temporary mail files that have been left - behind by crashed processes, but mail files are written to storage/ - directory. - -M src/lib-storage/index/dbox-common/dbox-storage.c -M src/lib-storage/index/dbox-common/dbox-storage.h -M src/lib-storage/index/dbox-single/sdbox-storage.c - -2023-06-20 18:24:34 +0300 Timo Sirainen (a8424a71d7) - - mdbox: Fix fdatasync() path when saving mails - - It was supposed to be called on the parent directory of where mails were - written, i.e. storage/ directory. The previous code was instead calling it - on the mailbox-specific directory (similarly to sdbox) where nothing was - written. - -M src/lib-storage/index/dbox-multi/mdbox-save.c - -2023-06-20 18:21:38 +0300 Timo Sirainen (c6935e5ef2) - - mdbox: Fix crash if fdatasync_path() fails - - There is no dest_mail anymore at this stage of transaction. - -M src/lib-storage/index/dbox-multi/mdbox-save.c - -2023-04-12 12:06:52 +0300 sergey.kitov (7bb46f7e89) - - lib-storage: Rollback save transaction when transaction commit fails. - - -M src/lib-storage/index/index-transaction.c - -2023-02-05 20:51:12 +0200 Timo Sirainen (ac81ce75a6) - - sdbox: Fix panic due to leaked mail_index_view if sync fails - - Fixes: Panic: Leaked view for index .../dbox-Mails/dovecot.index: Opened in - mail-index-sync.c:445 - -M src/lib-storage/index/dbox-single/sdbox-sync.c - -2023-02-05 20:50:06 +0200 Timo Sirainen (aae93d3ea7) - - lib-index: Don't update log_file_tail_offset on sync if reading - dovecot.index.log failed - - This is more of a theoretical issue, since dovecot.index.log read failure is - very unlikely. - -M src/lib-index/mail-index-sync-update.c - -2023-02-05 20:47:08 +0200 Timo Sirainen (830a7db7c0) - - lib-index: Don't update max_tail_offset if write to dovecot.index.log fails - - The max_tail_offset didn't actually increase in that situation. This fixes - wrongly updating mail_index_header.log_file_tail_offset after write to - dovecot.index.log failed (due to out of disk space), which in turn can cause - some unexpected errors. - -M src/lib-index/mail-transaction-log-append.c - -2023-02-05 20:46:34 +0200 Timo Sirainen (08740f7902) - - lib-index: Fix event leak if purging dovecot.index.cache fails - - -M src/lib-index/mail-cache-purge.c - -2022-11-02 15:56:54 +0200 Aki Tuomi (6d5eb29761) - - lib-oauth2: jwt - Allow missing 'typ' field - - -M src/lib-oauth2/oauth2-jwt.c -M src/lib-oauth2/test-oauth2-jwt.c - -2020-05-28 15:05:08 +0300 Aki Tuomi (9f528295d1) - - lib-oauth2: test-oauth2-jwt - Ensure we ignore 'none' algorithm - - -M src/lib-oauth2/test-oauth2-jwt.c - -2023-04-14 11:35:30 +0300 Timo Sirainen (3ea25161a3) - - lib-login: Don't update process title if verbose_proctitle=no - - Broken by 4fcd7f497577af361fc3313fbc07a61c14e17715 - -M src/lib-master/master-login.c - -2023-03-24 03:26:33 +0200 Timo Sirainen (1e8d0face3) - - global: Enable login_server_settings.update_proctitle - - -M src/imap-urlauth/imap-urlauth.c -M src/imap/main.c -M src/pop3/main.c -M src/submission/main.c - -2023-03-24 03:26:11 +0200 Timo Sirainen (2a9b8c4e3a) - - lib-login: Add login_server_settings.update_proctitle - - Update the current login state in process title when enabled. - -M src/lib-master/master-login.c -M src/lib-master/master-login.h - -2023-03-24 04:02:28 +0200 Timo Sirainen (5266019fbb) - - lib-login: Keep connection in server's linked list until it's fully freed - - Otherwise the connection isn't accessible from any global variables. - -M src/lib-master/master-login.c - -2023-03-24 02:29:39 +0200 Timo Sirainen (af6edaef3f) - - imap: Update process title while unhibernating - - Previously the process title stayed as [idling] even though the process was - busy waiting on the imap-hibernate process to finish sending the - unhibernation request. - -M src/imap/imap-master-client.c -M src/imap/imap-master-client.h -M src/imap/main.c - -2023-03-24 02:00:37 +0200 Timo Sirainen (ed42bc9c0f) - - lib-master: Set process title to [initializing] until - master_service_init_finish() - - -M src/lib-master/master-service.c - -2023-03-24 02:02:58 +0200 Timo Sirainen (d591711cdb) - - lib: Add process_title_get_counter() - - -M src/lib/process-title.c -M src/lib/process-title.h - -2023-03-24 01:53:43 +0200 Timo Sirainen (c7cf91d863) - - master: Set VERBOSE_PROCTITLE environment to child processes - - This is needed for updating process title during initialization before - settings are read. - -M src/lib-master/master-interface.h -M src/master/service-process.c - -2023-03-24 01:15:21 +0200 Timo Sirainen (f89dec342d) - - imap: Disconnect imap-master client if it's not sending anything for 25 - seconds - - -M src/imap/imap-master-client.c - -2023-03-24 01:45:34 +0200 Timo Sirainen (61e4e19d06) - - imap: Improve disconnection log message if it happens immediately after - unhibernation - - The "No commands sent after unhibernation" can mean that imap-hibernate - process saw a timeout while unhibernating and shutdown the connection. Or it - can also mean just that the client itself disconnected. - -M src/imap/imap-client.c - -2023-03-24 01:41:37 +0200 Timo Sirainen (8eb93d1c41) - - imap-hibernate: If unhibernation fails, make sure imap process won't finish - it later on - - Especially if unhibernation fails due to a connection timeout to imap - process due to high load, it's possible that the imap process will - eventually finish the unhibernation and continue with the client. This is - rather confusing, since imap-hibernate process already logged that the - client got disconnected. - -M src/imap-hibernate/imap-client.c - -2022-01-13 16:54:18 +0200 Timo Sirainen (e4d6c8055e) - - imap: Add client.unhibernated boolean - - -M src/imap/imap-client.c -M src/imap/imap-client.h -M src/imap/imap-common.h -M src/imap/imap-master-client.c -M src/imap/main.c -M src/imap/test-imap-client-hibernate.c - -2023-05-05 15:20:34 +0000 Marco Bettini (80ddfb7b30) - - auth: mech_gssapi_unwrap() - Release gss_release_buffe(outbuf) before - returning - - -M src/auth/mech-gssapi.c - -2023-03-23 22:23:39 +0200 Timo Sirainen (7566d8783f) - - master: Fix service { idle_kill } to work better on busy servers - - The previous behavior was to kill a process once it had idled for idle_kill - seconds. However, on a busy server the new connections are picked up - somewhat randomly by all the idling processes, so there's never any single - process idling for a long time. This effectively prevents the idle_kill from - killing any processes, even if there are unnecessarily many of them. - - The new behavior here tracks the lowest number of idling processes during - idle_kill time interval. Then it kills that many processes. If the load - stays the same, this should shrink the number of processes to the number - that is needed to handle the load, but no more. - -M src/master/service-monitor.c -M src/master/service-process.c -M src/master/service.h - -2023-03-23 16:07:26 +0200 Timo Sirainen (d0e74ddac0) - - master: Replace per-process idle_kill timeout with per-service - - This is much more efficient, since it doesn't have to keep updating the - timeout constantly for busy processes. - - This change still preserves the original way the idle_kill setting behaves. - -M src/master/service-monitor.c -M src/master/service-process.c -M src/master/service-process.h -M src/master/service.h - -2023-03-23 16:37:08 +0200 Timo Sirainen (008622eb2c) - - master: Add asserts to make sure counters don't wrap - - -M src/master/service-process.c - -2023-03-23 16:36:10 +0200 Timo Sirainen (6cfee1e183) - - master: Add service.process_idling to count number of idling processes - - -M src/master/service-monitor.c -M src/master/service-process.c -M src/master/service.h - -2023-03-23 15:09:43 +0200 Timo Sirainen (a4e9e0c9b3) - - master: Split processes list to busy and idling processes - - Keep the idling processes sorted by idle_start time. This will be needed by - the next commit. - -M src/master/main.c -M src/master/master-client.c -M src/master/service-monitor.c -M src/master/service-process.c -M src/master/service-process.h -M src/master/service.c -M src/master/service.h - -2023-02-28 12:05:44 +0000 Marco Bettini (3b67507e97) - - dbox: dbox_cleanup_temp_files() - Fuzz scan interval adding 0..+30% based on - username hash - - -M src/lib-storage/index/dbox-common/dbox-storage.c - -2023-02-28 11:45:43 +0000 Marco Bettini (c3756423f0) - - dbox: dbox_cleanup_temp_files() - Reformat code - - -M src/lib-storage/index/dbox-common/dbox-storage.c - -2023-02-28 11:44:48 +0000 Marco Bettini (5fcf0da179) - - dbox: dbox_cleanup_temp_files() - Remove unnecessary else/else if after - returns - - -M src/lib-storage/index/dbox-common/dbox-storage.c - -2023-02-28 11:30:22 +0000 Marco Bettini (e91d8309f5) - - dbox: dbox_mailbox_open() - Drop unused ctime - - -M src/lib-storage/index/dbox-common/dbox-storage.c -M src/lib-storage/index/dbox-common/dbox-storage.h -M src/lib-storage/index/dbox-multi/mdbox-storage.c -M src/lib-storage/index/dbox-single/sdbox-storage.c - -2023-02-28 11:21:10 +0000 Marco Bettini (4bf0ee1814) - - dbox: dbox_mailbox_open() - Move dbox_cleanup_temp_files() to - dbox_mailbox_close() - - -M src/lib-storage/index/dbox-common/dbox-storage.c -M src/lib-storage/index/dbox-common/dbox-storage.h -M src/lib-storage/index/dbox-multi/mdbox-storage.c -M src/lib-storage/index/dbox-single/sdbox-storage.c - -2023-02-28 10:15:50 +0000 Marco Bettini (f18b8e9f46) - - dbox: dbox_mailbox_open() - Infer last_temp_file_scan from dir's atime if 0 - - -M src/lib-storage/index/dbox-common/dbox-storage.c - -2023-02-28 10:14:26 +0000 Marco Bettini (4ddb4f7656) - - dbox: dbox_mailbox_create() - Update last_temp_file_scan - - -M src/lib-storage/index/dbox-common/dbox-storage.c - -2023-03-03 16:15:17 +0000 Marco Bettini (119d496acd) - - lib-storage: dbox_cleanup_temp_files() - Fix inverted check for ENOENT - - -M src/lib-storage/index/dbox-common/dbox-storage.c - -2023-03-24 08:53:27 +0200 Aki Tuomi (eab9fd0154) - - stats: openmetrics - Set field always when used - - Satisfied static analysers. - - Broken in ba19a18d54cb7cf7de93d6a235862a408cfe5828 - -M src/stats/stats-service-openmetrics.c - -2023-01-26 08:15:29 +0200 Aki Tuomi (8aef0ce5ea) - - stats: openmetrics - Create metrics for all specified fields - - -M src/stats/stats-service-openmetrics.c - -2023-04-04 00:43:55 +0300 Timo Sirainen (4c74cf89f6) - - dsync: Fix handling mailboxes with % character when BROKENCHAR isn't - explicitly set in config - - When vname_escape_char (= BROKENCHAR) isn't explicitly set in configuration, - '%' character (or if it was hierarchy separator, '~') was used as the - default internal escape character. However, this was used inconsistently - between local and remote mailbox trees. The remote tree stored the mailbox - names unescaped, while the local mailbox names were escaped. This - inconsistency caused dsync to do unnecessary mailbox renames, which might - have ended up failing. - - This especially fixes dsync failures when mailbox name ended with the '%' - character. - -M src/doveadm/dsync/dsync-brain-mailbox-tree.c -M src/doveadm/dsync/dsync-mailbox-tree-fill.c -M src/doveadm/dsync/dsync-mailbox-tree.h - -2023-04-04 00:43:04 +0300 Timo Sirainen (e69f52d697) - - dsync: Refactor dsync_brain_mailbox_to_parts() into - dsync_mailbox_name_to_parts() - - -M src/doveadm/dsync/dsync-brain-mailbox-tree.c -M src/doveadm/dsync/dsync-mailbox-tree.c -M src/doveadm/dsync/dsync-mailbox-tree.h - -2023-03-20 14:00:48 +0000 Marco Bettini (37f46933cf) - - virtual: virtual_backend_box_lookup() - Enforce callers to check if the call - succeeded - - -M src/plugins/virtual/virtual-mail.c -M src/plugins/virtual/virtual-storage.c -M src/plugins/virtual/virtual-storage.h -M src/plugins/virtual/virtual-sync.c - -2023-03-24 13:50:29 +0000 Marco Bettini (f861c0be75) - - virtual: virtual_sync_apply_existing_expunges() - Don't crash if the backend - mailbox has been removed - - -M src/plugins/virtual/virtual-sync.c - -2023-01-02 10:23:43 +0200 Timo Sirainen (c29eccb64e) - - lib-index: Fix assert-crash when header's log_file_seq/offset shrinks - - mail_index_sync_set_log_view() is also missing this check, but it doesn't - seem to actually happen. It's likely handled by mail_index_map() already. - - Fixes: Panic: file mail-transaction-log-view.c: line 165 - (mail_transaction_log_view_set): assertion failed: (min_file_seq <= - max_file_seq) - -M src/lib-index/mail-index-sync.c - -2022-03-21 12:22:38 +0100 Stephan Bosch (d3aa3d876a) - - lib-http: http-server-connection - Fix segfault occurring when output is - resumed on closed connection. - - -M src/lib-http/http-server-connection.c - -2023-03-07 15:53:06 +0200 Timo Sirainen (7b60aa05af) - - man: Add doveadm fts check fast/full - - -M doc/man/doveadm-fts.1.in - -2023-02-09 17:04:22 +0200 Timo Sirainen (5b6f678009) - - lib-imap-client: Fix/clarify selection state handling - - The old code assumed that selected_box would be non-NULL while a new mailbox - is being selected. That's not true though, the imapc-storage code closes the - old mailbox before selecting the next one. So the QRESYNC-specific code for - tracking selected-state was never being used. Fixed this, and clarified in - general how the selected-state is supposed to work. - -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-connection.c -M src/lib-imap-client/imapc-connection.h - -2023-02-09 17:03:00 +0200 Timo Sirainen (2d6514adf9) - - lib-imap-client: Rename imapc_connection.selecting_box to - qresync_selecting_box - - It's only used when QRESYNC extension is enabled. - -M src/lib-imap-client/imapc-connection.c - -2023-02-09 16:21:24 +0200 Timo Sirainen (dbe23ac284) - - imapc: Fix handling EXISTS reply to previous mailbox while selecting new - mailbox - - For example if the communication was: - - C: a SELECT box1 - ... C: b SELECT box2 S: * 10 EXISTS S: * 1 EXISTS S: * OK [UIDVALIDITY - 1675948459] UIDs valid S: ... S: b OK - - The first EXISTS is meant for box1, not box2. Fixed by not starting a FETCH - (FLAGS) for the mailbox being selected until the tagged reply is received. - -M src/lib-storage/index/imapc/imapc-mailbox.c - -2023-02-09 16:12:35 +0200 Timo Sirainen (a11c232854) - - imapc: Don't process untagged replies in mailbox that isn't fully selected - yet - - For example if the communication was: - - C: a SELECT box1 - ... C: b SELECT box2 S: * 1 EXPUNGE S: * 1 EXISTS S: * OK [UIDVALIDITY - 1675948459] UIDs valid S: ... S: b OK - - The expunge was intended for box1, not box2. This caused: Warning: - imapc(...): Mailbox '...' state corrupted: EXPUNGE received for empty - mailbox - reconnecting - - Fixed this by ignoring untagged EXPUNGE, FETCH, SEARCH and ESEARCH replies - when the UIDVALIDITY reply hasn't been yet received for a mailbox. - -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-storage.h - -2023-02-08 20:40:41 +0200 Aki Tuomi (cf7d19e729) - - auth: test-lua - Check that password is returned in lookup - - -M src/auth/test-lua.c - -2023-02-08 20:32:57 +0200 Aki Tuomi (0cc4207a33) - - auth: test-lua - Test bad keynames end up ignored - - -M src/auth/test-lua.c - -2023-02-01 13:58:42 +0200 Aki Tuomi (97e121bb6d) - - lib-storage: mail-user - Add event_ prefixed values from userdb as event - fields - - -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-user.c -M src/lib-storage/mail-user.h - -2023-02-01 13:53:42 +0200 Aki Tuomi (01263527d5) - - login-common: Add event_ prefixed values from auth as event fields - - -M src/lib-auth/auth-client-request.c -M src/login-common/client-common-auth.c -M src/login-common/sasl-server.c - -2023-02-06 21:23:48 +0200 Aki Tuomi (bb8fbcc60a) - - auth: db-lua - Skip invalid keys and values on field export - - -M src/auth/db-lua.c - -2023-01-20 16:41:47 +0100 Markus Valentin (0e3b992877) - - maildir: maildir_mailbox_open() - Split off maildir_is_selectable() - - -M src/lib-storage/index/maildir/maildir-storage.c - -2023-01-20 16:40:22 +0100 Markus Valentin (7522de9385) - - maildir: maildir_mailbox_open() - If the namespace root or INBOX has any - subdir create others as well - - -M src/lib-storage/index/maildir/maildir-storage.c - -2023-01-20 08:50:48 +0100 Markus Valentin (d669ab7d1b) - - maildir: maildir_mailbox_open() - Disable maildir subdirectory creation for - INBOX - - This was added in 522925f6e9ff8fe9592511c2221b3d6526d4cbf4. In the meantime - autocreate code changed so this is no longer valid. - -M src/lib-storage/index/maildir/maildir-storage.c - -2023-01-09 15:10:47 +0100 Markus Valentin (dc1d871a38) - - welcome-plugin: Remove welcome_open_box() - - -M src/plugins/welcome/welcome-plugin.c - -2023-01-09 15:06:54 +0100 Markus Valentin (171295bdef) - - welcome-plugin: Move script_execute() to welcome_create_box() - - The welcome script was executed while opening the INBOX only when the same - session had created it. This could have led to unexpectedly not executing - welcome when not opening the mailbox right after it was created. - - The original code delayed the welcome script run because mailbox creation - wasn't finished until the mailbox was opened. This seems to have become - fixed at some point. - -M src/plugins/welcome/welcome-plugin.c - -2023-01-17 08:44:55 +0200 Timo Sirainen (cb666c441a) - - lib-http: server - Fix potential crash with previous change on client - disconnect - - Broken by 1418d1e9018fc34287722467c6ee506f3e378e1a - -M src/lib-http/http-server-response.c - -2023-01-11 14:32:20 +0200 Timo Sirainen (1414b26044) - - lib-http: test-http-payload - Use ostream-final-trickle for server - connections - - -M src/lib-http/test-http-payload.c - -2023-01-11 14:31:55 +0200 Timo Sirainen (72de31a36e) - - lib-http: test-http-payload - Add filenames to data mismatch error messages - - -M src/lib-http/test-http-payload.c - -2023-01-11 14:26:53 +0200 Timo Sirainen (b0801787b2) - - lib-test: Add ostream-final-trickle - - -M src/lib-test/Makefile.am -A src/lib-test/ostream-final-trickle.c -A src/lib-test/ostream-final-trickle.h - -2023-01-11 16:02:38 +0200 Timo Sirainen (d3a0ff0ef3) - - lib: Add connection_vfuncs.init() - - -M src/lib/connection.c -M src/lib/connection.h - -2023-01-12 12:23:31 +0200 Timo Sirainen (e72869b16a) - - lib-http: server - Don't disconnect client before response is fully sent - - This could happen at least when the payload is empty and the final LF was - buffered. - -M src/lib-http/http-server-response.c - -2023-01-11 00:44:40 +0200 Timo Sirainen (a5bd8e1bc5) - - lib-http: server - Don't disconnect client before payload is fully sent - - -M src/lib-http/http-server-response.c - -2023-01-12 17:17:29 +0200 Timo Sirainen (ec90c65b92) - - lib-storage: Add mail_storage_service_input.unexpanded_set_parser - - -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage-service.h - -2022-11-23 09:21:10 +0200 Aki Tuomi (90ac2496ca) - - NEWS: Update news - - -M NEWS - -2022-12-28 12:19:11 +0200 Aki Tuomi (ed402ee9a7) - - auth: Fix auth_request_password_verify() result handling - - Pass the result directly to caller, as auth_request_password_verify() - returns passdb result already. - -M src/auth/auth-worker-client.c -M src/auth/passdb-cache.c -M src/auth/passdb-dict.c -M src/auth/passdb-ldap.c -M src/auth/passdb-lua.c -M src/auth/passdb-passwd-file.c -M src/auth/passdb-passwd.c -M src/auth/passdb-sql.c -M src/auth/passdb-static.c - -2022-12-28 12:05:39 +0200 Aki Tuomi (65d5b77f0e) - - auth: Change auth_request_password_verify() to return enum passdb_result - - This does not break anything, because PASSDB_RESULT_OK is 1 and mismatch is - 0. - -M src/auth/auth-request.c -M src/auth/auth-request.h - -2022-12-26 23:48:27 +0200 Timo Sirainen (8832f6c002) - - lib-storage: Fix unnecessary data stack growth when iterating mailboxes - - When listing mailbox list indexes, it was possible that each iteration - increased the data stack memory usage. It was all freed at the end though, - so this didn't cause any permanent leaks. - - Broken by 4fdb040d2471c6e5006579bef1dd0586f89c8570 - -M src/lib-storage/list/mailbox-list-index-iter.c - -2022-12-14 15:07:38 +0200 Aki Tuomi (1fc7d5465f) - - lib-lua: http - Use correct dns-client path - - The current code tries to look it up from user homedir sometimes. - - Broken in 5b56debd31800ec45fc0c6529b138d1ce943b0aa - -M src/lib-lua/dlua-dovecot-http.c - -2022-12-01 10:54:38 +0100 Markus Valentin (ea3859fd59) - - lib-sql: Add sql_statement_set_no_log_expanded_values() - - This allows to store no_log_expanded_values to sql_statement. - -M src/lib-dict-backend/dict-sql.c -M src/lib-sql/sql-api-private.h -M src/lib-sql/sql-api.c -M src/lib-sql/sql-api.h - -2022-12-01 11:13:16 +0100 Markus Valentin (dd7f5beff9) - - dict: Implement DICT_PROTOCOL_CMD_HIDE_LOG_VALUES for dict and dict-proxy - - -M src/dict/dict-commands.c -M src/lib-dict/dict-client.c -M src/lib-dict/dict-client.h - -2022-12-01 11:03:26 +0100 Markus Valentin (b94b31d5a9) - - lib-dict: Add .set_hide_log_values() to dict vfuncs - - This is used to set hide_log_values in dict op settings. - -M src/lib-dict/dict-private.h -M src/lib-dict/dict.c -M src/lib-dict/dict.h - -2022-12-05 11:58:31 +0100 Markus Valentin (0f5980d01e) - - cassandra: Rename query to log_query and initialize it with - sql_statement_get_log_query() - - Also add sql_statement_get_log_query() to sql-api. - -M src/lib-sql/driver-cassandra.c -M src/lib-sql/sql-api-private.h -M src/lib-sql/sql-api.c - -2022-12-05 11:50:30 +0100 Markus Valentin (ec9f878128) - - lib-event: Add event_unset_log_message_callback() - - -M src/lib/lib-event.c -M src/lib/lib-event.h - -2022-11-28 11:17:11 +0100 Markus Valentin (74bbb6b0e9) - - fs-api: Add fs_get_event() - - -M src/lib-fs/fs-api.c -M src/lib-fs/fs-api.h - -2022-12-01 12:37:17 +0200 Timo Sirainen (f23ca5016f) - - pop3: Fix assert-crash when POP3 command name contained ':' - - The cmd_ reason code now only uses valid command names. - - Broken by d2ab26be6038bd53b13a3ff18c403d6c192c1d91 with incomplete fix in - 1309137812424c80e63d3c1052795b43d6e19803. - - Fixes: Panic: event_reason_code_prefix(): name has ':' - -M src/pop3/pop3-client.c -M src/pop3/pop3-commands.c -M src/pop3/pop3-commands.h - -2022-12-01 12:32:28 +0200 Timo Sirainen (cdd778233d) - - pop3: Move pop3 commands to array and add pop3_command_find() - - -M src/pop3/pop3-commands.c -M src/pop3/pop3-commands.h - -2022-11-23 09:21:10 +0200 Aki Tuomi (1f127c8a59) - - NEWS: Update news - - -M NEWS - -2022-11-14 23:27:33 +0200 Timo Sirainen (88150e0bb8) - - lmtp: Fix restoring global log prefix after session is finished - - Broken by 069dfd657fd91a0e2a3a9307a0cf499d795f27f2 - - This change also slightly changes the lmtp log prefixes in some places. It - removes "conn $ip:$port [$idx]: rcpt $user:" from some of the log messages - (but that wasn't in all of the log messages anyway), but it now always - includes mail_log_prefix in these log messages, which previously wasn't - always set at that point yet. - -M src/lmtp/main.c - -2022-10-21 13:32:48 +0000 Marco Bettini (805db6b027) - - fts: struct fts_user - Drop data_languages - - -M src/plugins/fts/fts-user.c -M src/plugins/fts/fts-user.h - -2022-10-21 09:15:04 +0000 Marco Bettini (74d8e389bf) - - fts: fts-search-args - Fix stopwords expansion (only on multiple languges - and with stopword filter enabled) - - -M src/plugins/fts/fts-search-args.c - -2022-10-20 14:07:23 +0000 Marco Bettini (07ec8339ee) - - lib-storage: enum mail_search_arg_type - Add SEARCH_NIL - - -M src/lib-storage/index/imapc/imapc-search.c -M src/lib-storage/index/index-search.c -M src/lib-storage/mail-search-args-cmdline.c -M src/lib-storage/mail-search-args-imap.c -M src/lib-storage/mail-search-args-simplify.c -M src/lib-storage/mail-search-register-imap.c -M src/lib-storage/mail-search.c -M src/lib-storage/mail-search.h -M src/lib-storage/test-mail-search-args-simplify.c - -2022-11-09 15:29:39 +0000 Marco Bettini (f41286b8f1) - - lib-storage: mail_search_args_simplify_drop_redundant_args() - Apply - Absorptive law versus all terms, not just the 1st - - -M src/lib-storage/mail-search-args-simplify.c -M src/lib-storage/mail-search.c -M src/lib-storage/mail-search.h -M src/lib-storage/test-mail-search-args-simplify.c - -2022-11-03 17:40:28 +0200 Timo Sirainen (8fb6b9e1b8) - - dsync: Skip autocreated mailboxes that haven't been created yet - - -M src/doveadm/dsync/dsync-mailbox-tree-fill.c - -2022-11-04 14:01:14 +0200 Timo Sirainen (b05564d157) - - imapc: Fix listing INBOX when INBOX is already the namespace prefix - - This especially caused problems when using dsync with imapc, resulting in - "Remote lost mailbox GUID" errors. - -M src/lib-storage/index/imapc/imapc-list.c - -2022-11-01 11:21:34 +0200 Timo Sirainen (142c054f85) - - replicator: Fix crash when importing user not listed by userdb iteration - - Broken by 31545b4f38ea85615f0111a33d630a03d92d22ab - -M src/replication/replicator/replicator-queue.c - -2022-08-16 23:42:51 +0300 Timo Sirainen (7286076402) - - replicator: Add unit test to replicator-queue - - -M src/replication/replicator/Makefile.am -A src/replication/replicator/test-replicator-queue.c - -2022-10-28 17:57:03 +0300 Timo Sirainen (95ec1043e0) - - replicator: Add replicator_queue_count() and replicator_queue_peek() - - These will be useful for the following unit test. - -M src/replication/replicator/replicator-queue.c -M src/replication/replicator/replicator-queue.h - -2022-10-25 15:39:39 +0300 Timo Sirainen (8190571703) - - replicator: Add "next sync secs" field to doveadm replicator status - - -M src/doveadm/doveadm-replicator.c -M src/replication/replicator/doveadm-connection.c - -2022-10-25 13:27:23 +0300 Timo Sirainen (390e5a4c3d) - - replicator: Make sure to prevent request starvation - - This synchronizes how priority queue is ordered vs what - replicator_queue_want_sync_now() returns. The mismatch might have caused - request starvation in some situations because they behaved differently. - - Also this change makes sure that higher priority requests don't infinitely - block lower priority requests. Instead, they get a temporary boost time - (hardcoded 15-45 minutes). Afterwards lower priority requests are started to - be handled as well. - -M src/replication/replicator/doveadm-connection.c -M src/replication/replicator/replicator-queue.c -M src/replication/replicator/replicator-queue.h - -2022-10-25 13:11:37 +0300 Timo Sirainen (97bf10e1da) - - replicator: Don't update user's last_update if priority doesn't change - - This didn't actually matter, since it was only used to check if importing - should update an existing user. However, importing is only run at startup - when all users have last_update=0 anyway. - - The following changes bring new use cases for last_update. - -M src/replication/replicator/replicator-queue.c -M src/replication/replicator/replicator-queue.h - -2022-10-25 13:08:36 +0300 Timo Sirainen (5c9f252471) - - replicator: Change replicator_queue_add_sync_callback() to take user struct - - This is just to clean up the API to match the previous change. - -M src/replication/replicator/notify-connection.c -M src/replication/replicator/replicator-queue.c -M src/replication/replicator/replicator-queue.h - -2022-10-25 12:49:03 +0300 Timo Sirainen (278d4a08f2) - - replicator: Fix user placement in replication queue - - Especially replicator queue importing and NOTIFY command could have placed - the user to wrong place in the queue, because they modified the last sync - timestamps afterwards. - - Fixed by splitting replicator_queue_add() into get/update/add(), so all the - necessary changes can be done before replicator_queue_add() is used to place - the user into the queue. - -M src/replication/replicator/doveadm-connection.c -M src/replication/replicator/notify-connection.c -M src/replication/replicator/replicator-queue-auth.c -M src/replication/replicator/replicator-queue.c -M src/replication/replicator/replicator-queue.h - -2022-10-28 00:56:29 +0300 Timo Sirainen (94f620c4da) - - maildir: If mailbox create fails, don't try to apply mailbox_update changes - - This was especially causing problems with mailbox GUID mismatches in dsync. - The mismatch wasn't automatically fixed, because mailbox_create() - incorrectly kept updating the mailbox GUID for the already existing mailbox. - - Fixes errors such as: Remote lost mailbox GUID ... (maybe it was just - deleted?) - -M src/lib-storage/index/maildir/maildir-storage.c - -2022-10-27 02:56:45 +0300 Timo Sirainen (29c982fe52) - - lib-storage: mailbox_attribute_get*() - Fail early on with empty key lookup - - This fixes using mail_attribute_dict with dict-sql. - -M src/lib-storage/mailbox-attribute.c - -2022-03-03 14:21:00 +0100 Markus Valentin (2aa632260b) - - imapc: imapc_connection_disconnect_full() - Only conditionally abort - - Only abort commands if there are no reconnect commands. Otherwise these - still will be handled and the commands memory will be freed after handling - them. - - Broken by 6d16e82fa2c352974558e1415d06f07d8962fe09 - -M src/lib-imap-client/imapc-connection.c - -2022-02-28 15:50:05 +0100 Markus Valentin (e91916ad57) - - imapc: imapc_connection_disconnect_full() - Prevent leaking cmd->pool - - If the imapc connection was already disconnected when calling - imapc_connection_disconnect() it didn't clean up the commands and especially - the command pools. - -M src/lib-imap-client/imapc-connection.c - -2022-10-12 13:26:03 +0200 Markus Valentin (b0f19c117a) - - imapc: imapc_mailbox_get_status() - Implement STATUS_UNSEEN with INDEXPVT - - -M src/lib-storage/index/imapc/imapc-storage.c - -2022-10-19 09:26:55 +0300 Martti Rannanjärvi (410acf8760) - - lib-storage: mail-storage-list-index-rebuild - Don't use continue inside - T_BEGIN..T_END - - Coverity doesn't like using continue there. - -M src/lib-storage/list/mail-storage-list-index-rebuild.c - -2022-10-05 15:42:25 +0300 Aki Tuomi (ef26f7d1ef) - - lib-storage: LAYOUT=index rebuild - Fix detecting duplicate mailbox GUIDs in - index - - Otherwise duplicate folders are not properly cleared out. - - Broken in 2fc8d7024bb161aab08031b8212a736301844858 - -M src/lib-storage/list/mail-storage-list-index-rebuild.c - -2022-10-05 15:27:31 +0300 Aki Tuomi (ce65fc1fc9) - - lib-storage: LAYOUT=index rebuild - Remove existence check - - It's not needed. - -M src/lib-storage/list/mail-storage-list-index-rebuild.c - -2022-09-27 15:03:37 +0300 Aki Tuomi (8dbd0d79cc) - - lib-storage: LAYOUT=index rebuild - Sort mailbox tree before creating - - Try to load the mailbox original name already from storage so we can sort & - create the mailbox tree in correct order. - -M src/lib-storage/list/mail-storage-list-index-rebuild.c - -2022-09-27 13:01:29 +0300 Aki Tuomi (1ff6f0948a) - - lib-storage: LAYOUT=index rebuild - Remove first_list usage - - Instead, keep track of the list where box was found. - -M src/lib-storage/list/mail-storage-list-index-rebuild.c - -2022-10-05 15:15:17 +0300 Aki Tuomi (b5b41c5410) - - lib-storage: LAYOUT=index rebuild - Remove useless check for LAYOUT=index - - This is already done when collecting namespaces. - - Simplifies next change. - -M src/lib-storage/list/mail-storage-list-index-rebuild.c - -2022-09-21 11:14:40 +0300 Aki Tuomi (7c2176d18e) - - lib-storage: LAYOUT=index rebuild - Fix rebuilds when using multiple - namespaces - - The old code did not properly populate the mailbox list for each namespace, - but only for the first namespace. This caused mailbox storage existence - checks to always fail. - - This applies for LAYOUT=index only. - - Broken in 2fc8d7024bb161aab08031b8212a736301844858 - -M src/lib-storage/list/mail-storage-list-index-rebuild.c - -2022-10-18 11:35:22 +0300 Aki Tuomi (bcdf913eb8) - - lib-storage: list - Add separators to mailbox names when decoding from index - - Mailbox name header decode did not add separators to name, producing only - FooBarBar, when it was supposed to give Foo/Bar/Baz. - - Broken in 8216a079d8aac93e2537ed79485e301350ff3887 - -M src/lib-storage/list/mailbox-list-index.c - -2022-10-11 11:17:11 +0300 Timo Sirainen (efafbfaad6) - - lib-storage: Store mailbox names unescaped in box-name header - - This header is used when rebuilding mailbox list indexes with LAYOUT=index. - The escape character is currently hardcoded for LAYOUT=index, so this - couldn't have broken anything unless the hardcoded separator was changed. - Still, this was wrong/confusing behavior. - -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-index.h - -2022-06-15 12:19:55 +0300 Timo Sirainen (27131bdfa3) - - dict-redis: Fix crash when using synchronous commit - - Redis is usually used via dict proxy process, which always uses async - commit, so this didn't matter so much. - -M src/lib-dict/dict-redis.c - -2022-02-10 17:12:09 +0200 Timo Sirainen (a8f52eb73f) - - director: Fix handling auth_master_user_separator setting - - It was actually using a separate master_user_separator setting, causing - logins based on auth_master_user_separator to be hashed to wrong backends. - -M src/director/director-settings.c -M src/director/director-settings.h -M src/director/login-connection.c - -2022-09-27 14:28:38 +0300 Timo Sirainen (4a1b25a1c0) - - doveadm: Fix assert-crash on secondary service_user failures - - This mainly affected dsync when imapc authentication failed, but could have - also happened with copy and import commands. - - Fixes: Panic: file lib-event.c: line 506 (event_pop_global): assertion - failed: (event == current_global_event) - -M src/doveadm/doveadm-mail.c - -2022-09-28 16:21:26 +0300 Timo Sirainen (069dfd657f) - - lib-storage: Fix MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT to not change log - prefix in ioloop context changes - - This didn't appear to cause any visible bugs with the current code, but is - required by the next commit. - - Broken by ad13ab0702141065b79a1b7e8f2833e5b93871a4 - -M src/lib-storage/mail-storage-service.c - -2022-08-25 09:20:40 +0300 Aki Tuomi (62f388b03e) - - doc/example-config: Document submissions/465 for submission-login - - -M doc/example-config/conf.d/10-master.conf - -2022-02-22 17:47:55 +0100 Timo Sirainen (08bf01a739) - - lib-storage: Avoid calling mail_set_attachment_keywords() recursively - - It doesn't break, but it's unnecessary work. - -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h - -2022-02-22 17:44:02 +0100 Timo Sirainen (73962c1f59) - - lib-imap: imap_bodystructure_parse*() - Reset parts.data on failure - - Having the data filled only to some message_parts can confuse the callers, - thinking that all the parts were successfully filled. - - Fixes: Panic: file message-part-data.c: line 579 - (message_part_is_attachment): assertion failed: (data != NULL) - -M src/lib-imap/imap-bodystructure.c -M src/lib-imap/test-imap-bodystructure.c - -2022-06-16 10:57:15 +0300 Timo Sirainen (300b5c257b) - - dsync: Add more debug logging - - -M src/doveadm/dsync/dsync-mailbox-import.c - -2022-06-16 10:55:42 +0300 Timo Sirainen (8609825d4e) - - dsync: Fix dsync_features=no-header-hashes to match UIDs - - Mails were previously assumed to be the same, even if their UIDs didn't - match. This caused the sync to misbehave in some situations. - -M src/doveadm/dsync/dsync-mailbox-import.c - -2022-02-04 09:33:34 +0200 Aki Tuomi (4c56bab522) - - lib: ioloop-kqueue - Include time-util.h - - Needed to compile on MacOS - -M src/lib/ioloop-notify-kqueue.c - -2022-05-16 11:04:10 +0200 Timo Sirainen (7accb09647) - - util: dovecot-sysreport - Add timestamps before/after "ps" output - - Sometimes running "ps" can take a while, so make it clear in the output if - this has happened. - -M src/util/dovecot-sysreport - -2022-05-16 10:52:54 +0200 Timo Sirainen (fe8710dde7) - - util: dovecot-sysreport - Wait 3 seconds between "ps" outputs - - This allows showing more clearly in ps_output file whether a process is - using 100% CPU. - -M src/util/dovecot-sysreport - -2022-06-13 09:56:13 +0300 Timo Sirainen (a5ffdc8deb) - - doveadm deduplicate: Allocate memory properly for keys in hash table - - This caused wrong mails to be deleted somewhat randomly. Broken by - 320844f50cd669b602d30210e2e5216f65d2050f - -M src/doveadm/doveadm-mail-deduplicate.c - -2022-06-07 09:40:10 +0300 Martti Rannanjärvi (f0a9cbfb9d) - - auth: db_oauth2_have_all_fields() - Fix auth field existence check - - The correct pointer to pass on there is field, since ptr is the original - which still includes the ending }. - - Broken in 9b670175445a75987a713ff899d1a945255b0b5b and incorrectly fixed in - 5c2f3d0b85830d18dbb8b45b348da091e24d1b3b. - -M src/auth/db-oauth2.c - -2022-05-24 15:52:26 +0300 Timo Sirainen (c4086c78a8) - - lib-compression: istream-decompress - Copy parent stream name - - This is needed, because istream-decompress doesn't actually use the parent - stream as the istream parent. - -M src/lib-compression/istream-decompress.c - -2022-05-19 12:39:55 +0300 Aki Tuomi (8b3b959d0c) - - stats: stats-service-openmetrics - Always clear the stack before next metric - body - - If the attempt of generating output for the previous metric doesn’t - completely consume the stack, the next metric will start with a non-empty - stack, which breaks the metrics output. - -M src/stats/stats-service-openmetrics.c - -2022-05-19 11:24:23 +0200 Timo Sirainen (9708531c04) - - doveadm: Add dsync_features=no-header-hashes - - When this setting is enabled and one dsync side doesn't support mail GUIDs, - there is no fallback to using header hashes. Instead, dsync assumes that all - mails with identical IMAP UIDs contains the same mail contents. This can - significantly improve dsync performance with some IMAP servers that don't - support caching Date/Message-ID headers. - -M src/doveadm/doveadm-dsync.c -M src/doveadm/doveadm-settings.c -M src/doveadm/doveadm-settings.h -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-brain-private.h -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-brain.h -M src/doveadm/dsync/dsync-mailbox-import.c -M src/doveadm/dsync/dsync-mailbox-import.h - -2022-05-18 11:31:44 +0300 Timo Sirainen (30e6947179) - - auth: Fix assert-crash in iterating multiple userdbs - - Broken by 501e17ba6b448ba3c88338596e0e8f99f0693f79 - - Fixes: Panic: file userdb-blocking.c: line 125 (userdb_blocking_iter_next): - assertion failed: (ctx->conn != NULL) - -M src/auth/auth-master-connection.c - -2022-05-02 13:12:26 +0000 Marco Bettini (e56bb5e361) - - lib: Fix for clang Wstrict-bool pragma failing on unpatched clang - - Note that clang recognises GCC diagnostic pragmas too, so there is no need - for distinct pragmas in this case - -M src/lib/event-filter-lexer.l -M src/lib/event-filter-parser.y - -2022-05-02 11:14:10 +0000 Marco Bettini (fdf4cf0d01) - - quota: Fix for clang -Wstrict-bool clashing with #include - - -M src/plugins/quota/Makefile.am -A src/plugins/quota/rquota-pragmas.h - -2022-05-02 11:13:41 +0000 Marco Bettini (2f8682fc0d) - - m4: adding check for clang -Wstrict-bool availability - - -M configure.ac -M m4/dovecot.m4 - -2022-05-17 09:05:20 +0200 Timo Sirainen (39abdd9343) - - submission: Don't log write() errors that fail due to ECONNRESET - - These happen only if client initialization fails. - -M src/submission/main.c - -2022-05-17 09:03:47 +0200 Timo Sirainen (06e883ec95) - - imap: Don't log write() errors that fail due to ECONNRESET - - These happen only before the client is fully initialized. - -M src/imap/main.c - -2022-05-03 00:27:47 +0300 Timo Sirainen (a91f361d84) - - fts: Fix optimizing searches in virtual mailboxes without up-to-date indexes - - This could have caused header searches in virtual mailboxes to not return - all results when fts_enforced!=yes - - Broken by 9705b81fb51b5bdeaba12932a390ced2cc9dcad7 - -M src/plugins/fts/fts-storage.c - -2022-04-25 10:43:45 +0300 Aki Tuomi (97f19460a9) - - lib-lua: dlua-dovecot-http - Support more settings with HTTP client - - -M src/lib-lua/dlua-dovecot-http.c - -2022-04-25 14:27:12 +0300 Aki Tuomi (3eddd5eba5) - - lib-http: Rename max_auto_retry_delay to max_auto_retry_delay_secs - - -M src/lib-http/http-client-request.c -M src/lib-http/http-client.c -M src/lib-http/http-client.h - -2022-04-19 11:42:05 +0300 Timo Sirainen (1c6c3c320d) - - auth: auth_worker_call() - Return void instead of the connection - - The return value is no longer necessary, and it most likely would just be - used wrong. - -M src/auth/auth-worker-server.c -M src/auth/auth-worker-server.h - -2022-04-19 11:40:52 +0300 Timo Sirainen (94577c4450) - - auth: Fix crash when user iteration request is queued - - auth_worker_call() returns NULL when the request couldn't be handled - immediately, which would result in NULL pointer dereference later on. - -M src/auth/userdb-blocking.c - -2022-04-19 11:39:35 +0300 Timo Sirainen (f89c9e587e) - - auth: Add connection parameter to auth_worker_callback_t - - -M src/auth/auth-worker-server.c -M src/auth/auth-worker-server.h -M src/auth/passdb-blocking.c -M src/auth/passdb-cache.c -M src/auth/userdb-blocking.c - -2022-04-14 13:46:59 +0200 Timo Sirainen (865fb4f3c1) - - doveadm: Fix hang when flushing a corked print-ostream - - This could have happened at least with doveadm sync/backup command, i.e. - causing replication to hang until timeout is reached: - - Error: write() failed: Timed out after 60 seconds - -M src/doveadm/doveadm-print-server.c - -2022-04-08 15:59:59 +0300 Timo Sirainen (0dd36a73e4) - - lib-index: Always write tail offset the same as head offset - - The mail_index_write() must not be called unless this is safe to do. This - prevents unnecessarily reading through dovecot.index.log between tail..head - offsets, which can be expensive due to modseq calculation. - -M src/lib-index/mail-index-write.c - -2022-04-08 15:10:53 +0300 Timo Sirainen (aa7d67e6d6) - - lib-index: Optimize modseq scanning by using the modseq header in index - - View is very commonly set to start reading new changes since dovecot.index - was last written. When reading the newer records in dovecot.index.log, the - modseq of each change is needed to be known. However, the initial modseq - calculation was usually done inefficiently by reading the whole - dovecot.index.log from the beginning of the file. This change prevents that - by using instead the "modseq" header in dovecot.index to get the initial - modseq. - -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-modseq.c -M src/lib-index/mail-index-modseq.h -M src/lib-index/mail-index-private.h -M src/lib-index/mail-transaction-log-modseq.c - -2022-04-08 13:42:55 +0300 Timo Sirainen (40e2a21f83) - - lib-index: Handle 0-sized dovecot.index.log record properly - - The previous behavior was to just silently ignore it and have the next write - to the transaction log silently truncate away the trailing garbage. - - Now if the log file isn't locked the issue is still ignored, since it's - possible that this is just a race condition. But if the log is locked, it's - handled as corruption. - -M src/lib-index/mail-transaction-log-file.c - -2022-04-12 10:12:11 +0300 Aki Tuomi (36cbfb8e2b) - - lib: test-event-flatten - Use __FILE__ to get correct expected filename - - Fixes out of tree buids - - Broken in 4f752d381c8e19dd07d1e593996d02294668c8b6 - -M src/lib/test-event-flatten.c - -2022-03-01 10:01:06 +0200 Aki Tuomi (5c2f3d0b85) - - auth: db-oauth2 - Fix off by one in oauth2 variable handling - - Broken in 9b670175445a75987a713ff899d1a945255b0b5b - -M src/auth/db-oauth2.c - -2022-03-21 11:03:03 +0200 Timo Sirainen (dc40c6dbcf) - - dsync: Properly terminate escape_chars when escaping mailbox names - - Broken by 596c5a52e7e554571285e90063712cb0d37b34eb - -M src/doveadm/dsync/dsync-brain-mailbox-tree.c - -2022-03-02 09:39:30 -0500 Timo Sirainen (9e7503d439) - - dsync: Fix hierarchical mailbox name parts individually - - For example with filesystem-based mailbox formats it's not allowed to create - "box/../child" mailbox. With previous code dsync just gave up and created - the mailbox name based on its GUID. This is now improved to instead try to - insert '_' character after each hierarchy separator so the newly fixed - mailbox name is "box/_../child". - -M src/doveadm/dsync/dsync-brain-mailbox-tree.c - -2022-03-01 08:37:57 -0500 Timo Sirainen (801aae4bd5) - - dsync: Escape and unescape mailbox names as needed - - This should fix various issues with syncing local and remote mailbox names. - It especially avoids changing the escape character to alt_char. - -M src/doveadm/dsync/dsync-brain-mailbox-tree.c -M src/doveadm/dsync/dsync-mailbox-tree.c -M src/doveadm/dsync/test-dsync-mailbox-tree-sync.c - -2022-03-01 11:51:04 -0500 Timo Sirainen (cfd1b0687f) - - dsync: Track whether escape character was added just for dsync - - Will be used by the following commit - -M src/doveadm/doveadm-dsync.c -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-brain.h - -2022-03-01 08:36:55 -0500 Timo Sirainen (60ae30dd9e) - - dsync: Add clarifying comment about mailbox_log_record.maibox_guid contents - - -M src/doveadm/dsync/dsync-mailbox-tree-fill.c - -2022-03-01 08:06:14 -0500 Timo Sirainen (3864ecbfc7) - - dsync: Add escape_char to dsync-mailbox-tree - - This will be used by the following changes. - -M src/doveadm/dsync/dsync-brain-mailbox-tree.c -M src/doveadm/dsync/dsync-brain-private.h -M src/doveadm/dsync/dsync-ibc-pipe.c -M src/doveadm/dsync/dsync-ibc-private.h -M src/doveadm/dsync/dsync-ibc-stream.c -M src/doveadm/dsync/dsync-ibc.c -M src/doveadm/dsync/dsync-ibc.h -M src/doveadm/dsync/dsync-mailbox-tree-private.h -M src/doveadm/dsync/dsync-mailbox-tree.c -M src/doveadm/dsync/dsync-mailbox-tree.h -M src/doveadm/dsync/test-dsync-mailbox-tree-sync.c - -2022-03-18 09:41:37 +0200 Aki Tuomi (f95da1fa2f) - - lib-test: test-subprocess - Free subprocess before forking - - Otherwise it'll leak memory. - - Broken in 34bdfdcbc7e3b374a219732329b6ce6d84a7666e - -M src/lib-test/test-subprocess.c - -2021-10-25 12:23:56 +0100 Siavash Tavakoli (25ae16cb40) - - lib-lua: Add a minimal interface to lib-http - - Adds the ability to - - Creating http clients - - Creating http requests - - Adding arbitrary headers and payload to the http request - - Submitting the request to remote server and getting the response - -M src/lib-lua/Makefile.am -A src/lib-lua/dlua-dovecot-http.c -M src/lib-lua/dlua-dovecot.c -M src/lib-lua/dlua-script-private.h - -2022-03-14 10:18:58 +0200 Aki Tuomi (e5ae6b26e9) - - doveadm-who: Do not parse numbers as IP addresses - - Fixes doveadm kick as well. - - Broken in 381daab1e3b56a0bc94d2191cf62beba0df51af9 - -M src/doveadm/doveadm-who.c - -2022-03-01 12:06:20 +0100 Markus Valentin (6026905b7a) - - lib: test-seqset-builder - Add missing seqset_builder_deinit() - - Fixes leaking memory when running tests. - -M src/lib/test-seq-set-builder.c - -2022-03-01 13:49:39 +0100 Markus Valentin (4540884c46) - - imapc: imapc_transaction_save_rollback() - Fix NULL-check for ctx->src_mbox - - Assert that unfinished context implies that ctx->src_mbox is non-NULL. Also - check for ctx->src_mbox being non-NULL before deinitializing it. - -M src/lib-storage/index/imapc/imapc-save.c - -2022-02-28 13:15:06 +0100 Markus Valentin (e5a07bd1c4) - - imapc: imapc_mailbox_msgmap_update() - Set new_message_r - - In case a message has not yet been keep the reply till syncing and do not - discard it right away. - -M src/lib-storage/index/imapc/imapc-mailbox.c - -2022-02-24 15:31:39 +0100 Markus Valentin (f5fc15b1b1) - - imapc: Delay fetching state after untagged exists reply - - -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-storage.h -M src/lib-storage/index/imapc/imapc-sync.c - -2021-12-16 09:11:55 +0100 Markus Valentin (173cc696f8) - - imapc: imapc_copy() - Make sure capabilities are known before copying - - -M src/lib-storage/index/imapc/imapc-save.c - -2021-11-11 16:17:35 +0100 Markus Valentin (09bfbb4cb1) - - imapc: Implement rollback for failed copies - - -M src/lib-storage/index/imapc/imapc-save.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h - -2021-11-11 18:31:54 +0100 Markus Valentin (95baaaf454) - - imapc: imapc_save_copyuid() deduplicate code - - -M src/lib-storage/index/imapc/imapc-save.c - -2021-11-11 16:18:09 +0100 Markus Valentin (1e888011d0) - - imapc: Enable bulk copying if remote backend has UIDPLUS capability - - -M src/lib-storage/index/imapc/imapc-save.c - -2021-11-11 14:52:54 +0100 Markus Valentin (79b5dc6024) - - imapc: Implement bulk copying for imapc - - -M src/lib-storage/index/imapc/imapc-save.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h - -2021-11-11 16:10:53 +0100 Markus Valentin (d8ac772071) - - imapc: Extract imapc_copy_simple() from imapc_copy() - - Keep the old one by one copying functionality as simple call. This will be - used if the remote backend does not have the UIDPLUS capability. - -M src/lib-storage/index/imapc/imapc-save.c - -2022-01-12 15:09:16 +0100 Markus Valentin (dd9923ed99) - - lib-storage: index_save_context_free() - Add assertion on non-NULL - ctx->dest_mail - - -M src/lib-storage/index/index-storage.c - -2021-12-08 17:17:56 +0100 Markus Valentin (ed093cb058) - - lib: Add seq-set-builder and tests for it - - -M src/lib/Makefile.am -A src/lib/seq-set-builder.c -A src/lib/seq-set-builder.h -M src/lib/test-lib.inc -A src/lib/test-seq-set-builder.c - -2022-02-10 17:37:59 +0100 Marco Bettini (0b8d22e109) - - lib-storage: imapc_mailbox_close() - Remove unprocessed - untagged_fetch_contexts - - -M src/lib-storage/index/imapc/imapc-storage.c - -2022-02-10 16:26:10 +0100 Marco Bettini (589f8b1eba) - - lib-storage: Remove trainling spaces - - -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-sync.c - -2022-02-02 16:58:24 +0100 Markus Valentin (6b7a40bd5d) - - imapc: imapc_sync_handle_untagged_fetches() - Commit after adding the - untagged fetch messages - - The absence of the commit could have caused issues when imapc_sync_finish() - was not called as it left mbox->delayed_sync_trans initialized but - mbox->delayed_sync_view was NULL. - - Broken by 55a8c2d294bb2f764209c7ce455d258b2b7506f5 - -M src/lib-storage/index/imapc/imapc-sync.c - -2022-01-18 09:46:32 +0100 Markus Valentin (4b517a91b4) - - imapc: Start to handle new untagged fetch messages in imapc_sync() - - -M src/lib-storage/index/imapc/imapc-mailbox.c - -2022-01-18 09:22:24 +0100 Markus Valentin (6d505f1b39) - - imapc: Add imapc_sync_handle_untagged_fetches() - - -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h -M src/lib-storage/index/imapc/imapc-sync.c - -2022-01-17 15:41:25 +0100 Markus Valentin (aa26f7a231) - - imapc: imapc_untagged_fetch_handle() - Change return type to bool - - When calling imapc_untagged_fetch_handle() also retrieve new_message_r from - it which allows imapc_mailbox_msgmap_update() to determine if the message - just handled was already in index or not. - -M src/lib-storage/index/imapc/imapc-mailbox.c - -2022-01-27 08:06:16 +0100 Markus Valentin (235f491ffe) - - imapc: imapc_untagged_fetch_update_flags() - Reduce indentation - - -M src/lib-storage/index/imapc/imapc-mailbox.c - -2022-01-27 07:56:32 +0100 Markus Valentin (ea5eb228c7) - - imapc: Split off imapc_untagged_fetch_update_flags() for handling flag - updates - - -M src/lib-storage/index/imapc/imapc-mailbox.c - -2022-01-17 15:00:41 +0100 Markus Valentin (4656356f1e) - - imapc: Introduce imapc_untagged_fetch_ctx - - -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-storage.h - -2022-01-17 13:57:56 +0100 Markus Valentin (332c4ef1a4) - - imapc: Decouple imapc_untagged_fetch parsing and handling - - -M src/lib-storage/index/imapc/imapc-mailbox.c - -2022-03-09 02:30:12 +0100 Stephan Bosch (a987d6b01f) - - submission-login: Add workaround for SMTP backend that is not Dovecot. - - Adds workaround called "exotic-backend". - -M src/submission-login/client-authenticate.c -M src/submission-login/submission-login-settings.c -M src/submission-login/submission-login-settings.h -M src/submission/submission-settings.c - -2022-03-02 15:40:16 +0200 Aki Tuomi (f703acd4a2) - - auth: auth-cache - Always use translated_username as cache key - - This fixes auth cache when passdb/userdb changes the user field. - -M src/auth/auth-cache.c - -2022-03-02 14:57:20 +0200 Aki Tuomi (020f8d5cff) - - auth: Set translated_user to requested_login_user in master login - - Fixes caching issues with master logins. - -M src/auth/auth-request-fields.c - -2021-07-06 14:02:41 +0300 Aki Tuomi (2e5b63175d) - - auth: Include cache hit/miss information in passdb/userdb lookup end events - - -M src/auth/auth-request.c -M src/auth/auth-request.h -M src/auth/passdb-cache.c - -2022-02-28 17:12:32 +0100 Marco Bettini (9a355e8aa7) - - fts: Parse mail header before checking whether to index it - - Fixes an issue where mime parts Content-type wasn't properly set, causing - binary mime parts to be fed to the indexes. - - Broken in ddb85f3533842aa7c4e943c10bbd3dcb745c2eae - -M src/plugins/fts/fts-build-mail.c - -2022-02-18 18:31:43 +0200 Timo Sirainen (1133504c52) - - dsync: Log reason why mailbox is synced with debug logging - - -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-brain-mails.c -M src/doveadm/dsync/dsync-brain-private.h - -2022-02-21 23:07:11 +0100 Timo Sirainen (8bc0825d97) - - dsync: If modseqs aren't permanent, assume HIGHESTMODSEQ=0 - - Otherwise the HIGHESTMODSEQ is just whatever happens to be in the in-memory - view of the index, which most likely isn't the true HIGHESTMODSEQ. Using 0 - makes it clear that the HIGHESTMODSEQ isn't valid and can't be used. - -M src/doveadm/dsync/dsync-brain-mailbox.c -M src/doveadm/dsync/dsync-mailbox-import.c - -2022-02-12 15:07:39 +0100 Stephan Bosch (9da4834ad0) - - submission-login: submission-proxy - Do not include initial response in AUTH - command if it is too long. - - -M src/submission-login/client.h -M src/submission-login/submission-proxy.c - -2022-02-21 21:36:55 +0100 Stephan Bosch (9a16de7aad) - - submission-login: submission-proxy - Rename local variable in - proxy_send_login(). - - -M src/submission-login/submission-proxy.c - -2022-02-21 21:32:45 +0100 Stephan Bosch (7a79eba26e) - - lib-smtp: smtp-client - Move SMTP_BASE_LINE_LENGTH_LIMIT definition to - smtp-common.h. - - -M src/lib-smtp/smtp-client-private.h -M src/lib-smtp/smtp-common.h - -2022-02-21 21:29:23 +0100 Stephan Bosch (10b0d57967) - - lib-smtp: smtp-client-connection - Rename SMTP_CLIENT_BASE_LINE_LENGTH_LIMIT - to SMTP_BASE_LINE_LENGTH_LIMIT. - - -M src/lib-smtp/smtp-client-connection.c -M src/lib-smtp/smtp-client-private.h - -2022-02-23 14:21:02 +0100 Stephan Bosch (84fe9d12fc) - - lib-smtp: smtp-client-connection - Fix typo in comment. - - -M src/lib-smtp/smtp-client-connection.c - -2022-02-22 14:14:20 +0100 Timo Sirainen (d5d8b69aa7) - - director: Fix crashes caused by changing host tag - - Fixes: Panic: file director.c: line 1175 (director_move_user): assertion - failed: (user->host->tag == host->tag) Panic: file director-request.c: line - 303 (director_request_continue_real): assertion failed: (user->host->tag == - mail_tag) - -M src/director/mail-host.c - -2022-02-22 14:10:02 +0100 Timo Sirainen (44b7eda458) - - director: Prevent loops where directors keep changing host tags - - -M src/director/director-connection.c - -2022-02-21 12:47:29 +0100 Timo Sirainen (7a64ec1ef8) - - lib: If log prefix update can't be sent to log, exit with FATAL_LOGERROR - - -M src/lib/failures.c - -2022-02-21 12:39:02 +0100 Timo Sirainen (1bf3963714) - - lib: Fix losing log prefix or IP change when log process is busy - - The fd for writing to log process is non-blocking. When sending options to - log process, it was done with write_full(), which stopped whenever EAGAIN - was returned. This error was simply ignored, and the logging code thought - that the prefix was successfully changed (or the IP was sent). - - This mainly caused a problem when processes were reused and log process was - busy. The prefix update could have failed, and the following logging would - be using the previous session's log prefix, i.e. log lines could have been - logged for the wrong user/session. - - Broken by 9372e48b702a3af5705785e08fbf47b0e37f2047 - -M src/lib/failures.c - -2022-02-06 14:20:08 +0100 Timo Sirainen (3e8befe6b5) - - dict: Fix potential timeout leak at deinit - - The deinit code could still trigger proctitle refresh. - -M src/dict/main.c - -2022-02-22 11:23:33 +0100 Timo Sirainen (17118d5970) - - dict: Make sure proctitle refresh timeout goes to the main ioloop - - In some situations it could have gone to dict_wait() ioloop, causing timeout - leaks or crashes. - -M src/dict/main.c - -2021-10-25 15:43:00 +0300 Timo Sirainen (974e970889) - - lib-storage: Don't use cached message_parts while message is being parsed - - Finish the parsing instead. Otherwise there can be some confusion about - parsed_bodystructure* fields, which indicate that data->parts have the - bodystructure info while in reality data->parts came from cached fields and - they have no bodystructure info. - -M src/lib-storage/index/index-mail.c - -2021-10-25 12:22:06 +0300 Timo Sirainen (6b6d61e9d1) - - lib-storage: Reset bodystructure parsing state when reseting message_parts - - Fixes: Panic: file message-part-data.c: line 28 - (message_part_data_is_plain_7bit): assertion failed: (data != NULL) - -M src/lib-storage/index/index-mail-headers.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h -M src/lib-storage/test-mail.c - -2022-02-09 23:12:19 +0200 Timo Sirainen (d31af56e9a) - - dict-sql: Fix assert-crash if trying to rollback an open set/inc transaction - - Fixes: Panic: file dict-sql.c: line 911 (sql_dict_transaction_free): - assertion failed: (!array_is_created(&ctx->prev_set)) - -M src/lib-dict-backend/dict-sql.c - -2022-02-04 04:30:48 +0200 Martti Rannanjärvi (b743c13533) - - anvil: connect_limit_deinit() - Free ident_pid_hash elements - - -M src/anvil/connect-limit.c - -2022-02-11 09:17:58 +0100 Marco Bettini (feebfa572a) - - indexer: indexer_client_status_callback() - Fix accessing freed memory - - Broken by a9683d7b3 - -M src/indexer/indexer-client.c - -2022-02-07 16:04:41 +0100 Marco Bettini (e65b925b86) - - indexer: Fix memory leak on indexer timeout - - -M src/indexer/indexer-client.c - -2022-02-04 01:28:45 +0200 Martti Rannanjärvi (ff258ecea5) - - stats: stats_metrics_remove_dynamic() - Free the removed metric - - -M src/stats/stats-metrics.c - -2022-02-04 01:32:18 +0200 Martti Rannanjärvi (8437a9224f) - - stats: stats_metric_alloc() - Fix indentation on p_new() call - - -M src/stats/stats-metrics.c - -2022-01-31 12:42:46 +0200 Martti Rannanjärvi (c5ef0ce4b7) - - replication: aggregator - Free replicator_connection content - - -M src/replication/aggregator/replicator-connection.c - -2022-02-01 14:22:31 +0100 Marco Bettini (12a751615b) - - mail-crypt: Fix for mail being wrongly storing encrypted via LMTP - - If 1st recipient has mail_crypt_save_version=2, and 2nd recipient has - mail_crypt_save_version=0, the mail for 2nd recipient is wrongly stored - encrypted. - - Same happens if 2nd recipient has mail_crypt disabled - -M src/plugins/mail-crypt/mail-crypt-plugin.c - -2020-03-31 13:51:09 +0300 Timo Sirainen (a707e6907c) - - mail-crypt: Remove "plugin disabled" texts from errors - - The plugin isn't just disabled, the user initialization fails entirely. - -M src/plugins/mail-crypt/mail-crypt-plugin.c - -2020-03-31 13:49:28 +0300 Timo Sirainen (4514e72dd7) - - mail-crypt: Fix crash when plugin is already initialized, but not used for - another user - - Fixes: Panic: Module context mail_crypt_user_module missing - -M src/plugins/mail-crypt/mail-crypt-plugin.c - -2021-04-29 21:09:01 +0300 Timo Sirainen (41e439f993) - - doveadm deduplicate: Simplify code by using doveadm_mail_iter_deinit_sync() - - -M src/doveadm/doveadm-mail-deduplicate.c - -2021-04-29 21:05:40 +0300 Timo Sirainen (d60ca6eaac) - - doveadm deduplicate: Optimize by deduplicating in a single transaction - - -M src/doveadm/doveadm-mail-deduplicate.c - -2022-02-14 13:50:02 +0200 Aki Tuomi (70a924bd84) - - pop3: Fix empty command handling - - If empty command is given, error out instead of trying to create event. This - fixes a crash caused by d2ab26be6038bd53b13a3ff18c403d6c192c1d91. - -M src/pop3/pop3-client.c - -2022-02-02 17:01:49 +0200 sergey.kitov (6b66c7694e) - - lib-master: Fix deinit memory leak with process_shutdown_filter - - -M src/lib-master/master-service.c - -2021-12-17 09:27:07 +0100 Marco Bettini (3b05ece496) - - plugins/fts: Allow plugins to carry state across calls during search session - - -M src/plugins/fts/fts-api.h -M src/plugins/fts/fts-search.c -M src/plugins/fts/fts-storage.h - -2022-01-26 16:09:29 +0200 Timo Sirainen (d6f90fc69e) - - auth: ldap: Drop partially saved results before retrying request - - Fixes "LDAP search returned multiple entries" happening after reconnects. - -M src/auth/db-ldap.c - -2022-01-26 16:03:27 +0200 Timo Sirainen (c870c58f3f) - - auth: ldap: If any requests were lost, reconnect to LDAP server - - -M src/auth/db-ldap.c - -2022-01-26 16:00:45 +0200 Timo Sirainen (30325b92b7) - - auth: ldap: If LDAP connection appears to be hanging, abort all old requests - - Retrying the reconnect might fix them, but since this situation isn't - supposed to happen in the first place, it's safer to just remove them - entirely to guarantee that it's not trying to keep retrying them for a long - time. - -M src/auth/db-ldap.c - -2022-01-26 14:46:55 +0200 Timo Sirainen (6360d26c8a) - - auth: ldap: Reconnect to server if receiving unknown msgid - - It's unclear why this happens. Is it a bug on server or client side? Either - way, this situation doesn't now fix itself automatically, so reconnecting - should help. - -M src/auth/db-ldap.c - -2022-01-26 14:43:01 +0200 Timo Sirainen (88d55b93ba) - - auth: ldap: Stop re-sending request after 3 disconnect+reconnects - - This prevents retrying the same LDAP request forever in situations where the - request causes LDAP server to become disconnected. This might fix some real - issues, but it was mainly implemented because testing the following commit - caused infinite looping. - -M src/auth/db-ldap.c -M src/auth/db-ldap.h - -2022-02-01 14:57:16 +0100 Timo Sirainen (342c872791) - - lmtp: proxy - Add per-connection counter to session_id - - This way connections to two different backends don't try to use the same - session_id. Add 'P' letter before the counter to clarify that it's the proxy - connection counter. - -M src/lmtp/lmtp-proxy.c - -2022-02-01 14:40:48 +0100 Timo Sirainen (84ebee8902) - - lmtp: Simplify/clarify per-recipient session ID - - The session ID is the transaction ID followed by an increasing recipient - count (number of RCPT commands) in the SMTP transaction. Clarify this by - adding 'R' letter before the counter. Also don't add the counter suffix at - all for the first recipient, since most transactions only have a single - recipient. - -M src/lmtp/lmtp-recipient.c - -2022-02-01 14:35:05 +0100 Timo Sirainen (edf91ac779) - - lib-smtp: server-transaction - Simplify/clarify transaction ID - - The transaction ID is the session ID followed by an increasing transaction - count (number of MAIL commands) in the SMTP server connection. Clarify this - by adding 'T' letter before the counter. Also don't add the counter suffix - at all for the first session, since most sessions only have a single - transaction. - -M src/lib-smtp/smtp-server-transaction.c - -2022-02-01 14:29:43 +0100 Timo Sirainen (f26b7d3c13) - - lib-smtp, lmtp: Add brackets to in logging - - This makes it clearer where the session-id stops. It's also similar to how - it is in mail_log_prefix. - -M src/lib-smtp/smtp-server-transaction.c -M src/lmtp/lmtp-proxy.c - -2022-02-01 15:03:15 +0100 Timo Sirainen (7a168bb5b5) - - lmtp: proxy - Use recipient-specific session-id when logging the result - - Instead of transaction ID, which is shared between recipients. - -M src/lmtp/lmtp-proxy.c - -2022-02-01 16:00:36 +0100 Timo Sirainen (d107539524) - - lmtp: struct lmtp_recipient - Change all strings to const - - -M src/lmtp/lmtp-recipient.h - -2022-01-27 21:40:25 +0100 Markus Valentin (9e151e0fd9) - - lib-storage: LAYOUT=index: Fix accessing freed memory when deleting - \Noselect parents - - Broken by f5328d6f7e4a8e460c736fa0336f5766aa58abda - -M src/lib-storage/list/mailbox-list-index-backend.c - -2022-01-28 10:54:53 +0100 Markus Valentin (dc5e01c2b2) - - lib-http: http_server_resource_create() - Remove unnecessary pool allocation - - Fixes leaking the memory pool created in stats_http_resource_add() - -M src/lib-http/http-server-resource.c - -2022-01-26 04:00:32 +0100 Stephan Bosch (4a4a4cf02b) - - lib-smtp: test-smtp-client-errors - Add test for succesful authentication - with large initial response. - - -M src/lib-smtp/test-smtp-client-errors.c - -2022-01-26 03:58:49 +0100 Stephan Bosch (3de3cd5987) - - lib-smtp: smtp-client-connection - Fix authentication with multi-roundtrip - SASL mechanisms. - - Before, it would fail with an unexpected reply error. - -M src/lib-smtp/smtp-client-connection.c -M src/lib-smtp/smtp-client-private.h - -2022-01-24 01:39:19 +0100 Stephan Bosch (1a09d82bee) - - lib-smtp: test-smtp-client-errors - Add test for successful authentication. - - -M src/lib-smtp/test-smtp-client-errors.c - -2022-01-24 01:41:15 +0100 Stephan Bosch (20d406b91c) - - lib-smtp: test-smtp-client-errors - Rename "authentication failed" test to - "authentication". - - -M src/lib-smtp/test-smtp-client-errors.c - -2022-01-28 03:14:16 +0100 Stephan Bosch (5ad9c03dc4) - - lib-smtp: smtp-client - Fix maximum line length to include CRLF. - - -M src/lib-smtp/smtp-client-private.h - -2022-01-21 01:08:31 +0100 Stephan Bosch (c8671f74ee) - - lib-smtp: smtp-client-connection - Do not include initial response in AUTH - command if it is too long. - - -M src/lib-smtp/smtp-client-connection.c -M src/lib-smtp/smtp-client-private.h - -2022-01-21 02:26:18 +0100 Stephan Bosch (02e43414e0) - - lib-smtp: smtp-client-connection - Move auth cleanup to separate function. - - -M src/lib-smtp/smtp-client-connection.c - -2022-01-28 03:17:59 +0100 Stephan Bosch (76810027a5) - - lib-sasl: dsasl-client - Make dsasl_client_free(&NULL) a no-op. - - -M src/lib-sasl/dsasl-client.c -M src/lib-smtp/smtp-client-connection.c -M src/login-common/client-common-auth.c -M src/login-common/client-common.c - -2022-01-21 02:28:23 +0100 Stephan Bosch (94c8febccc) - - lib-smtp: smtp-client-connection - Reformat comment. - - -M src/lib-smtp/smtp-client-connection.c - -2022-01-26 19:28:33 +0100 Timo Sirainen (3e0a147292) - - indexer: Fix memory leak - worker_requests were never freed - - Broken by 141766b24f885259508ae39f2e18811018373bc7 - -M src/indexer/indexer.c -M src/indexer/worker-connection.c -M src/indexer/worker-connection.h - -2022-01-25 23:31:34 +0100 Timo Sirainen (8e0763ac32) - - indexer: Fix memory leak - session IDs were never freed - - Broken by a8dcd4e2332c73087e9b148d34259230a77edb28 - -M src/indexer/indexer-queue.c - -2021-12-01 12:21:48 +0200 Timo Sirainen (7b96f6cbf5) - - lib-storage: Fix search query that only contains SEARCH_MAILBOX_GUID - - Fixes assert-crash in virtual mailbox: - - Panic: file virtual-search.c: line 77 (virtual_search_get_records): - assertion failed: (result != 0) - -M src/lib-storage/index/index-search-private.h -M src/lib-storage/index/index-search.c - -2021-12-16 11:49:24 +0200 sergey.kitov (a97162ccc6) - - lib-master: Add process_shutdown_filter setting - - -M src/lib-master/master-service-private.h -M src/lib-master/master-service-settings.c -M src/lib-master/master-service-settings.h -M src/lib-master/master-service.c -M src/lib-master/master-service.h - -2021-12-16 11:44:38 +0200 sergey.kitov (14f8d9c734) - - lib-master: Refactor parsing event filters from settings. - - -M src/lib-master/master-service-settings.c - -2021-12-16 11:38:53 +0200 sergey.kitov (623a7b2be8) - - lib-master: Remove check for client->filter == NULL before - event_filter_match(). - - -M src/lib-master/stats-client.c - -2021-12-16 11:38:08 +0200 sergey.kitov (8e99dae094) - - lib: Add check for NULL to event_filter_match(). - - -M src/lib/event-filter.c - -2021-12-15 15:19:04 +0200 sergey.kitov (181f1456d6) - - lib-master: Whitespace cleanup. - - -M src/lib-master/master-service-private.h -M src/lib-master/master-service.c -M src/lib-master/master-service.h - -2021-12-01 13:35:12 +0200 sergey.kitov (1425e94b93) - - lib-storage: Emit event with process stat in mail_user_deinit(). - - -M src/lib-storage/mail-user.c -M src/lib-storage/mail-user.h - -2021-12-07 16:58:43 +0200 sergey.kitov (d8c4013cdc) - - lib: Add event_add_int_non_zero() - - -M src/lib/lib-event.c -M src/lib/lib-event.h - -2021-12-01 13:34:22 +0200 sergey.kitov (0ba13e8e70) - - lib: Add functionality for acquiring process stat. - - -M src/lib/Makefile.am -A src/lib/process-stat.c -A src/lib/process-stat.h - -2021-12-21 10:47:54 +0200 sergey.kitov (3a25648a1d) - - lib: add timeval_to_usecs() - - -M src/lib/time-util.h - -2021-12-20 16:17:54 +0200 sergey.kitov (578c5f4b8c) - - lib: Whitespace cleanup - - -M src/lib/lib-event.c - -2022-01-14 08:07:50 +0100 Markus Valentin (1e0870724b) - - lib-storage: mailbox-list: index_list_rename_mailbox() - Support NO-NOSELECT - - When NO-NOSELECT is configured delete parent mailboxes which are not - selectable or existant when renaming child mailboxes. - -M src/lib-storage/list/mailbox-list-index-backend.c - -2022-01-14 08:04:09 +0100 Markus Valentin (964fe86c5c) - - lib-storage: mailbox-list: index_list_delete_mailbox() - Support NO-NOSELECT - - When NO-NOSELECT is configured delete parent mailboxes which are not - selectable or not existant when deleting child mailboxes. - -M src/lib-storage/list/mailbox-list-index-backend.c - -2022-01-21 16:31:04 +0200 Timo Sirainen (77239a25c5) - - doveadm fetch/search: Use DOVEADM_MAIL_ITER_FLAG_STOP_WITH_CLIENT - - These commands only write output to the client, so it's safe to stop them if - the client disconnects. - -M src/doveadm/doveadm-mail-fetch.c -M src/doveadm/doveadm-mail-search.c - -2022-01-21 16:29:48 +0200 Timo Sirainen (4eb82acbc3) - - doveadm: doveadm_mail_iter_init() - Add - DOVEADM_MAIL_ITER_FLAG_STOP_WITH_CLIENT - - When this flag is used, the iteration is stopped if print ostream has - reported an error, i.e. doveadm-client has disconnected. - -M src/doveadm/doveadm-mail-iter.c -M src/doveadm/doveadm-mail-iter.h - -2022-01-21 16:24:39 +0200 Timo Sirainen (2b2cdb719b) - - doveadm: doveadm_mail_iter_init() - Change bool parameter to flags - - -M src/doveadm/doveadm-mail-altmove.c -M src/doveadm/doveadm-mail-copymove.c -M src/doveadm/doveadm-mail-deduplicate.c -M src/doveadm/doveadm-mail-expunge.c -M src/doveadm/doveadm-mail-fetch.c -M src/doveadm/doveadm-mail-flags.c -M src/doveadm/doveadm-mail-import.c -M src/doveadm/doveadm-mail-iter.c -M src/doveadm/doveadm-mail-iter.h -M src/doveadm/doveadm-mail-mailbox-cache.c -M src/doveadm/doveadm-mail-rebuild.c -M src/doveadm/doveadm-mail-search.c - -2022-01-20 14:16:51 +0100 Timo Sirainen (aacaf65d7f) - - doveadm-server: Fix hang when flushing print output and client disconnects - - -M src/doveadm/doveadm-print-server.c - -2022-01-20 14:13:48 +0100 Timo Sirainen (8f34eb952d) - - lib: ostream-multiplex - Call flush callbacks also when stream has failed - - It may be important for the flush callbacks to know when ostream has been - closed. This is a partial fix to prevent doveadm-server hanging when it's - printing lots of output and doveadm client disconnects. - -M src/lib/ostream-multiplex.c - -2022-01-20 13:34:50 +0100 Timo Sirainen (d902430e43) - - doveadm: Fix assert-crash when proxying causes print buffer to be flushed - - Fixes: Panic: file ioloop.c: line 865 (io_loop_destroy): assertion failed: - (ioloop == current_ioloop) - -M src/doveadm/doveadm-print-server.c - -2021-12-22 12:12:51 +0100 Markus Valentin (d02a022d73) - - imapc: Fix doveadm copy with imapc - - When copying to a mailbox with imapc it does not sync the destination - mailbox when opening. This created "Error: Syncing mailbox '$mailboxname' - failed: Internal error occurred." Prevent this error by checking for the - MAILBOX_FLAG_SAVEONLY flag which is used by doveadm to create the - destination mailbox. If that flag is set ignore that there was no initial - fetching done. - -M src/lib-storage/index/imapc/imapc-mail-fetch.c -M src/lib-storage/index/imapc/imapc-sync.c - -2022-01-21 12:12:52 +0200 Martti Rannanjärvi (2088e0917e) - - configure.ac: Set dovecot version to 2.3.100.devel - - This helps with version comparisons. - -M configure.ac - -2022-01-14 04:02:09 +0100 Stephan Bosch (bcdc6ef0ec) - - submission: submission-backend-relay - Make sure QUIT command yields 221 - when relay connection is closed normally. - - Before, it would sometimes erroneously treat the closing connection as a - "connection lost" 421 situation. - -M src/submission/submission-backend-relay.c - -2022-01-14 04:01:29 +0100 Stephan Bosch (9f05ce1758) - - submission: submission-backend-relay - Fix segfault in QUIT command - client-side destruction. - - -M src/submission/submission-backend-relay.c - -2020-11-09 02:29:04 +0100 Stephan Bosch (a53380c353) - - lib-smtp: smtp-server-cmd-rset - Stop processing pipeline until RSET is - complete. - - A subsequent MAIL command could get reset in the middle otherwise. Before, - it only blocked input until a reply was submitted, but the transaction isn't - reset until the RSET command is complete (just before actually sending the - reply) which can cause issues when the subsequent MAIL command is already - being processed. - -M src/lib-smtp/smtp-server-cmd-rset.c - -2020-11-09 00:02:51 +0100 Stephan Bosch (5a7616f93b) - - lib-smtp: smtp-server-cmd-helo - Stop processing pipeline until HELO/EHLO is - complete. - - A subsequent MAIL command could get reset in the middle otherwise. Before, - it only blocked input until a reply was submitted, but the transaction isn't - reset until the EHLO/HELO command is complete (just before actually sending - the reply) which can cause issues when the subsequent MAIL command is - already being processed. - -M src/lib-smtp/smtp-server-cmd-helo.c - -2020-11-08 03:58:06 +0100 Stephan Bosch (5aeca06ad6) - - lib-smtp: smtp-server-command - Add - smtp_server_command_pipeline_block/unblock(). - - -M src/lib-smtp/smtp-server-command.c -M src/lib-smtp/smtp-server-connection.c -M src/lib-smtp/smtp-server-private.h -M src/lib-smtp/smtp-server.h - -2022-01-10 03:54:13 +0100 Stephan Bosch (d79841aa34) - - lib-smtp: smtp-client-transaction - Plug the command pipeline while - transaction is pending. - - This prevents commands submitted after creating the transaction from being - exectuted out-of-order before the transaction's MAIL command. - -M src/lib-smtp/smtp-client-transaction.c - -2022-01-10 03:53:41 +0100 Stephan Bosch (ffbf4efea2) - - lib-smtp: smtp-client-transaction - Add - smtp_client_command_mail_submit_after(). - - -M src/lib-smtp/smtp-client-command.c -M src/lib-smtp/smtp-client-command.h - -2022-01-10 01:18:56 +0100 Stephan Bosch (2ccec52a52) - - lib-smtp: smtp-client-transaction - Prevent recursion for - smtp_client_transaction_fail*(). - - -M src/lib-smtp/smtp-client-transaction.c - -2022-01-11 02:05:26 +0100 Stephan Bosch (c40e19df16) - - lib-smtp: Reformat smtp-server-cmd-quit.c. - - -M src/lib-smtp/smtp-server-cmd-quit.c - -2022-01-20 12:42:57 +0200 Timo Sirainen (6f703021eb) - - lib-storage: Don't delay setting mail event's log prefix - - This caused crashes if the mail event was kept referenced and used for - logging after struct mail was already freed. With the delayed mail event - creation the log prefix shouldn't be much of a performance problem, so just - set the prefix immediately. - - Partially reverts bc68e1c368db746557829f67556f3c72943b7956. - -M src/lib-storage/mail.c - -2022-01-19 15:07:58 +0100 Timo Sirainen (6b6465700f) - - configure: Update version to 2.3.devel - - -M configure.ac - -2021-11-30 12:47:52 +0200 Aki Tuomi (51bb266887) - - NEWS: Add news for 2.3.17.1 - - -M NEWS - -2021-09-28 12:40:29 +0300 Aki Tuomi (3330f8f631) - - NEWS: Add news for 2.3.17 - - -M NEWS - -2022-01-10 19:46:12 +0200 Timo Sirainen (26c5c2aa2b) - - lib-storage: Remove reason_code=mailbox:search - - Continues the slow per-mail event removals started in - f3c568e3cbc113920bc029e07e56619589c6a26d. - - Reverts 87cd6570a14b3f572fc6000f710df409371a4bcb - -M src/lib-storage/index/index-search.c - -2021-12-13 12:54:19 +0100 Stephan Bosch (c043787771) - - lmtp: lmtp-proxy - Add session ID to backend connection error replies. - - -M src/lmtp/lmtp-proxy.c - -2021-12-13 04:08:32 +0100 Stephan Bosch (b29d0df2ef) - - submssion: submission-backend-relay - Avoid logging two errors about a - connection problem. - - Earlier commit changed lib-smtp to consistently log an error for connection - problems, which causes a second error to occur for submission relay backend. - This is undesirable. - -M src/submission/submission-backend-relay.c - -2021-12-07 01:51:45 +0100 Stephan Bosch (08d650cb81) - - lmtp: lmtp-proxy - Add lmtp_verbose_replies setting. - - It causes the proxy to return errors with full details in replies to the - LMTP client. - -M src/lmtp/lmtp-proxy.c -M src/lmtp/lmtp-settings.c -M src/lmtp/lmtp-settings.h - -2021-12-27 11:35:05 +0100 Stephan Bosch (a0cd85f004) - - lmtp: lmtp-proxy - Split off lmtp_proxy_handle_connection_error(). - - -M src/lmtp/lmtp-proxy.c - -2022-01-04 21:20:22 +0100 Stephan Bosch (1d88bdfdf8) - - lmtp: lmtp-proxy - Change proxy connection failure message make more sense. - - -M src/lmtp/lmtp-proxy.c - -2021-12-07 01:58:32 +0100 Stephan Bosch (11b6ccdfce) - - lib-smtp: smtp-client - Add verbose_user_errors setting. - - It returns the detailed administrator errors as user error in the reply - returned to the calling application. - -M src/lib-smtp/smtp-client-connection.c -M src/lib-smtp/smtp-client.c -M src/lib-smtp/smtp-client.h - -2021-12-07 01:51:18 +0100 Stephan Bosch (40d49a038b) - - lib-smtp: smtp-client-connection - Log administrator connection failures at - a single place. - - -M src/lib-smtp/smtp-client-command.c -M src/lib-smtp/smtp-client-connection.c -M src/lib-smtp/smtp-client-private.h - -2021-12-23 00:59:45 +0100 Stephan Bosch (f436df8709) - - lib-smtp: smtp-client-connection - Consistently log an error for connection - failures. - - -M src/lib-smtp/smtp-client-connection.c -M src/lib-smtp/test-smtp-client-errors.c - -2021-12-07 02:44:58 +0100 Stephan Bosch (5ef51c52ef) - - lib-smtp: smtp-client-connection - Add definition for repeatedly used - connection error. - - -M src/lib-smtp/smtp-client-connection.c - -2021-12-27 11:24:36 +0100 Stephan Bosch (06f838091b) - - lmtp: Reformat lmtp-proxy.c. - - -M src/lmtp/lmtp-proxy.c - -2021-12-07 01:23:13 +0100 Stephan Bosch (2e82fdb706) - - lib-smtp: Reformat smtp-client-connection.c. - - -M src/lib-smtp/smtp-client-connection.c - -2022-01-05 01:27:48 +0000 Stephan Bosch (3575639fc4) - - lib-compression: ostream-zlib - Fix signed vs unsigned comparison. - - -M src/lib-compression/ostream-zlib.c - -2022-01-05 01:25:34 +0000 Stephan Bosch (5108d7bddd) - - lib: test-event-flatten - Fix format string specifier for usec time - - -M src/lib/test-event-flatten.c - -2021-12-28 09:37:42 +0200 Timo Sirainen (f3c568e3cb) - - lib-storage: Remove most reason_code=mail:* - - Event reasons create events internally. This is rather expensive if it's - done for operations that access all emails in a large folder, e.g. SORT. The - per-mail reason_codes also didn't seem to be hugely helpful, so best to just - remove them. - - Some of the mail:* reasons were left where they are causing mail stream to - be opened anyway. In these cases the extra CPU used by event reasons is - relatively little. - - Reverts ce517f8323fa4a60b230f29712b207139badb3f0 - -M src/lib-storage/index/index-mail.c -M src/lib-storage/mail.c - -2021-12-20 11:05:39 +0200 Timo Sirainen (ac4d66e25e) - - maildir: maildir_filename_base_hash() - Disable ubsan integer wrapping - checks - - -M src/lib-storage/index/maildir/maildir-filename.c - -2021-12-09 18:06:11 +0100 Timo Sirainen (ac7bcc31c9) - - lib-fts: Reuse textcat handle between sessions - - textcat initialization is rather CPU intensive. Its configuration is - normally always the same between sessions, so we can keep the latest textcat - handle cached. - -M src/lib-fts/fts-language.c - -2021-11-29 17:05:18 +0100 Timo Sirainen (fd7248b707) - - lib-storage: Remove index_mail_data.seq - - The seq already exists in struct mail, so this unnecessarily duplicated it. - -M src/lib-storage/index/index-mail-headers.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h - -2021-11-29 16:21:29 +0100 Timo Sirainen (767b689cfb) - - lib-storage: Minor optimization - Use mail_index_lookup_full() to avoid two - index lookups - - mail_index_is_expunged() was already internally doing the full lookup. - -M src/lib-storage/index/index-mail.c - -2021-11-29 16:16:30 +0100 Timo Sirainen (526a0f5b18) - - lib-index: mail_index_lookup_full() - Add expunged_r parameter - - -M src/lib-index/mail-index-modseq.c -M src/lib-index/mail-index-view.c -M src/lib-index/mail-index.h - -2021-11-29 13:26:25 +0100 Timo Sirainen (bc68e1c368) - - lib-storage: Optimize setting mail event log prefix - - This was much more important before mail event creation was delayed. In one - installation the t_strdup_printf() call itself took about 4% of the total - CPU usage. Now that mail events are delayed, this is likely much less of an - issue. Still, this is easy enough of an optimization that might as well do - it. - -M src/lib-storage/mail.c - -2021-11-29 15:46:04 +0100 Timo Sirainen (165be3edb6) - - lib-storage: Delay creating mail event until mail_event() is called - - Mails can be accessed a lot. The event handling code takes up a lot of CPU, - but most of the time the created event wasn't actually used for anything. - -M src/lib-storage/index/index-mail.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.h -M src/lib-storage/mail.c - -2021-11-29 15:43:29 +0100 Timo Sirainen (a24e4a14f9) - - lib-storage: Make sure mail event is created before accessing streams or - metadata - - This is in preparation for the next commit which delays the mail event - creation. The event duration behaves better if the event is created before - any potentially slow access is done. - -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail.c - -2021-11-29 15:36:58 +0100 Timo Sirainen (58eef6713e) - - lib-storage: Move struct mail.event to mail_private - - -M src/lib-storage/index/index-mail.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.h -M src/lib-storage/mail.c - -2021-11-29 15:32:28 +0100 Timo Sirainen (b0596718ab) - - lib-lda, lib-storage: Use mail_event() - - -M src/lib-lda/mail-send.c -M src/lib-storage/mail.c - -2021-11-29 15:31:17 +0100 Timo Sirainen (4b3775baf0) - - lib-storage: Add mail_event() - - -M src/lib-storage/mail-storage.h -M src/lib-storage/mail.c - -2021-11-29 18:39:22 +0100 Timo Sirainen (13fd3c3256) - - lib-storage: Add and use mail_metadata_access_start() - - -M src/lib-storage/index/maildir/maildir-mail.c -M src/lib-storage/index/raw/raw-mail.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail.c - -2021-11-29 18:32:09 +0100 Timo Sirainen (988a575c35) - - lib-storage: Add and use mail_stream_access_start() - - This replaces setting mail_stream_accessed directly. - -M src/lib-storage/index/dbox-multi/mdbox-mail.c -M src/lib-storage/index/dbox-single/sdbox-mail.c -M src/lib-storage/index/imapc/imapc-mail-fetch.c -M src/lib-storage/index/imapc/imapc-save.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/maildir/maildir-mail.c -M src/lib-storage/index/mbox/mbox-mail.c -M src/lib-storage/index/pop3c/pop3c-mail.c -M src/lib-storage/index/raw/raw-mail.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail.c - -2021-11-29 18:35:31 +0100 Timo Sirainen (e06ee029f6) - - lib-storage: raw: get_stream() - Add missing lookup_abort and - mail_stream_accessed handling - - -M src/lib-storage/index/raw/raw-mail.c - -2021-11-29 18:34:43 +0100 Timo Sirainen (2f2e3b3d37) - - pop3c: Add missing lookup_abort and mail_stream_accessed handling - - -M src/lib-storage/index/pop3c/pop3c-mail.c - -2021-11-29 20:44:05 +0100 Timo Sirainen (5b97f3af04) - - maildir: get_stream() - Add missing lookup_abort and mail_stream_accessed - handling - - -M src/lib-storage/index/maildir/maildir-mail.c - -2021-11-29 18:24:30 +0100 Timo Sirainen (d7b8c40971) - - lib-storage: Rename mail.mail_stream_opened to mail_stream_accessed - - It is set to TRUE even if the mail stream couldn't successfully be opened, - so this describes it better. Also it's now consistent with - mail_metadata_accessed. - -M src/lib-storage/index/dbox-multi/mdbox-mail.c -M src/lib-storage/index/dbox-single/sdbox-mail.c -M src/lib-storage/index/imapc/imapc-mail-fetch.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mailbox-size.c -M src/lib-storage/index/index-sort.c -M src/lib-storage/index/mbox/mbox-mail.c -M src/lib-storage/mail-storage.h - -2021-12-03 10:44:10 +0200 Timo Sirainen (74b94e02e5) - - lib-index: Remove mail_cache_lookup_finished event - - This event was using too much CPU with commands that accessed lots of mails - (e.g. IMAP SORT). It also wasn't especially useful. - - Reverts 0d252dccb3013fea4d9a28bd5fafb5ea6e847d0e - -M src/lib-index/mail-cache-lookup.c - -2021-12-02 11:35:20 +0200 Timo Sirainen (1fb3dda9ac) - - lib-index: Use ATTR_COLD for error/corruption handling functions - - This could reduce CPU usage due to better branch prediction. - -M src/lib-index/mail-cache-private.h -M src/lib-index/mail-cache.h -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-strmap.h -M src/lib-index/mail-index-sync-private.h -M src/lib-index/mail-index.h -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log.h - -2021-11-23 15:00:02 +0100 Timo Sirainen (4a74574d39) - - lib: pool_alloconly_destroy() optimization - Don't clear the last block - before free - - The block is going to be freed, so there's no need to clear it. - (The clearing still happens if clean_frees=TRUE.) - -M src/lib/mempool-alloconly.c - -2021-11-23 14:59:28 +0100 Timo Sirainen (40666e3bca) - - lib: pool_alloconly_destroy() - Deduplicate code - - -M src/lib/mempool-alloconly.c - -2021-11-23 14:58:39 +0100 Timo Sirainen (7c9ee911cf) - - lib: Split off pool_alloconly_free_block() - - -M src/lib/mempool-alloconly.c - -2021-11-23 14:56:10 +0100 Timo Sirainen (333bd2e628) - - lib: Split off pool_alloconly_free_blocks_until_last() - - -M src/lib/mempool-alloconly.c - -2021-11-23 15:17:49 +0200 Timo Sirainen (0bcc6897de) - - lib: Minor optimization - Avoid zeroing a newly created empty event field - - -M src/lib/lib-event.c - -2021-11-22 17:36:21 +0100 Timo Sirainen (9fc6965de1) - - lib: Remove copy of event_passthrough from struct event - - There was no need for it. This saves some memory and CPU. - - This change now prevents modifications to the event_passthrough, but nothing - was doing it before either. - -M src/lib/lib-event-private.h -M src/lib/lib-event.c - -2021-11-22 17:23:28 +0100 Timo Sirainen (a2ea3df64f) - - lib: Grow initial event pool size to 1024 bytes - - The old 64 bytes size wasn't enough to allocate even the struct event - itself. - -M src/lib/lib-event.c - -2021-12-15 09:19:40 +0100 Karl Fleischmann (793cae8549) - - login-common: Explicitly null client auth fields on proxy pool unref - - Explicitly setting `client_id` and `forward_fields` to null in the client - may reveal use-after-free issues when trying to access these fields on a - client proxy. - -M src/login-common/client-common.c - -2021-12-10 11:04:06 +0100 Karl Fleischmann (7ad1a92aa5) - - login-common: Use base index for aliases - - Define a base index for aliases in the login variable table. Assign values - via offset of that base index. This allows adding more values later without - updating any subsequent index. - -M src/login-common/client-common.c - -2021-12-10 11:32:37 +0100 Marco Bettini (ddb85f3533) - - fts: Add headers filters - - -M src/plugins/fts/fts-api-private.h -M src/plugins/fts/fts-api.c -M src/plugins/fts/fts-build-mail.c - -2021-12-10 11:30:08 +0100 Marco Bettini (24b66ca063) - - fts: fts-build-mail - Remove stray line - - -M src/plugins/fts/fts-build-mail.c - -2020-11-10 00:11:15 +0100 Stephan Bosch (a92209788d) - - auth: mech-scram - Amend comments. - - -M src/auth/mech-scram.c - -2020-11-10 00:11:11 +0100 Stephan Bosch (49b5780c29) - - auth: mech-scram - Fix handling of authzid. - - The gs2-header field was not recreated correctly for the final verification. - Fixed by storing the complete gs2-header value instead. - -M src/auth/mech-scram.c - -2020-11-10 00:11:07 +0100 Stephan Bosch (a164ea3786) - - auth: mech-scram - Properly size temporary string buffers. - - -M src/auth/mech-scram.c - -2020-11-10 00:11:03 +0100 Stephan Bosch (1ee7d0d807) - - auth: mech-scram - Restructure message parsing in - parse_scram_client_first(). - - -M src/auth/mech-scram.c - -2020-11-10 00:10:57 +0100 Stephan Bosch (6678648cfb) - - auth: Reformat mech-scram.c. - - -M src/auth/mech-scram.c - -2021-08-20 17:43:09 +0300 Timo Sirainen (15f25bf7ad) - - lib-storage: Return reason string in mailbox_vfuncs.list_index_has_changed() - - The callers can use it to log why the list index had changed. - -M src/lib-storage/index/index-storage.h -M src/lib-storage/index/index-sync.c -M src/lib-storage/index/maildir/maildir-sync-index.c -M src/lib-storage/index/maildir/maildir-sync.h -M src/lib-storage/index/mbox/mbox-sync-list-index.c -M src/lib-storage/index/mbox/mbox-sync-private.h -M src/lib-storage/list/mailbox-list-index-status.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/mail-storage-private.h -M src/plugins/virtual/virtual-storage.c - -2021-08-20 19:09:17 +0300 Timo Sirainen (e13768d2ee) - - lib-storage: Don't call mailbox_vfuncs.list_index_has_changed() in data - stack frame - - This will be required by the next change. - -M src/lib-storage/list/mailbox-list-index-iter.c -M src/lib-storage/list/mailbox-list-index-status.c -M src/lib-storage/list/mailbox-list-index.c - -2021-08-20 17:26:42 +0300 Timo Sirainen (6fb3e493e2) - - lib-storage: mailbox_list_index_view_open() - Log a debug line why index - isn't up-to-date - - -M src/lib-storage/list/mailbox-list-index.c - -2021-08-20 17:20:01 +0300 Timo Sirainen (49d2d1d9ba) - - lib-storage: mailbox_list_index_status() - Return failure reason string - - Log a debug line if mailbox list index couldn't be used to get the wanted - status information. - -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/list/mailbox-list-index-notify.c -M src/lib-storage/list/mailbox-list-index-status.c -M src/lib-storage/list/mailbox-list-index.h -M src/lib-storage/list/mailbox-list-notify-tree.c - -2021-12-06 11:54:16 +0100 Marco Bettini (7751299dee) - - auth: userdb-ldap - Avoid early dereferencing - - userdb_ldap_iterate_callback() is still invoked after dereferencing - auth_request in userdb_ldap_iterate_deinit(). - - Normally this happens only on teardown, but it may happens also in case of - auth disconnecting from auth-worker during iteration. - (which shouldn't happen unless the auth process crashes) - -M src/auth/userdb-ldap.c - -2021-12-09 17:31:04 +0100 Timo Sirainen (2302fcd607) - - var-expand-crypt: Remove dead code - - It's correct that dcrypt library shouldn't be deinitialized at plugin - deinit. - -M src/plugins/var-expand-crypt/var-expand-crypt-plugin.c - -2021-12-03 17:23:35 +0200 Timo Sirainen (82be40f65c) - - login-common: Add more fields to proxy_session_finished - - Added disconnect_side, disconnect_reason, idle_secs, bytes_in, bytes_out. - -M src/login-common/login-proxy.c - -2021-12-03 17:54:37 +0200 Timo Sirainen (da379cfc29) - - login-common: Split off proxy disconnection prefix to - LOGIN_PROXY_KILL_PREFIX - - -M src/login-common/login-proxy.c - -2021-12-03 17:47:50 +0200 Timo Sirainen (d36139fc22) - - login-common: login_proxy_free_*() - Rename reason to log_msg - - This better describes it, since it's the full log message. - -M src/login-common/login-proxy.c - -2021-12-01 14:46:04 +0200 Timo Sirainen (203147d0fc) - - dsync: Fix -I max-size to actually be the max-size rather than min-size - - The -I max-size parameter was supposed to be used to skip mails that are - larger than max-size. Instead, it skipped mails that were smaller. - -M src/doveadm/dsync/dsync-mailbox-import.c - -2021-11-09 13:42:24 +0100 Timo Sirainen (34f2fdeed5) - - man: Add missing parameters to doveadm-sync - - -M doc/man/doveadm-sync.1.in - -2021-11-30 18:02:14 +0200 Timo Sirainen (e6a5cb57d1) - - dsync: Remove -D parameter that disables syncing mailbox renames - - It hasn't been necessary for a long time, and its behavior seems to be - broken. - -M src/doveadm/doveadm-dsync.c -M src/doveadm/dsync/dsync-brain-mailbox-tree.c -M src/doveadm/dsync/dsync-brain-private.h -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-brain.h -M src/doveadm/dsync/dsync-ibc-stream.c - -2021-11-09 13:41:37 +0100 Timo Sirainen (96f9651c98) - - dsync: Add back various missing parameters - - Also add them to the usage string. - - Broken by 5676c510bfa9217df05e9b7cb000ae3554d66f22 - -M src/doveadm/doveadm-dsync.c - -2021-09-22 14:50:50 -0600 Michael M Slusarz (2beae65898) - - fts: Don't overwrite INUSE error if indexing times out - - -M src/plugins/fts/fts-indexer.c -M src/plugins/fts/fts-storage.c - -2021-11-11 12:31:49 +0200 Aki Tuomi (61d9023523) - - lib-storage/index: If mail stream was already opened, do not count it as - slow vsize access - - imapc storage driver will open the mail stream in some circumstances during - search, so do not consider this as slow vsize. - -M src/lib-storage/index/index-mailbox-size.c - -2021-11-16 15:08:47 +0200 Aki Tuomi (73475e1ea6) - - lib-storage: Split off index_mailbox_vsize_finish_bg() - - Simplifies next commit - -M src/lib-storage/index/index-mailbox-size.c - -2021-08-10 12:22:08 +0300 Timo Sirainen (1ee84ba065) - - lib-index: Fix storing cache fields' last_used with 64bit big endian CPUs - - -M src/lib-index/mail-cache-fields.c - -2019-01-17 12:13:38 +0200 Timo Sirainen (616684a8fe) - - maildir: Fix crash at error handling - - At this point dest_mail is already NULL. Mainly could happen when running - out of disk space. - -M src/lib-storage/index/maildir/maildir-save.c - -2021-11-30 09:51:25 +0000 Siavash Tavakoli (ea41bf7db1) - - login-proxy: Don't send proxying start event for reconnects - - Send the event only for the beginning of proxying and add the reconnect - counts as a field for _established and _finished events. - -M src/login-common/login-proxy.c - -2021-11-26 14:45:47 +0100 Marco Bettini (2f7254a6af) - - lib: str_parse_intmax() - Replace signed expression with UNSIGNED_MINUS() - - Found by code analysis tool - -M src/lib/strnum.c - -2021-11-26 15:48:04 +0100 Marco Bettini (5297d4862f) - - lib: switch i_rand_limit() - Replace signed expression with UNSIGNED_MINUS() - - Found by code analysis tool - -M src/lib/rand.c - -2021-11-26 14:15:07 +0100 Marco Bettini (4a3ef239b4) - - lib: buffer_truncate_rshift_bits() - Replace signed expression with an - unsigned equivalent - - Found by code analysis tool - -M src/lib/buffer.c - -2021-11-29 15:05:29 +0100 Marco Bettini (668bdc6838) - - lib: bits_rotXYY() - Replace signed expression with UNSIGNED_MINUS() macro - for unsigned 2's complement - - Found by code analysis tool - -M src/lib/bits.h -M src/lib/test-bits.c - -2021-11-29 15:00:41 +0100 Marco Bettini (bf9c2cb8b5) - - bits_is_power_of_two() Replace signed expression with __builtin_popcountl() - - Found by code analysis tool - -M src/lib/bits.h -M src/lib/test-bits.c - -2021-11-29 14:58:33 +0100 Marco Bettini (f7cbaac8ff) - - lib: test-bits.c - Removing stray spaces at end of lines - - -M src/lib/test-bits.c - -2021-01-15 17:43:19 +0100 Fabrice Bellet (9211e803f2) - - raw-storage: copy the envelope sender instead of referencing it - - -M src/lib-storage/index/raw/raw-storage.c - -2019-10-14 16:43:57 +0300 Timo Sirainen (4a58d467b6) - - lib-fs: Add test-fs utility for testing fs drivers - - It performs random read/write/delete/iter operations. - -M src/util/Makefile.am -A src/util/test-fs.c - -2021-06-18 15:19:48 +0300 Timo Sirainen (051d39ee45) - - replicator: doveadm replicator replicate -f didn't always start full sync - - The full sync happened only if the dsync queue was already full. If it - wasn't, dsync was called too early before user->force_full_sync was set. - -M src/replication/replicator/replicator-brain.c - -2021-07-28 11:52:01 +0300 Timo Sirainen (d0c28bba8b) - - replicator: Move replicator_brain_timeout(() - - -M src/replication/replicator/replicator-brain.c - -2021-04-19 18:48:09 +0200 Timo Sirainen (21880fac08) - - lib-storage: Optimize behavior when building THREAD tree with empty cache - - Although it's possible that Date, Subject or received-date isn't actually - needed for all mails, it's much more efficient behavior to add all of these - to cache at the same time if they're not there already. Otherwise the same - mail could be opened and parsed up to 3 times. - -M src/lib-storage/index/index-thread.c - -2020-04-02 11:06:36 +0300 Timo Sirainen (8abebfe9a4) - - dsync: Improve checking if source and destination are the same location - - Prefer checking using the first -n parameter's namespace. Next try prefix="" - if it's created and last fallback to inbox=yes namespace. - -M src/doveadm/doveadm-dsync.c - -2021-11-22 18:17:52 +0200 Timo Sirainen (27e371af06) - - dsync: Improve bad namespace configuration related error messages - - -M src/doveadm/doveadm-dsync.c - -2021-11-24 16:01:08 +0100 Marco Bettini (5519de5749) - - submission: smtp_server_command_execute() Remove check for null pointer - confusing coverity - - -M src/lib-smtp/smtp-server-command.c - -2021-11-22 16:04:11 +0000 Siavash Tavakoli (c36969fee5) - - imapc: Do not include the root node in list if it's the namespace prefix - - Otherwise namespace prefix is added to the mailbox tree as a separate node. - Fixes duplicated shared namespace root in mailbox list. - -M src/lib-storage/index/imapc/imapc-list.c - -2021-11-23 15:56:45 +0100 Marco Bettini (5cf012bad9) - - acl: acl_mailbox_exists() - Add missing error handling - - Set mailbox storage error to "internal error" when - acl_object_get_my_rights() fails (as per contract). - -M src/plugins/acl/acl-mailbox.c - -2021-11-23 16:03:07 +0100 Marco Bettini (a672d83152) - - lib-storage: fail_mailbox_exists() - Return not found as a success instead - of an error - - GETMETADATA sometimes responds with “NO [SERVERBUG] BUG: Unknown internal - error returned”, instead of “NO Mailbox doesn't exist”, depending on the - actual configuration. This can happen with the shared namespace. - -M src/lib-storage/fail-mailbox.c - -2021-11-23 17:55:43 +0200 Martti Rannanjärvi (13ed86bbf3) - - login-common: Default director_username_hash to %Lu like everywhere else - - This setting has many places where the default is set, and this syncs it - with the others. - -M src/login-common/login-settings.c - -2021-11-12 11:16:47 +0100 Stephan Bosch (d36d2c595a) - - lib-storage: mail-duplicate - Fix segfault occurring when user has no - configured home directory - - Occurred only when a duplicate DB transaction was created. - -M src/lib-storage/mail-duplicate.c - -2021-11-12 10:43:16 +0100 Stephan Bosch (98f709deac) - - lib-storage: mail-duplicate - Fix panic occurring when user has no - configured home directory. - - Panic was: - - Panic: file imem.c: line 65 (i_strconcat): assertion failed: (str1 != NULL) - -M src/lib-storage/mail-duplicate.c - -2021-11-11 09:57:07 +0200 sergey.kitov (476990fffa) - - stats: Whitespace cleanup. - - -M src/stats/stats-metrics.c - -2021-11-09 14:12:18 +0200 sergey.kitov (e41cd77f96) - - doveadm: Fix processing of group-by parameter of doveadm stats add. - - -M src/doveadm/doveadm-stats.c - -2020-09-25 03:48:09 +0200 Stephan Bosch (6341cfc57a) - - lib-smtp: smtp-client-transaction - Always drop MAIL/RCPT state data before - calling callbacks. - - This prevents problems with callbacks destroying the transaction, the - connection, or commands involved in the transaction. This at least fixes a - segmentation fault occurring in the submission service when STARTTLS fails - during login. - -M src/lib-smtp/smtp-client-transaction.c - -2021-11-08 23:29:35 +0100 Stephan Bosch (0037fb7bad) - - lib-smtp: smtp-client-transaction - Make - smtp_client_transaction_rcpt_fail_reply(NULL, reply) a no-op. - - -M src/lib-smtp/smtp-client-transaction.c - -2020-09-25 03:31:07 +0200 Stephan Bosch (30f0154b78) - - lib-smtp: smtp-client-transaction - Make - smtp_client_transaction_rcpt_abort(NULL) a no-op. - - -M src/lib-smtp/smtp-client-transaction.c - -2020-09-25 03:29:53 +0200 Stephan Bosch (53b3b9f55b) - - lib-smtp: smtp-client-transaction - Make - smtp_client_transaction_rcpt_replied(NULL) a no-op. - - -M src/lib-smtp/smtp-client-transaction.c - -2020-09-25 03:27:39 +0200 Stephan Bosch (f4c5ab773a) - - lib-smtp: smtp-client-transaction - Assert that - smtp_client_transaction_rcpt_approved/denied() has non-NULL parameter. - - -M src/lib-smtp/smtp-client-transaction.c - -2020-09-25 03:24:29 +0200 Stephan Bosch (5e68870131) - - lib-smtp: smtp-client-transaction - Make - smtp_client_transaction_rcpt_free(NULL) a no-op. - - -M src/lib-smtp/smtp-client-transaction.c - -2020-09-25 03:22:45 +0200 Stephan Bosch (da73aac321) - - lib-smtp: smtp-client-transaction - Make - smtp_client_transaction_mail_fail_reply(NULL, reply) a no-op. - - -M src/lib-smtp/smtp-client-transaction.c - -2020-09-25 03:21:06 +0200 Stephan Bosch (86debae8fe) - - lib-smtp: smtp-client-transaction - Make - smtp_client_transaction_mail_abort(NULL) a no-op. - - -M src/lib-smtp/smtp-client-transaction.c - -2020-09-25 03:18:56 +0200 Stephan Bosch (8f2751f53d) - - lib-smtp: smtp-client-transaction - Make - smtp_client_transaction_mail_replied(NULL, reply) a no-op. - - -M src/lib-smtp/smtp-client-transaction.c - -2020-09-25 03:17:57 +0200 Stephan Bosch (02079622d1) - - lib-smtp: smtp-client-transaction - Make - smtp_client_transaction_mail_free(NULL) a no-op. - - -M src/lib-smtp/smtp-client-transaction.c - -2020-09-25 02:45:27 +0200 Stephan Bosch (c588b55541) - - lib-smtp: smtp-client-command - Drop callback before call in - smtp_client_command_input_reply(). - - -M src/lib-smtp/smtp-client-command.c - -2020-09-25 02:38:54 +0200 Stephan Bosch (34e5a418c1) - - lib-smtp: smtp-client-command - Make smtp_client_command_fail_reply(NULL, - reply) a no-op. - - -M src/lib-smtp/smtp-client-command.c - -2020-09-25 02:33:33 +0200 Stephan Bosch (ed211d21b0) - - lib-smtp: smtp-client-command - Make smtp_client_command_abort(NULL) a - no-op. - - -M src/lib-smtp/smtp-client-command.c - -2020-09-25 03:00:31 +0200 Stephan Bosch (15c98d994b) - - lib-smtp: Reformat smtp-client-transaction.c. - - -M src/lib-smtp/smtp-client-transaction.c - -2020-09-25 03:14:16 +0200 Stephan Bosch (ec3cdb2168) - - lib-smtp: Reformat smtp-client-command.c. - - -M src/lib-smtp/smtp-client-command.c - -2021-10-28 09:19:37 +0200 Marco Bettini (1863b1c535) - - lib-fts: Don't index inline base64 encoded content - - -M src/lib-fts/fts-tokenizer-generic.c -M src/lib-fts/test-fts-tokenizer.c - -2021-11-14 23:27:00 +0100 Stephan Bosch (771ebaf961) - - lib-smtp: smtp-server-command - Emit smtp_server_command_started event a - little later. - - This way cmd_*args fields are available for the event. - -M src/lib-smtp/smtp-server-command.c - -2021-10-27 00:48:28 +0200 Stephan Bosch (6687627b15) - - lib-smtp: smtp-server-command - Add cmd_args and cmd_human_args fields. - - This mirrors the identically named fields for the imap service. For SMTP, - though, cmd_human_args == cmd_args. - -M src/lib-smtp/smtp-server-command.c - -2021-07-19 11:53:41 +0200 Stephan Bosch (f0e2299322) - - lib-http: http-client-connection - Fix crash in - http_client_connection_server_close(). - - The conn->peer member is only not NULL when the connection is associated - with a peer object. If it is not, http_client_connection_server_close() will - crash. Fixed by doing the peer->client operations only when there is an - associated peer. - -M src/lib-http/http-client-connection.c - -2020-06-27 17:55:58 +0200 Stephan Bosch (9032716e00) - - lib-http: Reformat http-client-connection.c. - - -M src/lib-http/http-client-connection.c - -2021-10-29 11:42:40 +0300 sergey.kitov (f572de72f4) - - lib: Add unit tests for named events only optimization. - - -M src/lib/event-filter-private.h -M src/lib/event-filter.c -M src/lib/test-event-filter.c - -2021-10-29 14:06:39 +0300 sergey.kitov (5a69a67fb8) - - lib: Fix event filtering for unnamed events with optional event name - - For example event filter "event=ev_name OR field1=value1" wouldn't - previously match if the event didn't have any name, even if it did have - field1=value1. - -M src/lib/event-filter-parser.y -M src/lib/event-filter.c - -2021-10-22 12:09:24 +0300 sergey.kitov (f01aec1f96) - - lib-master: Whitespace cleanup. - - -M src/lib-master/master-service.c - -2021-11-09 14:37:07 +0200 Aki Tuomi (f083562f92) - - auth: passdb-cache - Preserve cached fields when verifying password with - worker - - -M src/auth/passdb-cache.c - -2021-11-05 17:11:49 +0100 Stephan Bosch (533ef6c62d) - - lib-smtp: smtp-server-command - Hold a command reference while sending - replies. - - Fixes segfault at smtp-server-reply.c:652. - -M src/lib-smtp/smtp-server-command.c - -2021-11-05 16:53:48 +0100 Stephan Bosch (2275fc4d51) - - lib-smtp: smtp-server-command - Split off - smtp_server_command_send_more_replies(). - - -M src/lib-smtp/smtp-server-command.c - -2021-11-05 16:46:15 +0100 Stephan Bosch (9ae95cb884) - - lib-smtp: smtp-server-command - Split off - smtp_server_command_send_replies(). - - -M src/lib-smtp/smtp-server-command.c -M src/lib-smtp/smtp-server-connection.c -M src/lib-smtp/smtp-server-private.h - -2021-11-08 14:36:57 +0200 sergey.kitov (083570cb73) - - plugins/fts: Fix memory leak when searching mail in virtual folder with fts. - - -M src/plugins/fts/fts-storage.c - -2021-11-08 14:04:07 +0200 Aki Tuomi (5afea22757) - - configure: Fix version macros to work with devel version - - -M configure.ac - -2021-11-08 15:24:30 +0200 Aki Tuomi (318f566fc4) - - SECURITY.md: Add initial security policy - - -A SECURITY.md - -2021-10-26 16:59:29 +0300 Timo Sirainen (e188435026) - - lib-fts: Fix address tokenizer to handle large input properly - - Previously it could have used excessive amounts of memory if the input - didn't contain separator characters. - - The fix changes a bit how the address-tokenizer works: Previously large - email addresses were saved as truncated tokens. Now they're skipped entirely - by the address tokenizer. Similarly when searching long email addresses - they're no longer searched as truncated tokens, but instead simply fed to - the parent tokenizer which (likely) searches them in smaller pieces. - - Note that this also sometimes changes the order in which tokens are - returned, e.g. "foo", "example", "foo@example.com", "com" instead of - returning "com" before the email address. This isn't ideal, but fixing it - seems annoyingly complicated and practically it doesn't matter right now. - -M src/lib-fts/fts-tokenizer-address.c -M src/lib-fts/test-fts-tokenizer.c - -2021-10-26 16:34:25 +0300 Timo Sirainen (2af8437d1d) - - lib-fts: Implement support for parent tokenizer "streaming" - - By default parent tokenizer is further tokenizing the token strings returned - by child tokenizer. When streaming is enabled, the parent tokenizers are - instead tokenizing a stream of data sent by the child tokenizer. This - effectively makes the parent tokenizer return the same tokens as if the - child tokenizer didn't exist (assuming child tokenizer feeds the parent all - the same input). - - Arguably this should be the only way tokenizers work, but at least for now - lets keep both ways. - -M src/lib-fts/fts-tokenizer-private.h -M src/lib-fts/fts-tokenizer.c - -2021-10-26 12:33:50 +0300 Timo Sirainen (782d806db2) - - lib-fts: fts-tokenizer - Add comments explaning how it works - - -M src/lib-fts/fts-tokenizer.c - -2021-10-26 11:52:22 +0300 Timo Sirainen (2e91a13fe9) - - lib-fts: test-fts-tokenizer - Add more uniqueness to the long email address - - This helps at least with debugging problems. - -M src/lib-fts/test-fts-tokenizer.c - -2021-09-14 18:21:09 +0200 Timo Sirainen (31c24137c2) - - lib: DOVECOT_PREREQ() - Add micro version - - Nowadays APIs can change between micro versions as well. - -M src/lib/macros.h - -2021-09-14 18:23:41 +0200 Timo Sirainen (cb5968f451) - - lib: DOVECOT_PREREQ() - Remove surrounding if checks - - The DOVECOT_VERSION_* macros are expected to always exist. - -M src/lib/macros.h - -2021-09-14 18:21:03 +0200 Timo Sirainen (d199125cc5) - - configure: Add DOVECOT_VERSION_MICRO - - -M configure.ac - -2021-11-02 16:06:55 +0200 Timo Sirainen (e95f985635) - - lib: Fix building with --disable-asserts - - The #endif location was wrong. - -M src/lib/macros.h - -2021-01-27 02:20:53 +0100 Stephan Bosch (17efe7a404) - - submission-login: Implicitly login using EXTERNAL mechanism upon MAIL if - enabled. - - This is a workaround for TLS clients that present a valid client - certificate, yet don't authenticate explicitly. This is enabled by setting: - - submission_client_workarounds = implicit-auth-external - -M src/submission-login/client-authenticate.c -M src/submission-login/client-authenticate.h -M src/submission-login/client.c -M src/submission-login/submission-login-settings.c -M src/submission-login/submission-login-settings.h -M src/submission/main.c -M src/submission/submission-client.c -M src/submission/submission-client.h -M src/submission/submission-settings.c - -2021-10-14 12:47:23 +0200 Stephan Bosch (1236352801) - - submission-login: client-authenticate - Split off - cmd_auth_set_master_data_prefix(). - - -M src/submission-login/client-authenticate.c - -2021-01-27 13:51:03 +0100 Stephan Bosch (14b6f813e0) - - login-common: sasl-server - Add support for implicit login. - - -M src/login-common/client-common-auth.c -M src/login-common/sasl-server.c -M src/login-common/sasl-server.h - -2021-01-27 13:43:23 +0100 Stephan Bosch (d4321dd910) - - login-common: sasl-server - Turn private argument of - sasl_server_auth_begin() into flag. - - -M src/login-common/client-common-auth.c -M src/login-common/client-common.h -M src/login-common/sasl-server.c -M src/login-common/sasl-server.h - -2021-01-27 13:39:23 +0100 Stephan Bosch (d5588935bf) - - lib-master: master-auth - Add support for MAIL_AUTH_REQUEST_FLAG_IMPLICIT - flag. - - It signals that this login is implicit; no command reply is expected. This - is going to be used by the Submission service to implicitly login a user - using the EXTERNAL SASL mechanism when the first MAIL command is issued. In - that case sending a reply for the implicit AUTH command would break the - protocol and this new flag is used to signal the post-login submission - service to not send an initial reply. - -M src/lib-master/master-auth.h - -2021-01-27 13:40:43 +0100 Stephan Bosch (a0eeeb6c76) - - lib-smtp: smtp-server - Add support for suppressing the inital greeting - reply. - - -M src/lib-smtp/smtp-server-connection.c -M src/lib-smtp/smtp-server.c -M src/lib-smtp/smtp-server.h - -2021-01-27 02:22:10 +0100 Stephan Bosch (eef32e87e4) - - lib-smtp: smtp-server - Make default command functions public. - - -M src/lib-smtp/smtp-server-private.h -M src/lib-smtp/smtp-server.h - -2021-01-27 02:21:50 +0100 Stephan Bosch (6b380d6072) - - lib-smtp: smtp-server-command - Allow overriding commands. - - -M src/lib-smtp/smtp-server-command.c -M src/lib-smtp/smtp-server.h - -2021-10-30 00:43:55 +0200 Stephan Bosch (73b1ed4e82) - - submission-login: client - Explicitly set SMTP server command and auth line - limits. - - This way, it will always use the same limits as all other login services. - -M src/submission-login/client.c - -2021-10-29 20:41:42 +0200 Stephan Bosch (056aeb0748) - - lib-smtp: smtp-command-parser - Make parser suitable for input stream with - small buffer. - - -M src/lib-smtp/smtp-command-parser.c -M src/lib-smtp/test-smtp-server-errors.c - -2021-10-29 23:44:01 +0200 Stephan Bosch (d982aaadf1) - - lib-smtp: smtp-command - Use size_t for command line limits. - - -M src/lib-smtp/smtp-command-parser.c -M src/lib-smtp/smtp-command.h - -2021-10-29 19:37:16 +0200 Stephan Bosch (12eb20fc0d) - - lib-smtp: test-smtp-server-errors - Add tests for very long AUTH response - lines. - - -M src/lib-smtp/test-smtp-server-errors.c - -2021-10-29 19:36:18 +0200 Stephan Bosch (eb22a35feb) - - lib-smtp: test-smtp-command-parser - Add test for very long AUTH response - line. - - -M src/lib-smtp/test-smtp-command-parser.c - -2021-10-29 23:52:05 +0200 Stephan Bosch (e0fa1375e2) - - lib-smtp: Reformat smtp-command-parser.c. - - -M src/lib-smtp/smtp-command-parser.c - -2021-10-29 23:47:57 +0200 Stephan Bosch (f47cc80a24) - - lib-smtp: Reformat smtp-command-parser.h. - - -M src/lib-smtp/smtp-command-parser.h - -2021-11-01 08:33:49 -0400 Timo Sirainen (6fff8d5819) - - master: Use MASTER_SERVICE_FLAG_DISABLE_SSL_SET - - This prevents startup failures if ssl_ca has a large number of certificates. - - Broken by 36ff43f1a9aff8594d08f791e77ea13390fd569f - -M src/master/main.c - -2021-11-01 08:33:14 -0400 Timo Sirainen (ca2237e067) - - lib-master: Add MASTER_SERVICE_FLAG_DISABLE_SSL_SET - - -M src/lib-master/master-service-settings.c -M src/lib-master/master-service.h - -2021-10-27 12:06:10 +0200 Timo Sirainen (7fc901f370) - - lib-ssl-iostream: Fix assert-crash when OpenSSL returns syscall error - without errno - - Incomplete fix in f41874b3dec541478a85275698a91f089f537df2 - - Fixes: Panic: file istream-openssl.c: line 51 (i_stream_ssl_read_real): - assertion failed: (errno != 0) - -M src/lib-ssl-iostream/iostream-openssl.c - -2021-10-14 18:31:19 +0300 Timo Sirainen (84d3bc8e21) - - lib-storage: Improve mailbox_vfuncs.search_next_update_seq() comment - - -M src/lib-storage/mail-storage-private.h - -2019-08-08 15:35:03 -0600 Michael M Slusarz (d1e1e346a8) - - example-config: Remove outdated object-storage conf.d file - - -D doc/example-config/conf.d/11-object-storage.conf - -2021-10-28 17:07:39 +0200 Timo Sirainen (0407978a8f) - - dsync: Add back missing -T parameter - - Broken by 5676c510bfa9217df05e9b7cb000ae3554d66f22 - -M src/doveadm/doveadm-dsync.c - -2021-09-16 11:24:31 +0300 sergey.kitov (9705b81fb5) - - fts: Keep track of every backend mailbox fts index status for virtual - folders. - - -M src/plugins/fts/fts-search.c -M src/plugins/fts/fts-storage.c -M src/plugins/fts/fts-storage.h - -2021-10-22 12:07:17 +0300 sergey.kitov (392d79bbd2) - - fts: Whitespace cleanup. - - -M src/plugins/fts/fts-storage.c - -2021-10-14 17:33:30 +0300 Timo Sirainen (356b36fc52) - - lib-storage: Move search matching into - mailbox_vfuncs.search_next_match_mail() - - -M src/lib-storage/fail-mailbox.c -M src/lib-storage/index/dbox-multi/mdbox-deleted-storage.c -M src/lib-storage/index/dbox-multi/mdbox-storage.c -M src/lib-storage/index/dbox-single/sdbox-storage.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/index-search.c -M src/lib-storage/index/index-storage.h -M src/lib-storage/index/maildir/maildir-storage.c -M src/lib-storage/index/mbox/mbox-storage.c -M src/lib-storage/index/pop3c/pop3c-storage.c -M src/lib-storage/index/raw/raw-storage.c -M src/lib-storage/mail-storage-private.h -M src/plugins/virtual/virtual-storage.c - -2021-01-08 11:21:20 +0200 Timo Sirainen (547c07bdd3) - - lib: Use data stack frame with IO switch and destroy callbacks - - -M src/lib/ioloop.c - -2021-01-08 11:28:26 +0200 Timo Sirainen (0a9123d94c) - - lib: Use data stack frame with IO context activate/deactive callbacks - - These were running outside the regular ioloop data stack frames, so if the - callback used any data stack it kept increasing memory usage. - - This fixes excessive memory usage with old_stats plugin when used with - long-running imap sessions. The memory got filled with UPDATE-SESSION - commands. - -M src/lib/ioloop.c - -2021-09-29 00:04:29 +0300 Timo Sirainen (2cea75b7f5) - - lib-storage: When search parses message headers, deinitialize the parsing - properly - - index_mail_parse_header() was being called only for the actual headers. This - prevented it from being called with hdr=NULL to indicate that the parsing is - finished and should be deinitialized. Move the index_mail_parse_header() to - be called earlier so it's called also with hdr=NULL. - - Not deinitilizing the parsing could have caused assert-crashes later on in - some situations. - - Fixes: Panic: file index-mail-headers.c: line 667 - (index_mail_get_raw_headers): assertion failed: - (mail->mail.mail.lookup_abort >= MAIL_LOOKUP_ABORT_NOT_IN_CACHE) Panic: file - ../../../src/lib/array.h: line 244 (array_idx_i): assertion failed: (idx < - array->buffer->used / array->element_size) Panic: file index-mail.c: line - 1203 (index_mail_parse_body_finish): assertion failed: (!success) - -M src/lib-storage/index/index-search.c - -2021-10-21 15:45:56 +0200 Marco Bettini (be55b9a4e0) - - doveadm: Route help/usage messages on stderr rather than stdout. - - -M src/doveadm/doveadm.c - -2021-09-30 16:19:58 +0100 Siavash Tavakoli (dbf7ed69c3) - - login-common: Add proxying events - - - proxy_session_started: Emitted before connecting to remote - - proxy_session_established: Emitted after connection to remote is - established and user is successfully logged in to the backend. - - proxy_session_finished: Emitted when proxying has ended. Either - successfully or with error. - -M src/login-common/client-common-auth.c -M src/login-common/login-proxy.c - -2021-09-30 12:49:31 +0100 Siavash Tavakoli (32e57666dc) - - login-common: Change login proxy message to include IP address - - Will be in format " ()". Host part is optional and not added if - proxy target is an IP address. - -M src/login-common/client-common-auth.c - -2021-10-05 11:33:06 +0100 Siavash Tavakoli (313b96cd9a) - - login-proxy: Add source_port to proxy event after connection is established - - -M src/login-common/login-proxy.c - -2021-10-05 15:17:50 +0100 Siavash Tavakoli (ac4089115b) - - login-common: Add more fields to login proxy event - - Adds - - source_ip - - dest_ip - - dest_port - - dest_host - - master_user - -M src/login-common/login-proxy.c - -2021-10-07 22:52:47 +0100 Siavash Tavakoli (574ad02a47) - - login-common: Start proxying after client fields are set - - Allows adding more event fields in login_proxy_new(). - -M src/login-common/client-common-auth.c - -2021-09-30 12:48:09 +0100 Siavash Tavakoli (e202252702) - - login-proxy: Add login_proxy_get_ip_str() - - Returns proxy IP address as string. - -M src/login-common/login-proxy.c -M src/login-common/login-proxy.h - -2021-10-07 10:29:04 +0100 Siavash Tavakoli (9ed1cdecee) - - client-common: Add service field to client event - - -M src/login-common/client-common.c - -2021-10-13 14:49:43 +0300 Marco Bettini (351b424a37) - - imap: list_send_status() - Fixes LIST-EXTENDED doesn't return STATUS for all - folders - - Sending LIST .. RETURN (SUBSCRIBED STATUS (...)) did not return STATUS for - folders that are not subscribed when they have a child folder that is - subscribed as mandated by IMAP RFC - -M src/imap/cmd-list.c - -2021-10-13 11:45:05 +0300 Timo Sirainen (b3f32368aa) - - lib-index: Add mail_index_alloc_cache_find() - - -M src/lib-index/mail-index-alloc-cache.c -M src/lib-index/mail-index-alloc-cache.h - -2021-10-07 18:11:00 +0300 Timo Sirainen (55338455ae) - - maildir: Fix crash when closing a mailbox that isn't open - - This could have happened at least with virtual plugin. - -M src/lib-storage/index/maildir/maildir-storage.c - -2021-10-08 16:32:09 +0300 Timo Sirainen (2555d374c0) - - master: test-auth-client - Check that authorization ID is as expected - - -M src/master/test-auth-client.c - -2021-10-07 20:18:21 +0300 Timo Sirainen (b314a81a69) - - master: test-auth-client - Fix authenid check to be assert - - It can never be NULL at this point. - -M src/master/test-auth-client.c - -2021-10-07 19:59:52 +0300 Timo Sirainen (859529c802) - - lib-dict: dict-lua - Throw Lua error if dict key is invalid or username is - missing - - This prevents assert-crashes in the C code. - -M src/lib-dict/dict-iter-lua.c -M src/lib-dict/dict-lua.c -M src/lib-dict/dict-lua.h -M src/lib-dict/dict-txn-lua.c - -2021-10-07 19:54:41 +0300 Timo Sirainen (e26cebc652) - - lib-dict: dict_lookup_async() - Add missing assert to check for key prefix - and username - - -M src/lib-dict/dict.c - -2021-10-07 19:42:41 +0300 Timo Sirainen (5ed33ba11b) - - lib-master: Prevent read buffer overflow with invalid haproxy header size - - This could have happened only for connections from haproxy_trusted_networks, - so it's unlikely to cause any real security issues. - -M src/lib-master/master-service-haproxy.c - -2021-10-07 19:36:17 +0300 Timo Sirainen (1ed470aa2d) - - lib-dcrypt: dcrypt_openssl_decrypt_point_password_v1() - Fix crash if pbkdf2 - generation fails - - -M src/lib-dcrypt/dcrypt-openssl.c - -2021-10-06 15:38:55 +0300 Timo Sirainen (1e12cf4be0) - - imap: Fix handling client initialization error - - It should send "OK Logged in" + BYE, not PREAUTH. - - Broken by 714ff4342e39e309ff184905cd2f714def6177a3 - -M src/imap/main.c - -2021-10-08 16:02:04 +0300 Timo Sirainen (5a26f6160b) - - imap: Move client_add_input() content to calling functions - - -M src/imap/main.c - -2021-10-08 15:57:50 +0300 Timo Sirainen (8f5d8d9e13) - - imap: Move IMAPLOGINTAG environment handling - - It can only happen with stdio clients when they don't have CLIENT_INPUT, so - it makes more sense to exist in the calling function. - -M src/imap/main.c - -2021-10-06 15:43:09 +0300 Timo Sirainen (29471bf743) - - imap-login: proxy: Don't forward untagged BYE responses to the client - - It will just cause confusion, especially when connections are retried. It - could end up looking like: - - x login user pass - * BYE Internal error occurred. Refer to server log for more information. - * BYE Internal error occurred. Refer to server log for more information. - * BYE Internal error occurred. Refer to server log for more information. - * BYE Internal error occurred. Refer to server log for more information. x - NO [UNAVAILABLE] Account is temporarily unavailable. - -M src/imap-login/imap-proxy.c - -2021-10-08 15:53:21 +0300 Timo Sirainen (f4da884f67) - - lib-storage: mail_storage_service_lookup() - Fix memory leak when returning - -2 - - This was also visible as event leaks. - -M src/lib-storage/mail-storage-service.c - -2021-09-28 20:46:54 +0300 Timo Sirainen (f29786350e) - - lib-index: Fix potential crash with debug logging when looking up cache - - -M src/lib-index/mail-cache-lookup.c - -2021-09-28 20:45:47 +0300 Timo Sirainen (a016ac6a3e) - - lib-index: mail_cache_lookup_iter_next() - Add a warning comment about - re-reading fields - - -M src/lib-index/mail-cache-private.h - -2021-10-07 15:52:28 +0200 Marco Bettini (08656f3aad) - - mail-crypt: mail_crypt_load_global_private_key() - Drop unnecessary NULL - check - - -M src/plugins/mail-crypt/mail-crypt-global-key.c - -2021-09-28 18:13:12 +0300 Timo Sirainen (b4217b8d36) - - lib, global: i_stream_create_chain() - Add max_buffer_size - - This makes sure that the istream size can't grow too large and waste memory. - - Previously the istream max_buffer_size was dynamically changed to be the - smallest seen max_buffer_size in chained istreams. This mostly worked, but - sometimes the istream-chain's max_buffer_size was requested before even the - first istream was added to it. - - Having an explicit max_buffer_size avoids all the problems of it being - dynamic, and there's not really any need for it anyway. - -M src/imap/cmd-append.c -M src/lib-http/test-http-client-errors.c -M src/lib-smtp/smtp-server-cmd-data.c -M src/lib-storage/index/pop3c/pop3c-client.c -M src/lib/istream-chain.c -M src/lib/istream-chain.h -M src/lib/test-istream-chain.c - -2021-10-07 14:52:12 +0300 Timo Sirainen (2aa531b4a4) - - virtual: Fix assert-crash when backend mbox mailbox is deleted while virtual - mailbox is open - - The code wrongly thought that metadata lookup couldn't fail because it was - already successfully looked up. But the backend storage could still try to - refresh the mailbox to verify whether it still exists or not, and fail if it - was deleted. - - This seems to have affected only the mbox mailbox format. - - Broken by 710346bcb884b464c8ed128870fdc1999c13dfd3 - -M src/plugins/virtual/virtual-sync.c - -2021-10-05 02:03:00 +0300 Timo Sirainen (5050000f5d) - - lib: istream-concat - Add a comment about explicit snapshot function - - -M src/lib/istream-concat.c - -2021-10-05 01:39:50 +0300 Timo Sirainen (e830aca4ef) - - lib: test-istream-concat - Unref child istreams immediately - - This doesn't currently make a difference, since istream-concat keeps them - internally referenced. In case this changes and snapshot handling isn't - fixed similarly to istream-chain, the unit test should now fail. - -M src/lib/test-istream-concat.c - -2021-10-04 18:25:40 +0300 Timo Sirainen (9507dcba9f) - - lib: istream-concat - Fix snapshot handling when combining two istreams - - Snapshotting wasn't handled correctly when two (or more) istreams' contents - were combined into the same buffer. - -M src/lib/istream-concat.c -M src/lib/test-istream-concat.c - -2021-10-05 00:55:57 +0300 Timo Sirainen (4614c27f68) - - lib: istream-chain - Optimize snapshot handling - - -M src/lib/istream-chain.c - -2021-10-05 01:32:22 +0300 Timo Sirainen (539a052672) - - lib: istream-chain - Fix snapshot handling when link istream is destroyed - - -M src/lib/istream-chain.c -M src/lib/istream-private.h -M src/lib/istream.c -M src/lib/test-istream-chain.c - -2021-10-04 18:17:49 +0300 Timo Sirainen (504c0e6424) - - lib: istream-chain - Fix snapshot handling when combining two istreams - - Snapshotting wasn't handled correctly when two (or more) istreams' contents - were combined into the same buffer. - -M src/lib/istream-chain.c -M src/lib/test-istream-chain.c - -2021-10-05 01:00:38 +0300 Timo Sirainen (39642d6b49) - - lib: Add i_stream_memarea_detach() - - -M src/lib/istream-private.h -M src/lib/istream.c - -2021-10-04 17:41:27 +0300 Timo Sirainen (67324622b6) - - lib: test-istream-chain - Use more unique strings for testing - - DEBUG checks don't work well if the input repeats the same character. - -M src/lib/test-istream-chain.c - -2019-09-15 00:08:57 +0300 Timo Sirainen (43d7f354c4) - - lib: istream-seekable - Fix crash after write to temp file failed - - Fixes: Panic: file istream-seekable.c: line 230 (read_from_buffer): - assertion failed: (*ret_r > 0) - -M src/lib/istream-seekable.c - -2019-09-15 00:06:58 +0300 Timo Sirainen (66fc9ffd4c) - - lib: istream-seekable - Don't double-close temp file fd on errors - - Closing the fd_input stream already auto-closes the fd. - -M src/lib/istream-seekable.c - -2019-09-14 23:53:35 +0300 Timo Sirainen (eb15b02121) - - lib: istream-seekable - Fix crash if writing to temp file fails - - -M src/lib/istream-seekable.c -M src/lib/test-istream-seekable.c - -2021-09-29 13:13:53 +0300 Timo Sirainen (7f752d77be) - - lib: i_stream_try_alloc() - Add sanity check asserts - - -M src/lib/istream.c - -2021-10-06 17:37:40 +0300 Timo Sirainen (baf3e985c0) - - lib-imap-client: test-imapc-client - Increase connect timeout for most tests - - The 500ms timeout could have been too short when running with valgrind on an - overloaded system. Increase it to 5 seconds, but keep 500ms for the tests - that expect a timeout. - -M src/lib-imap-client/test-imapc-client.c - -2021-10-06 05:03:08 -0400 Marco Bettini (313ce3e709) - - lib-master: master_login_auth_callback() - Add assert to guard for both - errormsg and auth_args being NULL - - -M src/lib-master/master-login.c - -2021-10-07 03:55:59 +0300 Timo Sirainen (e7754572e6) - - auth: db-passwd-file - Fix using paths with %% escaped characters but no - %variables - - full_key might not have been NULL, causing var_expand() to read past the - array and possibly crash. - -M src/auth/db-passwd-file.c - -2021-10-07 03:46:29 +0300 Timo Sirainen (687bc05ad0) - - lib: t_get_bytes_available() - Move code inside DEBUG to avoid dead code - warning - - -M src/lib/data-stack.c - -2021-10-07 03:44:46 +0300 Timo Sirainen (6e02a7ba64) - - lib-index: mail_index_sync_init_expunge_handlers() - Simplify and remove - dead code - - -M src/lib-index/mail-index-sync-ext.c - -2021-10-07 03:37:29 +0300 Timo Sirainen (1bf116c7a6) - - lib-index: test-mail-index-write - Fix initializing map.hdr_copy_buf - - -M src/lib-index/test-mail-index-write.c - -2021-10-07 03:29:09 +0300 Timo Sirainen (a08c2213af) - - lib-settings: test-settings-parser - Check settings_parser_check() return - value - - -M src/lib-settings/test-settings-parser.c - -2021-10-07 03:28:56 +0300 Timo Sirainen (a3b12700a6) - - auth: Make sure auth_request_import() doesn't unexpectedly fail - - -M src/auth/auth-master-connection.c - -2021-10-07 03:10:28 +0300 Timo Sirainen (4327b55f45) - - lib: Change i_unreached() to be a function - - This allows overriding the function in a Coverity model, so it can - understand that i_unreached() is intended to be unreachable code. - -M src/lib/failures.c -M src/lib/failures.h -M src/lib/macros.h - -2021-10-07 02:32:26 +0300 Timo Sirainen (44bd159679) - - lib: base64 - Add asserts to check max_line_len is in valid range - - -M src/lib/base64.c - -2021-10-04 13:32:51 +0200 Timo Sirainen (1f0fad9044) - - ipc: Disable connecting to stats - - This avoids reconnect errors if stats process crashes. - -M src/ipc/main.c - -2021-10-01 01:44:35 +0300 Timo Sirainen (dec257fb78) - - master: Use relative path for stats_writer_socket_path for chrooted services - - This allows login process to reconnect to stats-writer if it gets - disconnected. - -M src/master/service-process.c - -2021-10-01 01:42:43 +0300 Timo Sirainen (f08703dae8) - - stats: Add login/stats-writer socket - - -M src/stats/stats-settings.c - -2021-10-04 02:58:15 +0200 Stephan Bosch (53b018722b) - - lmtp: lmtp-proxy - Use the per-recipient session ID for the "Saved" message. - - -M src/lmtp/lmtp-proxy.c - -2021-10-04 02:57:25 +0200 Stephan Bosch (0daefe8937) - - lmtp: Move session_id field to generic recipient struct. - - -M src/lmtp/lmtp-commands.c -M src/lmtp/lmtp-local.c -M src/lmtp/lmtp-recipient.c -M src/lmtp/lmtp-recipient.h - -2021-10-02 00:21:40 +0200 Stephan Bosch (47c7166b91) - - lmtp: lmtp-proxy - Forward session ID towards backend. - - -M src/lmtp/lmtp-proxy.c - -2021-10-02 00:21:06 +0200 Stephan Bosch (e67d8cdb88) - - lmtp: lmtp-local - Always add RCPT index to session ID for delivery. - - Even when it is 1. - -M src/lmtp/lmtp-local.c - -2021-10-02 00:36:09 +0200 Stephan Bosch (c8423c354b) - - lib-smtp: smtp-server-transaction - Base transaction ID on connection - session ID. - - Composed as ":". - -M src/lib-smtp/smtp-server-private.h -M src/lib-smtp/smtp-server-transaction.c - -2021-10-02 00:32:05 +0200 Stephan Bosch (e6451151f5) - - lib-smtp: smtp-server-connection - Manage session ID for the connection. - - -M src/lib-smtp/smtp-server-connection.c -M src/lib-smtp/smtp-server-private.h - -2021-10-02 00:29:29 +0200 Stephan Bosch (8fb86c24be) - - lib-smtp: smtp-server-cmd-xclient - Parse XCLIENT SESSION field. - - -M src/lib-smtp/smtp-server-cmd-xclient.c -M src/lib-smtp/smtp-server-reply.c -M src/submission-login/client.c - -2021-10-02 00:16:22 +0200 Stephan Bosch (8c6d07276b) - - lib-smtp: smtp-client-connection - Send new SESSION field with XCLIENT - command. - - -M src/lib-smtp/smtp-client-connection.c - -2021-10-04 02:02:21 +0200 Stephan Bosch (2d4587d13a) - - lib-smtp: smtp-client - Use smtp_proxy_data_merge() to copy proxy data in - smtp_client_init(). - - -M src/lib-smtp/smtp-client.c - -2021-10-02 00:15:07 +0200 Stephan Bosch (b1497466f2) - - lib-smtp: smtp-common - Add SESSION field to proxy data. - - -M src/lib-smtp/smtp-common.c -M src/lib-smtp/smtp-common.h - -2021-10-02 00:25:50 +0200 Stephan Bosch (66d9b71ad4) - - lib: connection - Add debug message for when property label (peer address) - changes. - - -M src/lib/connection.c - -2021-10-02 00:26:28 +0200 Stephan Bosch (4a84440f53) - - lib: connection - Make connection_update_properties() public. - - -M src/lib/connection.c -M src/lib/connection.h - -2021-10-02 00:24:35 +0200 Stephan Bosch (44819f897c) - - lib: connection - Drop useless newlines. - - -M src/lib/connection.c - -2019-02-21 18:50:10 +0200 Aki Tuomi (1b13ee113b) - - lib-program-client: test-program-client-local - Use dd instead of head - - `head -c n` is only guaranteed to print n bytes, but it may consume more. - FreeBSD's implementation of head(1) uses buffered stdio, which did just - that. - - `dd` consumes exactly the specified number of bytes. - -M src/lib-program-client/test-program-client-local.c - -2021-08-10 13:38:39 +0200 Timo Sirainen (1489e6378c) - - login-proxy: Fix potential memory leak if backend login fails - - It also needs an abnormal way of destroying the client for the leak to - happen. For example if the login process is being killed. - -M src/login-common/client-common.c - -2021-04-19 17:36:02 +0200 Stephan Bosch (350600f984) - - lib-test: fuzzer - Disable error handling for output stream towards program. - - Fixes: - - Panic: output stream is missing error handling - -M src/lib-test/fuzzer.c - -2021-04-19 17:34:58 +0200 Stephan Bosch (b41e7198ad) - - lib-test: fuzzer - Provide names for fuzzer streams. - - -M src/lib-test/fuzzer.c - -2021-04-18 12:33:01 +0200 Stephan Bosch (860e5e3a83) - - lib-smtp: smtp-server-cmd-helo - Fix crash occurring upon pipelined EHLO - with invalid domain. - - Failed to check for NULL in domain value for a pipelined EHLO/HELO command. - -M src/lib-smtp/smtp-server-cmd-helo.c - -2021-10-06 13:20:12 +0300 Timo Sirainen (2e06ce6c98) - - lib: Fix data_stack_get_alloc_size() and data_stack_get_used_size() - - It only worked correctly if data stack hadn't been grown. This resulted in - wrong numbers in the data_stack_grow event. - -M src/lib/data-stack.c - -2021-10-01 15:08:45 +0300 Timo Sirainen (bdf4474ed8) - - virtual: Fix leaking mailboxes if virtual mailbox can't be opened - - Fixes also a crash at deinit: Panic: file mail-user.c: line 232 - (mail_user_deinit): assertion failed: ((*user)->refcount == 1) - -M src/plugins/virtual/virtual-storage.c - -2021-10-04 17:25:05 +0300 Timo Sirainen (79ebaf7b14) - - mdbox: Avoid calling container_of() with a NULL pointer - - -M src/lib-storage/index/dbox-multi/mdbox-save.c - -2021-10-04 15:20:17 +0300 Timo Sirainen (6275be1981) - - sdbox: Avoid calling container_of() with a NULL pointer - - -M src/lib-storage/index/dbox-single/sdbox-save.c - -2021-10-04 14:42:54 +0300 Timo Sirainen (a037ede37f) - - lib: buffer_free() - Check for buf==NULL before using container_of() - - Helps with static analyzer complaints. - -M src/lib/buffer.c - -2021-10-04 14:42:14 +0300 Timo Sirainen (ecaaa728c7) - - lib: lib-event - Assert-crash if attempting to use NULL passthrough event - - Fixes also complaints from static analyzer. - -M src/lib/lib-event.c - -2021-10-04 14:22:22 +0300 Timo Sirainen (bb5048cda0) - - lib: container_of() - Don't check for NULL after all - - Adding the explicit NULL checks for container_of() caused caused static - analyzers to think that NULL could be returned at any time. This caused - unnecessary warnings in various places. - - Reverts b178d0792b6335277f7fa831fd7e5403105abd04 - -M src/lib/macros.h - -2021-10-04 14:35:03 +0300 Timo Sirainen (5de8349891) - - lib: macros.h - Fix #endif position - - -M src/lib/macros.h - -2021-09-24 16:36:41 +0300 Timo Sirainen (6baff5b2d4) - - lib-index: Add more mail_index_ext_name_is_valid() asserts - - -M src/lib-index/mail-index-map.c -M src/lib-index/mail-index-sync-ext.c - -2021-09-24 16:35:39 +0300 Timo Sirainen (f81779845a) - - lib-index: Handle invalid extension header names without assert-crashing - - Fixes: Panic: mail_index_ext_register(...): Invalid name - -M src/lib-index/mail-index-map.c - -2021-09-24 16:27:40 +0300 Timo Sirainen (05e570be12) - - lib-index: Add and use mail_index_ext_name_is_valid() - - Use it in mail_index_ext_register() instead of the more relaxed - str_sanitize() check. - -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index.c - -2021-09-24 16:32:26 +0300 Timo Sirainen (4896364107) - - lib-index: Remove unused mail_index_sync_ext_init() - - It doesn't look like this was ever used for anything. The initial commit - used only mail_index_sync_ext_init_new(). - -M src/lib-index/mail-index-sync-ext.c -M src/lib-index/mail-index-sync-private.h - -2021-07-29 11:37:23 +0300 Timo Sirainen (d7dc02bbb0) - - zlib: Handle empty zlib_save_level the same as if it doesn't exist - - -M src/plugins/zlib/zlib-plugin.c - -2021-07-29 11:29:37 +0300 Timo Sirainen (42457ff2eb) - - zlib: Fix crash when zlib_save_level is set, but zlib_save is unset - - -M src/plugins/zlib/zlib-plugin.c - -2021-10-04 11:14:04 +0100 Siavash Tavakoli (4cd6999dd5) - - driver-pgsql: Fix error leak - - -M src/lib-sql/driver-pgsql.c - -2021-10-04 12:37:11 +0200 Timo Sirainen (1e56bbb41b) - - lib-compression: ostream-zlib - Fix non-blocking gz header write - - Broken by 373dc6a93da1f6a0ad0c80dbb72566c2b3a295f2 - -M src/lib-compression/ostream-zlib.c - -2021-08-03 20:38:13 +0300 Timo Sirainen (1efd4a1765) - - lib-storage: mailbox_get_expunge*() - Fix assert-crash on index corruption - - This happened in the very unlikely situation that indexes became corrupted - between two mail_transaction_log_view_set() calls. - - Fixes: Panic: file mailbox-get.c: line 112 (mailbox_get_expunges_init): - assertion failed: (ret != 0) - -M src/lib-storage/mailbox-get.c - -2021-10-01 15:21:38 +0300 Timo Sirainen (088783cdaa) - - lib: str_hash() - Ignore integer wrapping with ubsan - - ATTR_NO_SANITIZE_INTEGER was already set for other hash functions, but - forgotten for this one. - - Fixes e.g.: Error: hash.c:529:16: runtime error: unsigned integer overflow: - 4294967200 + 115 cannot be represented in type ‘unsigned int’ - -M src/lib/hash.c - -2021-09-28 00:51:03 +0200 Stephan Bosch (3c05dcfa58) - - lib: ostream-wrapper - Make sure o_stream_finish() has stream_errno != 0 - when -1 is to be returned. - - Fixes: - - Panic: file ostream.c: line 209 (o_stream_flush): assertion failed: - (stream->stream_errno != 0) - -M src/lib/ostream-wrapper.c - -2021-10-01 10:42:16 +0100 Siavash Tavakoli (a1729a72e8) - - driver-cassandra: Fix prepared statement pool leak - - -M src/lib-sql/driver-cassandra.c - -2021-09-30 18:42:08 +0300 sergey.kitov (ebd5223c8d) - - stats: Remove metric from stats dump, when removing dynamically. - - -M src/stats/stats-metrics.c - -2020-09-23 23:35:53 +0200 Stephan Bosch (d16a69f7e2) - - lib-ssl-iostream: istream-openssl - Remove assert() in i_stream_ssl_read(). - - -M src/lib-ssl-iostream/istream-openssl.c - -2020-09-23 23:35:30 +0200 Stephan Bosch (50b7231aab) - - lib-ssl-iostream: iostream-openssl - Allow plain_input buffer to remain - filled in openssl_iostream_bio_input(). - - -M src/lib-ssl-iostream/iostream-openssl.c - -2020-09-23 22:02:41 +0200 Stephan Bosch (b4d477a50b) - - lib-ssl-iostream: iostream-openssl - Use o_stream_uncork_flush() to uncork - the plain output. - - This flushes the stream after uncorking it, fixing I/O hang with nested SSL - layers. - -M src/lib-ssl-iostream/iostream-openssl.c - -2021-09-30 00:17:47 +0200 Stephan Bosch (f42c0637ac) - - lib-ssl-iostream: iostream-openssl - Return immediately from - openssl_iostream_bio_output() upon error. - - -M src/lib-ssl-iostream/iostream-openssl.c - -2020-09-23 23:58:12 +0200 Stephan Bosch (3200480ecf) - - lib-ssl-iostream: iostream-openssl - Move error handling out of - openssl_iostream_bio_output(). - - Makes the next commit clearer. - -M src/lib-ssl-iostream/iostream-openssl.c - -2021-04-16 13:55:06 +0200 Stephan Bosch (aa8a39557b) - - lib-ssl-iostream: test-iostream-ssl - Make finishing the ssl streams more - robust. - - Fixes: - - Panic: file ostream.c: line 59 (o_stream_close_full): assertion failed: - (stream->real_stream->error_handling_disabled) - -M src/lib-ssl-iostream/test-iostream-ssl.c - -2021-04-16 18:18:07 +0200 Stephan Bosch (2816a2525b) - - lib-ssl-iostream: test-iostream-ssl - Properly mark client endpoints. - - -M src/lib-ssl-iostream/test-iostream-ssl.c - -2021-04-16 18:21:01 +0200 Stephan Bosch (7738cb723b) - - lib-ssl-iostream: test-iostream-ssl - Move small_packets_flush_callback(). - - -M src/lib-ssl-iostream/test-iostream-ssl.c - -2021-04-16 18:19:55 +0200 Stephan Bosch (3e53f67a65) - - lib-ssl-iostream: test-iostream-ssl - Move bufsize_flush_callback(). - - -M src/lib-ssl-iostream/test-iostream-ssl.c - -2021-04-16 14:52:34 +0200 Stephan Bosch (0f4a532bd1) - - lib-ssl-iostream: ostream-openssl - Call SSL_shutdown() once stream is - finished and buffer is empty. - - -M src/lib-ssl-iostream/ostream-openssl.c - -2021-04-16 12:31:13 +0200 Stephan Bosch (46970690e9) - - lib: istream - Remove try_alloc_limit. - - -M src/lib/istream-private.h -M src/lib/istream.c - -2021-04-16 12:27:48 +0200 Stephan Bosch (b44c5504ff) - - lib-ssl-iostream - iostream-openssl - Use i_stream_read_limited(). - - -M src/lib-ssl-iostream/iostream-openssl.c - -2021-04-16 12:25:43 +0200 Stephan Bosch (377f1cbe88) - - lib: istream - Add i_stream_read_limited(). - - -M src/lib/istream-private.h -M src/lib/istream.c -M src/lib/istream.h - -2020-09-27 15:19:05 +0200 Stephan Bosch (00df102e56) - - lib-ssl-iostream: istream-openssl - Simplify i_stream_ssl_read(). - - Avoid using a stack buffer. Just fill the stream to the maximum buffer size. - -M src/lib-ssl-iostream/istream-openssl.c - -2021-04-16 18:08:50 +0200 Stephan Bosch (b4a2da442d) - - lib-ssl-iostream: iostream-openssl - Add OPENSSL_IOSTREAM_SYNC_TYPE_NONE. - - This is useful for calling openssl_iostream_handle_error() while avoiding - processing more I/O. - -M src/lib-ssl-iostream/iostream-openssl.c -M src/lib-ssl-iostream/iostream-openssl.h - -2021-09-24 19:16:43 +0300 Timo Sirainen (8a9d1aa7b6) - - lib-ssl-iostream: Fix error handling if parent iostream fails - - Expand out and remove openssl_iostream_more(). It could have returned errors - to two different locations depending on whether the failure came from SSL - handshake or parent iostream. - -M src/lib-ssl-iostream/iostream-openssl.c -M src/lib-ssl-iostream/iostream-openssl.h -M src/lib-ssl-iostream/istream-openssl.c -M src/lib-ssl-iostream/ostream-openssl.c - -2021-09-24 19:15:22 +0300 Timo Sirainen (75a6da0a1e) - - lib-ssl-iostream: ostream-ssl - Add ssl_io helper variable - - -M src/lib-ssl-iostream/ostream-openssl.c - -2021-09-24 18:59:29 +0300 Timo Sirainen (6289334552) - - lib: o_stream_copy_error_from_parent() - Assert-crash if source stream_errno - is 0 - - This can help debug situations where error is missing. - -M src/lib/ostream.c - -2021-09-24 18:59:21 +0300 Timo Sirainen (8f22f0ab6e) - - global: Call o_stream_copy_error_from_parent() only on errors - - -M src/lib-http/http-transfer-chunked.c -M src/lib-mail/ostream-dot.c - -2021-09-24 18:58:02 +0300 Timo Sirainen (373dc6a93d) - - lib-compression: ostream-zlib - Fix sending partial gz header to parent - ostream - - This practically wouldn't happen. - -M src/lib-compression/ostream-zlib.c - -2021-09-30 15:38:23 +0200 Timo Sirainen (1545fadb3d) - - lib-http: test-http-client-errors - Revert previous retry changes - - The real bug is found now, so the previous fix attempt isn't useful. Reverts - ed1264368a5435c3080871380156978a8951fe26 - -M src/lib-http/test-http-client-errors.c - -2021-09-30 15:32:24 +0200 Timo Sirainen (37f4f27114) - - lib-http: test-http-client-errors - Reset USR1 notification signal between - tests - - The "connection refused" test already set the signal as being received, - which caused the "connection refused backoff" test to randomly fail since it - thought the signal was immediately received. - -M src/lib-http/test-http-client-errors.c - -2021-09-25 00:48:12 +0200 Stephan Bosch (ddb173aa3d) - - lib: istream-concat - Prevent inheriting SIZE_MAX max buffer size from - parent streams. - - Only when all parent streams have SIZE_MAX for max buffer size, the concat - stream will follow suit. - -M src/lib/istream-concat.c - -2021-09-27 20:35:19 +0300 Timo Sirainen (f5c1baf2cd) - - lib-storage: Add mailbox_list.disable_rebuild_on_corruption - - If set, don't try to rebuild the mailbox list index even if corruption is - detected. - -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/mailbox-list-private.h - -2021-09-24 17:59:06 +0300 Timo Sirainen (462d9b6ea6) - - lib-dcrypt: Fix istream-decrypt snapshotting - - This is mostly copy&pasted from istream-header-filter. - -M src/lib-dcrypt/istream-decrypt.c -M src/lib-dcrypt/test-stream.c - -2021-09-23 18:02:17 -0600 Michael M Slusarz (9bf48f34bf) - - lib-storage: hide mail_cache_min_mail_count setting - - -M src/lib-storage/mail-storage-settings.c - -2021-09-26 01:16:53 +0300 Timo Sirainen (ccb0579b3b) - - master: Avoid leaking master client fds to forked processes - - -M src/master/master-client.c - -2021-09-29 14:58:22 +0300 sergey.kitov (231105a825) - - stats: Improve error message for doveadm stats add. - - -M src/stats/client-reader.c - -2021-09-29 14:57:34 +0300 sergey.kitov (22bc379024) - - stats: Check if metric already exists when adding dynamically. - - -M src/stats/stats-metrics.c - -2021-09-28 15:35:05 +0300 Timo Sirainen (1ad80be9a6) - - driver-pglsqlpool: Implement sql_get_flags() reliably - - Try to use one of the already connected databases. If none were found, - create a new database. - -M src/lib-sql/driver-sqlpool.c - -2021-09-28 15:32:56 +0300 Timo Sirainen (a55f18c67f) - - driver-pgsql: Implement sql_get_flags() reliably - - Some of the flags aren't known until server is connected to, so wait for the - connect to finish if necessary before returning the flags. - -M src/lib-sql/driver-pgsql.c - -2021-09-28 15:33:47 +0300 Timo Sirainen (a90663e588) - - driver-sqlpool: Implement sql_wait() - - -M src/lib-sql/driver-sqlpool.c - -2021-09-27 11:59:09 +0100 Siavash Tavakoli (8146312f9c) - - driver-cassandra: Add wait() implementation - - -M src/lib-sql/driver-cassandra.c - -2021-09-27 11:58:21 +0100 Siavash Tavakoli (8981a97398) - - driver-pgsql: Add wait() implementation - - -M src/lib-sql/driver-pgsql.c - -2021-09-27 11:48:34 +0100 Siavash Tavakoli (beca893733) - - dict-sql: Add "sql_dict_wait()" implementation - - lib-sql now has sql_wait(). - -M src/lib-dict-backend/dict-sql.c - -2021-09-27 11:46:07 +0100 Siavash Tavakoli (3e717dd730) - - lib-sql: Add "wait" vfunc - - To be used in backends that support async operations. On deinit dicts should - wait for results and then exit. - -M src/lib-sql/sql-api-private.h -M src/lib-sql/sql-api.c -M src/lib-sql/sql-api.h - -2021-09-27 19:43:54 +0100 Siavash Tavakoli (d5bf78e2da) - - driver-pgsql: Keep a list of pending query results - - To be used in wait() to determine if there are pending operations. - -M src/lib-sql/driver-pgsql.c - -2021-09-22 20:57:06 +0300 Timo Sirainen (a660f544ea) - - dict: Wait for all dicts to finish pending operations at shutdown - - This also changes the dict process to exit cleanly instead of early via - lib_exit(). - -M src/dict/dict-init-cache.c -M src/dict/dict-init-cache.h -M src/dict/main.c - -2019-07-11 12:05:37 +0300 Timo Sirainen (d571a13586) - - dict: Unref dict connection immediately when connection is destroyed - - The delayed unrefing is needed when calling from dict command callbacks to - avoid calling dict_deinit() too early. But the connection's destroy() vfunc - can't be called directly from dict command callbacks, so there's no need to - add further delays. Especially when this happens at deinit where there is no - possibility of calling the delayed callback anymore. - -M src/dict/dict-connection.c - -2021-09-27 11:42:07 +0100 Siavash Tavakoli (60f20b00b9) - - driver-pgsql: Fix escaped blob prefix - - Escaped strings must be prefixed with double backslash. - -M src/lib-sql/driver-pgsql.c - -2021-09-27 11:35:38 +0100 Siavash Tavakoli (103a99d531) - - driver-pgsql: Fix assert-crash when using binary fields - - array_idx_modifiable() changed behavior in - 1d4e5de8414ed93d1c810b30a91ad83d6d954861 and doesn't allocate space anymore. - - Fixes: Panic: file array.c: line 10 (array_idx_modifiable_i): assertion - failed: (idx < array->buffer->used / array->element_size) - -M src/lib-sql/driver-pgsql.c - -2021-09-29 18:04:37 +0200 Timo Sirainen (f318731eac) - - doveadm mail batch: Fix run() return value on errors - - The function always returned 0, even when there was an error. This - practically doesn't fix anything, but makes it work the way it was intended. - It also makes scan-build happier. - - Broken by fd4360e30b695e596a5081a6080152188a12852a - -M src/doveadm/doveadm-mail-batch.c - -2021-09-22 19:34:32 +0300 Timo Sirainen (d10bc56592) - - mdbox: Add assert to help static analyzers - - mdbox_sync_begin() can return 0 with sync_ctx=NULL, but not with the - parameters given here. - -M src/lib-storage/index/dbox-multi/mdbox-save.c - -2021-09-22 19:02:24 +0300 Timo Sirainen (67c96d89f3) - - lib-smtp: smtp_client_transaction_get_state_name() - Fix return value - - Only the "new" state was returned correctly, while everything else was - wrong. This didn't really cause problems, because it was used only by - imaptest. - -M src/lib-smtp/smtp-client-transaction.c -M src/lib-smtp/smtp-client-transaction.h - -2021-09-22 18:46:39 +0300 Timo Sirainen (37ab021b41) - - lib: Ignore COMPILE_ERROR_IF_TRUE() with --enable-static-checker - - -M src/lib/macros.h - -2021-09-28 01:24:24 +0300 Timo Sirainen (b178d0792b) - - lib: container_of() - Always return NULL if input pointer is NULL - - -M src/lib/macros.h - -2021-09-22 18:40:11 +0300 Timo Sirainen (71d3f9a4c0) - - lib: container_of() - Avoid uintptr_t - - Using uintptr_t confused Coverity, but char* works fine. - -M src/lib/macros.h - -2021-09-29 00:21:17 +0300 Timo Sirainen (e47c4a3ff7) - - indexer: Abort requests if indexer-worker disconnects unexpectedly - - -M src/indexer/worker-connection.c - -2021-04-19 21:43:17 +0300 Timo Sirainen (1e14dd0f49) - - lib-storage: Add reason_code=mail:header_fields - - -M src/lib-storage/index/index-mail-headers.c - -2021-04-19 21:38:35 +0300 Timo Sirainen (034597d2fe) - - lib-storage: Add more specific mail:* reason_codes in when prefetching - - Added: - * mail:attachment_keywords - * mail:date - * mail:snippet - * mail:mime_parts - * mail:imap_envelope - * mail:imap_bodystructure - -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h - -2021-03-11 23:38:01 +0200 Timo Sirainen (88c2ee58f1) - - fts: Add reason_code=fts:index and fts:lookup - - Note that fts:index won't be used for email opening events, because the - emails are already opened by the indexer precache searching code due to - wanted_fields. - -M src/plugins/fts/fts-search.c -M src/plugins/fts/fts-storage.c - -2021-09-09 16:45:23 +0300 Timo Sirainen (1279e1bd00) - - lib-storage: Add reason_code=mailbox:* - - Added: - * mailbox:create - * mailbox:update - * mailbox:delete - * mailbox:rename - * mailbox:subscribe - * mailbox:unsubscribe - * mailbox:attributes_changed - -M src/lib-storage/mail-storage.c - -2021-03-17 15:15:00 +0200 Timo Sirainen (87cd6570a1) - - lib-storage: Add reason_code=mailbox:search - - -M src/lib-storage/index/index-search.c - -2021-03-17 14:49:24 +0200 Timo Sirainen (858da66efb) - - lib-storage: Add reason_code=mailbox:thread - - This is split into a few different locations in the code. - -M src/lib-storage/index/index-thread-finish.c -M src/lib-storage/index/index-thread.c - -2021-03-17 17:48:57 +0200 Timo Sirainen (eedf4a3f22) - - lib-storage: Add reason_code=mailbox:vsize* - - * mailbox:vsize - mailbox vsize is asked - * mailbox:vsize_update - mailbox vsize is updated (append/expunge) - -M src/lib-storage/index/index-mailbox-size.c - -2021-03-17 17:48:33 +0200 Timo Sirainen (d4b3fcee59) - - lib-storage: Add reason_code=mailbox:sort - - -M src/lib-storage/index/index-sort.c - -2021-03-11 19:43:22 +0200 Timo Sirainen (ce517f8323) - - lib-storage: Add reason_code=mail:* - - * mail:virtual_size - * mail:physical_size - * mail:snippet - * mail:prefetch - * mail:mime_parts - * mail:date - * mail:received_date - * mail:save_date - * mail:storage_id - * mail:pop3_uidl - * mail:pop3_order - * mail:guid - * mail:refcount - * mail:refcount_id - -M src/lib-storage/index/index-mail.c -M src/lib-storage/mail.c - -2021-03-11 19:07:10 +0200 Timo Sirainen (962efef5f7) - - lib-storage: Remove mailbox_set_reason() - - Event reason_codes should be used instead. Keep the "Mailbox opened" debug - message mainly because it's often used in CI tests. - -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c -M src/lib-storage/mail-storage.h - -2021-03-11 19:06:00 +0200 Timo Sirainen (f1db5fbfb3) - - global: Remove mailbox_set_reason() calls - - These ones that are left are all rather unnecessary. - -M src/lib-imap-storage/imap-metadata.c -M src/lib-imap-storage/imap-msgpart-url.c -M src/lib-imap-urlauth/imap-urlauth-backend.c -M src/lib-lda/mail-deliver.c -M src/lib-storage/mail-storage.c -M src/lmtp/lmtp-local.c -M src/plugins/quota/quota-status.c -M src/plugins/virtual/virtual-storage.c - -2021-03-17 17:40:46 +0200 Timo Sirainen (d2ab26be60) - - pop3: Add reason_code=pop3:cmd_ to events - - -M src/pop3/pop3-client.c - -2021-03-11 19:04:36 +0200 Timo Sirainen (641d0bd3bd) - - pop3: Replace mailbox_set_reason() with reason_code=pop3:initialize - - -M src/pop3/main.c -M src/pop3/pop3-client.c - -2021-03-11 17:29:59 +0200 Timo Sirainen (bf1b124e0d) - - virtual: Replace mailbox_set_reason() with reason_code=virtual:config_read - - -M src/plugins/virtual/virtual-config.c - -2021-03-11 17:27:54 +0200 Timo Sirainen (d31e44e66c) - - trash: Replace mailbox_set_reason() with reason_code=trash:clean - - -M src/plugins/trash/trash-plugin.c - -2021-03-09 16:49:12 +0200 Timo Sirainen (459f9eeeac) - - quota: Replace mailbox_set_reason() with reason_code=quota:recalculate and - quota:count - - -M src/plugins/quota/quota-count.c -M src/plugins/quota/quota-dict.c -M src/plugins/quota/quota-maildir.c - -2021-03-11 17:22:31 +0200 Timo Sirainen (b0d8db1bb3) - - pop3-migration: Replace mailbox_set_reason() with - reason_code=pop3_migration:uidl_sync - - -M src/plugins/pop3-migration/pop3-migration-plugin.c - -2021-03-11 17:03:49 +0200 Timo Sirainen (d2af1066c4) - - lazy_expunge: Replace mailbox_set_reason() with - reason_code=lazy_expunge:expunge - - -M src/plugins/lazy-expunge/lazy-expunge-plugin.c - -2021-03-17 18:23:11 +0200 Timo Sirainen (bc85909b45) - - lazy-expunge: Split off lazy_expunge_mail_expunge_move() - - -M src/plugins/lazy-expunge/lazy-expunge-plugin.c - -2021-03-11 16:56:32 +0200 Timo Sirainen (2ec30d083b) - - lib-storage: Replace mailbox_set_reason() with - reason_code=storage:autoexpunge and storage:mailbox_list_rebuild - - -M src/lib-storage/list/mail-storage-list-index-rebuild.c -M src/lib-storage/mail-autoexpunge.c - -2021-03-11 16:53:35 +0200 Timo Sirainen (a20d06d4b3) - - mdbox: Replace mailbox_set_reason() with reason_code=mdbox:rebuild - - -M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c - -2021-03-16 19:02:06 +0200 Timo Sirainen (1a30dc1b43) - - mdbox: Split off mdbox_storage_rebuild_scan_prepare() - - -M src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c - -2021-03-11 15:46:11 +0200 Timo Sirainen (e3dc046996) - - indexer: Replace mailbox_set_reason() with reason_code=indexer:index_mailbox - - -M src/indexer/master-connection.c - -2021-03-17 17:28:03 +0200 Timo Sirainen (bb1df67719) - - imap: Add reason_code=imap:fetch_* - - The main reason for these is to allow understanding why mails are being - opened. The possibilities: - - * imap:fetch_body - * imap:fetch_header - * imap:fetch_header_fields - * imap:fetch_bodystructure - * imap:fetch_size - -M src/imap/cmd-fetch.c -M src/imap/imap-fetch-body.c -M src/imap/imap-fetch.h - -2021-03-11 15:44:47 +0200 Timo Sirainen (b41063291e) - - imap: Remove mailbox_set_reason() calls - - They are now unnecessary because of the new reason_code field. - -M src/imap/cmd-create.c -M src/imap/cmd-delete.c -M src/imap/cmd-getmetadata.c -M src/imap/cmd-notify.c -M src/imap/cmd-rename.c -M src/imap/cmd-resetkey.c -M src/imap/cmd-select.c -M src/imap/cmd-setmetadata.c -M src/imap/cmd-subscribe.c -M src/imap/imap-commands-util.c -M src/imap/imap-notify.c -M src/imap/imap-state.c -M src/imap/imap-status.c - -2021-03-11 15:44:10 +0200 Timo Sirainen (61685f7b7a) - - imap: Add reason_code=imap:unhibernate for events during unhibernation. - - -M src/imap/imap-master-client.c - -2021-03-11 15:39:09 +0200 Timo Sirainen (4eb305cccc) - - imap: Add reason_code=imap:notify_update for events during NOTIFY updates - - -M src/imap/imap-notify.c - -2021-03-09 16:37:18 +0200 Timo Sirainen (ad5ef653eb) - - imap: Add and use client_command_context.global_event - - This way all the (potentially large) IMAP command parameters won't be - included in all the events. This change might be reverted in the future if - the performance worries go away. - - The global event also contains reason_code=imap:cmd_ field. - -M src/imap/cmd-append.c -M src/imap/cmd-create.c -M src/imap/cmd-delete.c -M src/imap/cmd-getmetadata.c -M src/imap/cmd-rename.c -M src/imap/cmd-resetkey.c -M src/imap/cmd-select.c -M src/imap/cmd-setmetadata.c -M src/imap/cmd-status.c -M src/imap/cmd-subscribe.c -M src/imap/imap-client.c -M src/imap/imap-client.h -M src/imap/imap-commands-util.c -M src/imap/imap-commands.c - -2021-03-11 15:26:56 +0200 Timo Sirainen (cfc7b74425) - - doveadm: Remove mailbox_set_reason() calls - - They are now unnecessary because of the new reason_code field. - -M src/doveadm/doveadm-mail-copymove.c -M src/doveadm/doveadm-mail-import.c -M src/doveadm/doveadm-mail-index.c -M src/doveadm/doveadm-mail-iter.c -M src/doveadm/doveadm-mail-mailbox-metadata.c -M src/doveadm/doveadm-mail-mailbox-status.c -M src/doveadm/doveadm-mail-mailbox.c -M src/doveadm/doveadm-mail-save.c -M src/doveadm/doveadm-mail.c - -2021-03-11 15:26:09 +0200 Timo Sirainen (fd4360e30b) - - doveadm: Add reason_code=doveadm:cmd_ to events - - -M src/doveadm/doveadm-mail-batch.c -M src/doveadm/doveadm-mail.c - -2021-04-20 00:05:23 +0300 Timo Sirainen (82f0d7bf81) - - dsync: ioloop context shouldn't deactivate after ioloop has run - - Normally that is wanted, but dsync reuses the same ioloop as the parent - doveadm connection, so after the inner io_loop_run() it's still running in - the doveadm connection's io callback. - - Without this all the global events will be popped out, and the following - global event change commit will cause crashes. - -M src/doveadm/doveadm-dsync.c - -2021-04-20 00:28:02 +0300 Timo Sirainen (a9ffa98ac7) - - doveadm copy: Don't permanently activate source user's ioloop - - -M src/doveadm/doveadm-mail-copymove.c - -2021-04-20 00:24:39 +0300 Timo Sirainen (23c1983be1) - - doveadm import: Don't permanently activate source user's ioloop - - After the source user is initialized, the original user's ioloop should be - activated back. - -M src/doveadm/doveadm-mail-import.c - -2021-03-17 18:48:37 +0200 Timo Sirainen (19779828ea) - - submission: Add reason_code=submission:cmd_ - - -M src/submission-login/client.c -M src/submission/main.c - -2021-03-17 18:48:24 +0200 Timo Sirainen (ebd660c594) - - lmtp: Add reason_code=lmtp:cmd_ - - -M src/lmtp/main.c - -2021-03-17 18:44:09 +0200 Timo Sirainen (750f14dae0) - - lib-smtp: Add reason_code=:cmd_* - - This requires caller to set smtp_server_settings.reason_code_module. For now - only cmd_mail, cmd_rcpt and cmd_data are implemented. The other commands are - likely not very useful. - -M src/lib-smtp/smtp-server-cmd-data.c -M src/lib-smtp/smtp-server-cmd-mail.c -M src/lib-smtp/smtp-server-cmd-rcpt.c -M src/lib-smtp/smtp-server-connection.c -M src/lib-smtp/smtp-server-private.h -M src/lib-smtp/smtp-server.c -M src/lib-smtp/smtp-server.h - -2021-04-22 20:27:45 +0300 Timo Sirainen (7b6e14ce5e) - - lib-http: http-client-request - Preserve global events' reason_code in - request events - - Since HTTP requests are asynchronous, it's possible that the global events - go away before the HTTP request is finished. This way the reason_code will - be preserved in http_request_finished event. - -M src/lib-http/http-client-request.c - -2021-03-11 17:54:18 +0200 Timo Sirainen (fbcb1dafbf) - - lib: Add event_reason_code() for building reason codes easily - - -M src/lib/lib-event.c -M src/lib/lib-event.h -M src/lib/test-lib-event.c -M src/lib/test-lib.inc - -2021-03-09 16:45:20 +0200 Timo Sirainen (c0a3b73732) - - lib: Add event_reason_begin/end() API - - This can be used to easily add reason_code to all events being emitted - within the begin..end calls. The reasons can also be nested. For example: - - reason = event_reason_begin("reason1"); - // ... reason2 = event_reason_begin("reason2"); - // .. event_reason_end(&reason2); event_reason_end(&reason); - - This results in having reason_code=["reason1", "reason2"] for all events - emitted while reason2 exists. - -M src/lib/lib-event.c -M src/lib/lib-event.h - -2021-04-21 16:55:57 +0300 Timo Sirainen (2bba7f1f34) - - lib: event_pop_global() - Assert-crash if trying to pop ioloop context's - global root event - - This makes it easier to debug bugs. - -M src/lib/ioloop-private.h -M src/lib/ioloop.c -M src/lib/lib-event.c - -2021-03-11 02:19:37 +0200 Timo Sirainen (c633d08bf2) - - lib: Push/pop global event stack automatically when ioloop contexts are - switched - - -M src/lib/ioloop-private.h -M src/lib/ioloop.c -M src/lib/lib-event.h -M src/lib/test-ioloop.c - -2021-04-21 17:11:54 +0300 Timo Sirainen (75285a3169) - - lib-storage: mail_storage_service_next*() - On failure don't leave user's io - context activated - - -M src/lib-storage/mail-storage-service.c - -2021-03-11 02:18:55 +0200 Timo Sirainen (340e961cfe) - - lib-storage: Remove global event stack tracking - - This will be implemented by ioloop contexts directly in the next commit. - -M src/lib-storage/mail-storage-service.c - -2021-03-09 16:33:15 +0200 Timo Sirainen (c822238604) - - lib: Fix global events to actually work - - Also add comments to clarify how exactly it works. - -M src/lib/event-filter.c -M src/lib/lib-event.c -M src/lib/lib-event.h -M src/lib/test-event-filter.c - -2021-04-20 00:08:57 +0300 Timo Sirainen (16fca42dec) - - lib: event_push_global() - Assert that event is not NULL - - -M src/lib/lib-event.c - -2021-09-09 13:46:24 +0300 Timo Sirainen (e2995d85c2) - - lib-master: Fix sending events recursively - - The event sending itself may recursively trigger more events (e.g. - data_stack_grow). The previous BEGINs must have been flushed by that time or - the recursive events might be pointing to event IDs that haven't even been - sent to the stats process yet. - - Fixes: stats: Error: Client sent invalid input for UPDATE: Unknown event ID - -M src/lib-master/stats-client.c - -2021-03-09 16:29:49 +0200 Timo Sirainen (9d93a24824) - - lib-master, stats: Send global events to stats process - - -M src/lib-master/stats-client.c -M src/lib-master/test-event-stats.c -M src/stats/client-writer.c -M src/stats/test-client-writer.c - -2021-03-19 13:13:45 +0200 Timo Sirainen (0a57bd650e) - - stats: Support group_by for string lists - - -M src/stats/stats-metrics.c - -2021-01-27 13:10:07 +0200 Aki Tuomi (5f8775fc40) - - stats: Support exporting event string lists - - -M src/stats/event-exporter-fmt-json.c -M src/stats/event-exporter-fmt-tab-text.c - -2021-03-19 13:02:54 +0200 Timo Sirainen (775ddf19ed) - - stats: Split off stats_metric_get_sub_metric() - - -M src/stats/stats-metrics.c - -2021-03-19 13:05:35 +0200 Timo Sirainen (a1623b5e44) - - stats: Rename stats_metric_get_sub_metric() to - stats_metric_find_sub_metric() - - -M src/stats/stats-metrics.c - -2021-03-19 12:59:53 +0200 Timo Sirainen (81d50807bf) - - stats: Split off stats_metric_group_by_value_label() - - -M src/stats/stats-metrics.c - -2021-03-19 12:52:13 +0200 Timo Sirainen (add670d598) - - stats: stats_metric_group_by_*() - Add _r suffix to returned value parameter - - -M src/stats/stats-metrics.c - -2020-12-15 09:17:57 +0200 Aki Tuomi (4f752d381c) - - lib: lib-event - Add support for string lists - - Provide API to create string lists. These are particularly useful if you - need to provide list of causes for an event, such as why some mail was - opened. - -M src/lib/Makefile.am -M src/lib/event-filter.c -M src/lib/lib-event.c -M src/lib/lib-event.h -M src/lib/test-event-filter.c -M src/lib/test-event-flatten.c -A src/lib/test-lib-event.c -M src/lib/test-lib.inc -M src/stats/event-exporter-fmt-json.c -M src/stats/event-exporter-fmt-tab-text.c -M src/stats/stats-metrics.c - -2021-08-23 17:21:58 +0300 Timo Sirainen (9a4d33f893) - - lib: test-event-filter - Improve "override parent fields" test - - -M src/lib/test-event-filter.c - -2021-08-23 17:15:47 +0300 Timo Sirainen (e670cb1468) - - lib: test-event-filter - Fix parent/child events to actually be parent/child - - -M src/lib/test-event-filter.c - -2021-03-16 19:22:25 +0200 Timo Sirainen (1411aaf4a4) - - lib: Split off event_import_arg() - - -M src/lib/lib-event.c - -2021-03-16 19:19:43 +0200 Timo Sirainen (bb602382b9) - - lib: Split off event_import_field() - - -M src/lib/lib-event.c - -2021-09-24 18:21:29 +0300 Timo Sirainen (a12796fd66) - - lib-index: Allow ignoring index corruption checks with --enable-devel-checks - - If DEBUG_IGNORE_INDEX_CORRUPTION environment is set, don't check if index - contains internal corruption. This is useful for CI tests that intentionally - test corrupted indexes. - -M src/lib-index/mail-index-sync-update.c - -2021-09-28 00:28:35 +0100 Siavash Tavakoli (c92afe67a1) - - lib-http: http-server: Add request events - - Adds http_server_request_started and http_server_request_finished. - -M src/lib-http/http-server-connection.c -M src/lib-http/http-server-private.h -M src/lib-http/http-server-request.c - -2021-08-26 13:13:55 +0100 Siavash Tavakoli (12229f5e61) - - lib-http: http-server-request - Add request_id and status_code fields to - event - - -M src/lib-http/http-server-request.c -M src/lib-http/http-server-response.c - -2021-09-28 15:35:21 +0300 sergey.kitov (e8d9838485) - - stats: Use duplicated metric settings in stats_metrics_add_dynamic(). - - -M src/stats/stats-metrics.c - -2021-09-15 14:44:42 +0200 Markus Valentin (b04cb5ea03) - - imapc: Add MAIL_STORAGE_CLASS_FLAG_SECONDARY_INDEX storage class flag - - Add SECONDARY_INDEX storage class flag to enable storing shared private - indexes in obox user root bundle. - -M src/lib-storage/index/imapc/imapc-storage.c - -2021-09-24 17:33:38 +0300 Timo Sirainen (e399436c15) - - lib-storage: mail_get_binary_stream() - Add comment about having to unref - returned istream - - -M src/lib-storage/mail-storage.h - -2021-09-22 15:58:55 +0300 Timo Sirainen (1ce928c75f) - - lib: test-cpu-limit - Remove dead code - - No longer needed after 6d902507c24fca4f64e3e9bf7d79ae5a48281cd8 - -M src/lib/test-cpu-limit.c - -2021-09-27 11:49:05 +0300 Timo Sirainen (0a70b02bbb) - - lib: test-strfuncs - Avoid testing p_strndup() with overlong max_chars - parameter - - This ended up in memchr() call with n=SIZE_MAX-1, which sometimes doesn't - work right with old glibc versions. - - Fixes: Panic: Trying to allocate 18446744073709551615 bytes - -M src/lib/test-strfuncs.c - -2021-09-08 10:39:36 +0300 Aki Tuomi (211040d836) - - lib-mail: Add test for empty header value - - -M src/lib-mail/test-message-header-parser.c - -2021-09-02 17:10:11 +0300 Aki Tuomi (d0e0b22b6b) - - lib-mail: Limit header length to 1000 bytes - - -M src/lib-mail/message-header-parser.c -M src/lib-mail/test-message-header-parser.c - -2021-09-02 17:12:55 +0300 Aki Tuomi (44c43133a4) - - lib-mail: If message header has no colon, store it as value only - - If the header is missing :, it is not valid header. Storing it as value only - ensures it will be kept by mbox rewrite, but will not be processed as a - header. - -M src/lib-mail/message-header-parser.c -M src/lib-mail/test-message-header-parser.c -M src/plugins/pop3-migration/pop3-migration-plugin.c - -2021-09-02 16:46:19 +0300 Aki Tuomi (ac65213384) - - lib-mail: test-message-header-parser - Add NAME10, 100, 1000 macros for - testing - - -M src/lib-mail/test-message-header-parser.c - -2021-09-07 14:37:34 +0300 Aki Tuomi (0009fd1edf) - - lib: Add i_memspn() and i_memcspn() - - Binary data safe variants of strspn() and strcspn() - -M src/lib/strfuncs.c -M src/lib/strfuncs.h -M src/lib/test-strfuncs.c - -2021-09-16 13:32:37 +0200 Timo Sirainen (8af2bd8640) - - virtual: Log a debug message why backend mailbox has changed - - -M src/plugins/virtual/virtual-sync.c - -2021-09-24 10:39:43 +0200 Stephan Bosch (801405d49f) - - lib-storage: mail-duplicate - Restructure mail_duplicate_read_db_file() to - make sure fd is closed. - - Found by Coverity. - -M src/lib-storage/mail-duplicate.c - -2021-09-24 10:22:28 +0200 Stephan Bosch (99d129cd50) - - lib-storage: mail-duplicate - Fix segfault occurring upon failure to lock - and open DB file. - - Found by Coverity. - -M src/lib-storage/mail-duplicate.c - -2021-08-18 16:54:00 +0200 Timo Sirainen (26284cf6f7) - - indexer-worker: Fix event leak on error handling - - -M src/indexer/master-connection.c - -2021-07-13 04:15:14 +0200 Stephan Bosch (2d32ee8b54) - - lib-storage: mail-duplicate - Implement separate error code for deadlock. - - -M src/lib-storage/mail-duplicate.c -M src/lib-storage/mail-duplicate.h - -2021-09-16 01:49:57 +0200 Stephan Bosch (dcee43b54c) - - lib-storage: mail-duplicate - Update records from duplicate DB file after - acquirement of per-ID lock. - - The process previously holding the per-ID lock may have updated the DB. - -M src/lib-storage/mail-duplicate.c - -2021-09-17 11:11:21 +0200 Stephan Bosch (a27a97f49d) - - lib-storage: mail-duplicate - Move acquirement of dotlock for DB file into - mail_duplicate_read(). - - -M src/lib-storage/mail-duplicate.c - -2021-09-20 11:58:12 +0200 Stephan Bosch (9cb56c3b28) - - lib-storage: mail-duplicate - Implement per-ID locking. - - -M src/lib-storage/mail-duplicate.c -M src/lib-storage/mail-duplicate.h - -2021-09-17 11:16:39 +0200 Stephan Bosch (9bd8fff3b0) - - lib-storage: mail-duplicate - Allow calling mail_duplicate_read() more than - once in a transaction. - - -M src/lib-storage/mail-duplicate.c - -2021-07-13 23:22:52 +0200 Stephan Bosch (b3d183d81d) - - lib-storage: mail-duplicate - Record an entry for both checked and marked - IDs. - - Still only write the marked IDs to the file. The in-memory record is needed - for the locking introduced in a later commit. - -M src/lib-storage/mail-duplicate.c - -2021-07-13 05:03:02 +0200 Stephan Bosch (711f05f3d1) - - lib-storage: mail-duplicate - Add debug messages for transaction. - - -M src/lib-storage/mail-duplicate.c - -2021-07-13 05:07:39 +0200 Stephan Bosch (4809e7e1cd) - - lib-storage: mail-duplicate - Add debug messages for database. - - -M src/lib-storage/mail-duplicate.c - -2021-07-13 04:40:24 +0200 Stephan Bosch (70af5522c6) - - lib-storage: mail-duplicate - Add event to transaction object. - - -M src/lib-storage/mail-duplicate.c - -2021-07-13 04:53:11 +0200 Stephan Bosch (4fe7f887a6) - - lib-storage: mail-duplicate - Add event to database object. - - -M src/lib-storage/mail-duplicate.c - -2021-06-08 03:51:10 +0200 Stephan Bosch (63553ff976) - - lib-storage: mail-duplicate - Restructure API to make it transaction-based. - - -M src/lib-storage/mail-duplicate.c -M src/lib-storage/mail-duplicate.h - -2021-07-13 04:03:42 +0200 Stephan Bosch (f786488b23) - - lib-storage: mail-duplicate - Change mail_duplicate_check() return type from - bool to enum. - - -M src/lib-storage/mail-duplicate.c -M src/lib-storage/mail-duplicate.h - -2021-09-17 11:04:55 +0200 Stephan Bosch (90400db2d6) - - lib-storage: Reformat mail-duplicate.c. - - -M src/lib-storage/mail-duplicate.c - -2021-08-07 15:43:35 +0200 Stephan Bosch (8bfdede141) - - lib-storage: mail-user - Add mail_user_get_volatile_dir(). - - -M src/lib-storage/mail-user.c -M src/lib-storage/mail-user.h - -2021-09-20 02:45:23 +0200 Stephan Bosch (4c1cf82d61) - - lib: file-lock - Adjust API to allow EDEADLK to be used by application. - - It always caused a Dovecot panic before when returned from kernel. - -M src/lib/file-lock.c -M src/lib/file-lock.h - -2021-09-19 13:09:29 +0200 Stephan Bosch (083439ed73) - - lib: file-lock - Rework API to make it extensible. - - -M src/doveadm/dsync/dsync-brain.c -M src/lib-dict/dict-file.c -M src/lib-fs/fs-posix.c -M src/lib-index/mail-index-lock.c -M src/lib-index/mail-index-strmap.c -M src/lib-storage/index/dbox-common/dbox-file.c -M src/lib-storage/mail-storage.c -M src/lib-storage/mail-user.c -M src/lib-storage/mailbox-list.c -M src/lib/file-create-locked.c -M src/lib/file-create-locked.h -M src/lib/file-lock.c -M src/lib/file-lock.h -M src/lib/test-file-create-locked.c -M src/plugins/fts-squat/squat-trie.c -M src/plugins/fts-squat/squat-uidlist.c - -2021-09-20 02:39:08 +0200 Stephan Bosch (de5e12a160) - - lib: file-lock - Rename file_{wait,try}_lock_error() to - file_{wait,try}_lock(). - - -M src/lib-dict/dict-file.c -M src/lib-fs/fs-posix.c -M src/lib-index/mail-index-lock.c -M src/lib-index/mail-index-strmap.c -M src/lib-storage/index/dbox-common/dbox-file.c -M src/lib/file-create-locked.c -M src/lib/file-lock.c -M src/lib/file-lock.h -M src/plugins/fts-squat/squat-trie.c -M src/plugins/fts-squat/squat-uidlist.c - -2021-09-20 02:29:55 +0200 Stephan Bosch (13b9181e32) - - lib: file-lock - Remove file_{wait,try}_lock(). - - -M src/lib/file-lock.c -M src/lib/file-lock.h - -2021-09-20 02:26:46 +0200 Stephan Bosch (4dbae0e6c1) - - global: Avoid use of file_{wait,try}_lock(). - - Use the file_{wait,try}_lock_error() variants instead. - -M src/lib-dict/dict-file.c -M src/lib-fs/fs-posix.c -M src/lib-index/mail-index-lock.c -M src/lib-index/mail-index-strmap.c -M src/lib-storage/index/dbox-common/dbox-file.c -M src/plugins/fts-squat/squat-trie.c -M src/plugins/fts-squat/squat-uidlist.c - -2021-09-22 17:36:27 +0300 Timo Sirainen (ed1264368a) - - lib-http: test-http-client-errors - Allow more relaxed timeouts for connect - retry tests - - With max_connect_attempts=3 the connects come at (0ms, 100ms, 300ms). Before - the 3rd attempt a timeout at 250ms must have triggered, so there was only - 50ms time for it to trigger. This wasn't always enough when running with - valgrind on an overloaded system. Solve this by increasing - max_connect_attempts=4 so the 4th attempt comes at 700ms, giving the timeout - 450ms to trigger. - -M src/lib-http/test-http-client-errors.c - -2021-09-22 12:14:08 +0300 Timo Sirainen (4f605823a4) - - lib: Add most data_stack_grow event fields before checking if event is - wanted - - This allows using e.g. "event=data_stack_grow and alloc_size > 32768" as an - event filter. - -M src/lib/data-stack.c - -2021-09-21 18:27:29 +0300 Timo Sirainen (18e1eaf61e) - - config: Add data stack frame - - -M src/config/config-request.c - -2021-09-21 18:26:53 +0300 Timo Sirainen (9055758361) - - doveconf: Avoid unnecessary data stack use when writing output - - -M src/config/doveconf.c - -2021-09-21 18:21:54 +0300 Timo Sirainen (dab478e5f4) - - master: Create each service in its own data stack frame - - -M src/master/service.c - -2021-09-21 17:52:15 +0300 Timo Sirainen (e873c9aeae) - - doveadm: Call each run() in its own data stack frame - - -M src/doveadm/doveadm-mail.c - -2021-09-21 17:14:44 +0300 Timo Sirainen (7ac69350e3) - - dsync: Add data stack frames to mailbox loops - - -M src/doveadm/dsync/dsync-brain-mailbox-tree.c - -2021-09-21 17:10:56 +0300 Timo Sirainen (1b4f8cf6a2) - - dsync: Split off dsync_brain_recv_mailbox_tree_add() - - -M src/doveadm/dsync/dsync-brain-mailbox-tree.c - -2021-09-21 17:50:32 +0300 Timo Sirainen (d83e4f5fd2) - - acl: Code cleanup - Remove pointless while-loop - - -M src/plugins/acl/acl-shared-storage.c - -2021-09-21 17:03:45 +0300 Timo Sirainen (f78c00f1f3) - - acl: acllist rebuild - Move data stack frame to caller's loop - - -M src/plugins/acl/acl-backend-vfile-acllist.c - -2021-09-21 16:14:12 +0300 Timo Sirainen (e05b6df33a) - - acl: Add data stack frame when iterating mailboxes - - Avoids wasting memory when there are a lot of mailboxes. - -M src/plugins/acl/acl-mailbox-list.c - -2021-09-21 17:51:15 +0300 Timo Sirainen (5694b04f70) - - lib-storage: mail_user_unref() - Add data stack frame - - The deinit code paths can sometimes eat up quite a lot of data stack. - -M src/lib-storage/mail-user.c - -2021-09-22 12:49:46 +0300 Timo Sirainen (ef84b4e2f6) - - lib-storage: mailbox_create() - Add data stack frames - - -M src/lib-storage/mail-storage.c - -2021-09-22 12:48:18 +0300 Timo Sirainen (0b1dff0b1d) - - lib-storage: Add data stack frames to [service] user initialization - - Initialization steps can use a lot of data stack, so try to free it at - several checkpoints. - -M src/lib-storage/mail-storage-service.c - -2021-09-21 17:49:34 +0300 Timo Sirainen (1682263f04) - - lib-storage: Add data stack frame when iterating mailboxes to build GUID - cache - - -M src/lib-storage/mailbox-guid-cache.c - -2021-09-21 17:48:33 +0300 Timo Sirainen (8c56e2c025) - - lib-storage: mailbox_verify_*name() - Add data stack frames - - This function can eat up quite a lot of data stack. - -M src/lib-storage/mail-storage.c - -2021-09-21 17:47:41 +0300 Timo Sirainen (4908b7c139) - - lib-storage: str_contains_special_use() - Add data stack frame - - This function is called in a loop by namespace_find_special_use(). - -M src/lib-storage/mail-storage.c - -2021-09-21 16:58:13 +0300 Timo Sirainen (e22519d85d) - - lib-storage: List index rebuild - Add data stack frames - - -M src/lib-storage/list/mail-storage-list-index-rebuild.c - -2021-09-21 16:57:13 +0300 Timo Sirainen (99b9890db0) - - lib-storage: List index rebuild - Split off - mail_storage_list_index_find_indexed_mailbox() - - -M src/lib-storage/list/mail-storage-list-index-rebuild.c - -2021-09-21 16:37:13 +0300 Timo Sirainen (8b7438a3f9) - - lib-storage: Don't use data stack for mailbox list index header update - - There can be a lot of mailboxes, causing excessive data stack usage. - -M src/lib-storage/list/mailbox-list-index-sync.c - -2021-09-21 16:42:39 +0300 Timo Sirainen (bb75bc110f) - - lib-index: Don't use data stack for building index header update buffer - - The header update can be large (e.g. dovecot.list.index with many mailboxes) - and grow data stack unnecessarily. - -M src/lib-index/mail-index-transaction-export.c - -2021-09-21 17:51:50 +0300 Timo Sirainen (742053d520) - - lib: module_dir_deinit() - Call each deinit() in its own data stack frame - - -M src/lib/module-dir.c - -2021-09-21 16:15:54 +0300 Timo Sirainen (f13526d432) - - lib: test-data-stack - Make sure data stack memory usage doesn't leak - - -M src/lib/test-data-stack.c - -2021-09-21 13:38:27 +0300 Timo Sirainen (6d902507c2) - - lib: test-cpu-limit - Remove checking for CPU usage upper limit - - These tests keep randomly failing on loaded systems. It's more important - anyway to check that the minimum CPU usage is high enough than it is to - check that CPU usage isn't too high. - -M src/lib/test-cpu-limit.c - -2021-09-17 16:11:12 +0300 Timo Sirainen (ba465f3a04) - - lib: Optimize str_tabescape() - - -M src/lib/strescape.c - -2021-09-17 16:10:12 +0300 Timo Sirainen (bcfc14fae3) - - lib: Optimize p_strsplit_tabescaped() - - -M src/lib/strescape.c - -2021-09-17 16:06:17 +0300 Timo Sirainen (5615fa62db) - - lib: Optimize t_strsplit_tabescaped() - - -M src/lib/strescape.c - -2021-09-17 16:04:00 +0300 Timo Sirainen (09b2f400d2) - - lib: Optimize t_strsplit_tabescaped_inplace() - - -M src/lib/strescape.c - -2021-09-17 16:02:10 +0300 Timo Sirainen (a6b1c0114c) - - lib: Optimize t_strdup*() - - Avoid zeroing the allocated data stack memory just before it's going to be - filled with the duplicated string anyway. - -M src/lib/strfuncs.c - -2021-03-12 01:41:35 +0200 Timo Sirainen (6345e8f021) - - lib: Optimize t_str_tabunescape() - - -M src/lib/strescape.c - -2021-03-12 01:38:13 +0200 Timo Sirainen (cd63b1eeea) - - lib: Optimize str_tabunescape() - - -M src/lib/strescape.c - -2021-03-12 01:27:30 +0200 Timo Sirainen (ea636c55e4) - - lib: Optimize str_append_tabescaped() - - Avoid calling strlen() and replace for-loop with strcspn(). - -M src/lib/strescape.c - -2021-03-12 01:23:04 +0200 Timo Sirainen (1abeccbeca) - - lib: Optimize str_append_tabescaped_n() - - -M src/lib/strescape.c -M src/lib/test-strescape.c - -2021-03-12 01:19:38 +0200 Timo Sirainen (de0871dedb) - - lib: Optimize p_strndup() - - -M src/lib/strfuncs.c -M src/lib/test-lib.inc -M src/lib/test-strfuncs.c - -2021-02-11 02:56:11 +0200 Timo Sirainen (7371c1033e) - - lib: Optimize buffer_append() and buffer_append_c() - - -M src/lib/buffer.c - -2021-02-11 02:44:34 +0200 Timo Sirainen (34d72ca7f2) - - lib: buffer_create_dynamic_max() - Fix max_size handling - - Never allocate buffer larger than its max_size, since it's just wasted - memory. Also clarify that the allocation can actually go up to max_size+1 - because of str_c() NUL byte reservation. - -M src/lib/buffer.c -M src/lib/buffer.h - -2021-02-11 02:30:12 +0200 Timo Sirainen (53adac82ea) - - lib: buffer_append_zero() - Avoid unnecessary memset() - - -M src/lib/buffer.c - -2021-02-11 02:21:30 +0200 Timo Sirainen (93499cd0fd) - - lib: buffer - Add writable_size to simplify checking if buffer needs to be - grown - - -M src/lib/buffer.c -M src/lib/buffer.h - -2021-09-15 14:14:47 +0200 Timo Sirainen (4a2d3e3b30) - - lib: buffer - Replace casts with container_of() - - -M src/lib/buffer.c - -2021-08-12 10:02:55 +0300 Aki Tuomi (c513b9a13d) - - lib-storage: Add data stack frame for mailbox_copy and mailbox_move - - -M src/lib-storage/mail-storage.c - -2021-08-12 09:58:57 +0300 Aki Tuomi (d1ef929697) - - lib-storage: Add data stack frame for mailbox_rename - - -M src/lib-storage/mail-storage.c - -2021-08-12 09:58:41 +0300 Aki Tuomi (0e6e64c6c0) - - lib-storage: Add data stack frame for mailbox_delete - - -M src/lib-storage/mail-storage.c - -2021-09-16 19:32:02 +0300 Timo Sirainen (095089cd8f) - - acl: acl_backend_vfile_has_acl() - Simplify code - - -M src/plugins/acl/acl-backend-vfile.c - -2021-09-16 19:13:09 +0300 Timo Sirainen (4f765652f0) - - acl: acl_backend_vfile_has_acl() - Open mailbox to check if it exists - - This is a bit more expensive than the previous behavior, but it's done only - when creating or renaming mailboxes which are pretty rare operations. - - This fixes copying parent ACLs with obox when the parent mailbox doesn't - exist in local metacache. - -M src/plugins/acl/acl-backend-vfile.c -M src/plugins/acl/acl-backend-vfile.h - -2021-09-16 19:26:07 +0300 Timo Sirainen (3533994fd9) - - acl: acl_backend_vfile_has_acl() - Avoid unnecessary local ACL file check - - The local ACL file can't exist if its mailbox doesn't exist. - -M src/plugins/acl/acl-backend-vfile.c - -2021-09-16 19:22:41 +0300 Timo Sirainen (0f8fb686c0) - - acl: acl_backend_vfile_has_acl() - Check first if global ACL exists - - Global ACL can be checked more efficiently. If it exists, there's no need - anymore to access the local mailbox ro ACL files. - -M src/plugins/acl/acl-backend-vfile.c - -2021-09-16 18:05:04 +0300 Timo Sirainen (f63bda4db5) - - acl: Consistently determine whether ACL files are in control or mailbox - directory - - Add mail_storage_get_acl_list_path_type() that is used for it. This fixes - ACL inheritance with obox. - -M src/plugins/acl/acl-backend-vfile-acllist.c -M src/plugins/acl/acl-backend-vfile.c -M src/plugins/acl/acl-backend-vfile.h - -2021-09-06 00:49:06 +0100 Siavash Tavakoli (e1cbc8f64d) - - lib-lua: Add function for restricting global variable definition - - Add "dovecot.restrict_global_variables()" with a boolean argument to - mitigate unintended variable assignments and to prevent unnecessarily - populating global namespace. - - If enabled, variables can only be defined local to the script but global - functions are still allowed. - -M src/lib-lua/dlua-dovecot.c - -2021-09-07 15:03:37 +0100 Siavash Tavakoli (460edc6b64) - - lib-lua: Use rawget to check presence of functions in scripts - - With the restricted global variables in next commit, checking for undeclared - functions results in error. Use rawget to avoid metamethods. - -M src/lib-lua/dlua-script.c - -2021-09-17 12:26:35 +0300 Timo Sirainen (dc21a1d7e8) - - lib-lua: Build test-dict-lua only with Lua 5.3+ - - Fixes building with Lua 5.1 - -M src/lib-lua/Makefile.am - -2021-09-14 10:33:50 +0300 Aki Tuomi (85e65dd58a) - - lib-compression: bench-compress - Ensure we have both istream and ostream - constructor - - After 6e5ae5ef0f0f31acd7bde0db53980a708c81eced we have read-only compression - mechanism, that leads to null pointer crash in bench-compress. - -M src/lib-compression/bench-compression.c - -2021-09-16 20:12:13 +0300 Timo Sirainen (4ee8601abb) - - NEWS: Add news for 2.3.16 - - -M NEWS - -2021-09-10 15:52:43 +0300 Timo Sirainen (9e3df2cddd) - - lib-lua: Add test-dict-lua - - -M src/lib-lua/Makefile.am -A src/lib-lua/test-dict-lua.c - -2021-09-10 15:47:47 +0300 Timo Sirainen (39f2166fac) - - dict-lua: Change dict:lookup() to actually return nil if key isn't found - - It was previously returning an empty table, although the comment said it - should have returned nil. - -M src/lib-dict/dict-lua.c - -2021-09-10 12:49:50 +0300 Timo Sirainen (a564b607de) - - lib-dict: dict-lua - Add set_timestamp() - - -M src/lib-dict/dict-txn-lua.c - -2021-09-01 19:33:49 +0300 Timo Sirainen (53eeb81a6d) - - lib-dict: dict-lua - Add unset() - - -M src/lib-dict/dict-txn-lua.c - -2021-09-07 17:00:07 +0300 Timo Sirainen (3740bc1679) - - indexer: Remove the concept of a "busy" connection - - All the connections are busy, since they are created for a new request and - they are disconnected when the request is done. - -M src/indexer/indexer.c -M src/indexer/worker-connection.c -M src/indexer/worker-connection.h -M src/indexer/worker-pool.c -M src/indexer/worker-pool.h - -2021-09-07 16:56:16 +0300 Timo Sirainen (2f8bdc9372) - - indexer: Handle more requests whenever indexer-worker connection closes - - Previously this was done only when worker process sent a "request finished" - notification. Crashing worker processes could have caused the queue to get - stuck until more requests were added to the queue. - -M src/indexer/indexer.c -M src/indexer/worker-connection.c -M src/indexer/worker-connection.h -M src/indexer/worker-pool.c -M src/indexer/worker-pool.h - -2021-09-07 16:52:40 +0300 Timo Sirainen (61ca1eb1b8) - - indexer: Disconnect from worker after each request - - service_count won't be tracked correctly otherwise. - -M src/indexer/worker-connection.c - -2021-09-07 15:47:23 +0300 Timo Sirainen (9718957b84) - - indexer: Fix tracking indexer-worker's process_limit - - After recent changes, the process_limit was too often thought to be 1. - -M src/indexer/worker-connection.c -M src/indexer/worker-connection.h -M src/indexer/worker-pool.c - -2021-08-31 12:14:15 +0300 Timo Sirainen (4018f44337) - - indexer: Change status callback to take struct indexer_request parameter - - -M src/indexer/indexer.c -M src/indexer/indexer.h -M src/indexer/worker-connection.c -M src/indexer/worker-connection.h - -2021-08-31 12:12:49 +0300 Timo Sirainen (b1c4f2b882) - - indexer: Don't free worker_connection too early - - There's no need for the status callback anymore to free the connection. It - will be tracked automatically. - -M src/indexer/indexer.c -M src/indexer/worker-connection.c -M src/indexer/worker-connection.h -M src/indexer/worker-pool.c -M src/indexer/worker-pool.h - -2021-08-31 12:08:32 +0300 Timo Sirainen (a15eb469aa) - - indexer: Use a separate indexer_queue_callback_t type for indexer-queue - callback - - -M src/indexer/indexer-queue.c -M src/indexer/indexer-queue.h - -2021-09-14 15:33:50 +0300 sergey.kitov (e7a3c48390) - - lib: Remove connect_finished_time field from connection event. - - -M src/lib/connection.c - -2021-09-10 19:00:09 +0300 Timo Sirainen (da3bc6ea23) - - lib: ENUM_NEGATE() - Disable runtime sizeof() check with STATIC_CHECKER - - This is to avoid "Dangerous variable-length array (VLA) declaration" errors - with clang 12 scan-build, which happen because scan-build keeps thinking - that the enums can become larger than 2147483647. - -M src/lib/macros.h - -2021-08-31 15:44:20 +0300 Aki Tuomi (4826b08c47) - - doveadm: Flush data to server client asynchronously - - -M src/doveadm/doveadm-print-server.c - -2021-07-13 13:32:09 +0200 Markus Valentin (d89e8a5c3c) - - virtual: Add storage flag for secondary index - - -M src/plugins/virtual/virtual-storage.c - -2021-07-13 13:28:43 +0200 Markus Valentin (69ddbe6dd0) - - lib-storage: Add storage_class_flag for secondary index - - -M src/lib-storage/mail-storage-private.h - -2021-09-10 06:47:21 +0200 Bernhard M. Wiedemann (00eba31f19) - - man: doveadm director flush - The parameter is -F, not -f - - -M doc/man/doveadm-director.1.in - -2021-09-08 09:53:12 +0300 Aki Tuomi (30eecd1f82) - - doveadm: doveadm-stats - Allocate field_types - - field_types was function local variable that got used outside of function. - Change to use datastack allocation instead to keep it valid after leaving - function. - - Broken in e9a46e3a6df2edd6cb68a8fc04a5e8e4564a9d5e - -M src/doveadm/doveadm-stats.c - -2021-08-31 12:48:38 +0300 Aki Tuomi (601b5465dc) - - lib-storage: Move (un)deleting debug message to mailbox_mark_index_deleted - - -M src/lib-storage/list/mail-storage-list-index-rebuild.c -M src/lib-storage/mail-storage.c - -2021-08-09 11:56:17 +0300 Aki Tuomi (99efbc7f81) - - lib-storage: mailbox-list - Detect duplicate GUIDs - - This is only done for LAYOUT=INDEX. - -M src/lib-storage/list/mailbox-list-index.c - -2021-08-19 17:10:31 +0300 Aki Tuomi (f30403df4b) - - lib-storage: mailbox-list - Add duplicate pool for duplicate detection - - -M src/lib-storage/list/mailbox-list-index.c - -2021-08-16 14:38:47 +0300 Aki Tuomi (196a5ed776) - - lib-storage: maildir - Use mail_storage_index_list_rebuild - - -M src/lib-storage/index/maildir/maildir-storage.c -M src/lib-storage/index/maildir/maildir-sync.c - -2021-08-20 11:43:27 +0300 Aki Tuomi (18afa46644) - - lib-storage: maildir - Allow creating existing folder when rebuilding list - index - - -M src/lib-storage/index/maildir/maildir-storage.c - -2021-08-09 14:23:13 +0300 Aki Tuomi (a92541c5b9) - - lib-storage: dbox - Use mailbox_list_index_rebuild - - -M src/lib-storage/index/dbox-multi/mdbox-storage.c -M src/lib-storage/index/dbox-multi/mdbox-sync.c -M src/lib-storage/index/dbox-single/sdbox-storage.c -M src/lib-storage/index/dbox-single/sdbox-sync.c -M src/lib-storage/index/index-storage.c - -2021-08-09 15:47:28 +0300 Aki Tuomi (451883dbb8) - - lib-storage: dbox - Allow creating existing folder when rebuilding list - index - - -M src/lib-storage/index/dbox-common/dbox-storage.c -M src/lib-storage/index/index-storage.c - -2021-08-13 14:18:21 +0300 Aki Tuomi (2fc8d7024b) - - lib-storage: Add list index rebuild code - - -M src/lib-storage/list/Makefile.am -A src/lib-storage/list/mail-storage-list-index-rebuild.c -M src/lib-storage/mail-storage-private.h - -2021-08-27 12:59:59 +0300 Aki Tuomi (5a75724a2e) - - lib-storage: Populate mailboxes_fs if needed - - -M src/lib-storage/mail-storage.c - -2021-08-20 14:30:46 +0300 Aki Tuomi (3855ccbf9a) - - lib-storage: mailbox-list - Try to get GUID from mailbox path - - -M src/lib-storage/list/mailbox-list-index-status.c - -2021-08-13 10:29:59 +0300 Aki Tuomi (a92b1f9316) - - lib-storage: Add fields to mail_storage needed for list rebuild - - -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c - -2021-06-30 08:44:33 +0300 Aki Tuomi (36f96c49ca) - - lib-storage: Fix changing mailbox GUID with LAYOUT=index - - The old path would generate Mail/mailboxes/mailboxes/ - -M src/lib-storage/list/mailbox-list-index-backend.c - -2021-06-22 15:59:25 +0300 sergey.kitov (c1a57f47a7) - - doveadm-stats: Add doveadm stats add/remove documentation - - -M doc/man/doveadm-stats.1.in - -2021-05-27 11:46:02 +0300 sergey.kitov (bc31da4d84) - - doveadm: Add 'stats add' and 'stats remove' commands - - -M src/doveadm/Makefile.am -M src/doveadm/doveadm-cmd.c -M src/doveadm/doveadm-cmd.h -M src/doveadm/doveadm-stats.c - -2021-06-09 17:23:28 +0300 sergey.kitov (eef75dd719) - - stats: replace hardcoded value of default exporter_include with macro - - -M src/stats/stats-settings.c -M src/stats/stats-settings.h - -2021-06-09 17:22:39 +0300 sergey.kitov (e9a46e3a6d) - - doveadm: Rewrite doveadm stats dump command to allow reuse code in other - commands. - - -M src/doveadm/doveadm-stats.c - -2021-05-10 16:39:21 +0300 sergey.kitov (57bb3b90cb) - - lib-master: Accept filter updates from stats by stats-client. - - -M src/lib-master/stats-client.c - -2021-04-20 17:07:36 +0300 sergey.kitov (0444b730c2) - - stats: Implement ipc interface for adding and removing metrics - - -M src/stats/client-reader.c - -2021-05-10 16:13:12 +0300 sergey.kitov (adbbd40458) - - stats: Implement sending filter updates to connected processes. - - -M src/stats/client-writer.c -M src/stats/client-writer.h - -2021-04-20 17:06:58 +0300 sergey.kitov (a2a79fb376) - - stats: Add functions for adding or removing metrics - - -M src/stats/stats-metrics.c -M src/stats/stats-metrics.h - -2021-04-13 11:49:43 +0300 sergey.kitov (50f36bb1d2) - - stats: Expose stats_metric_setting_parser_info - - -M src/stats/stats-settings.h - -2021-04-20 17:06:26 +0300 sergey.kitov (fcacfde02a) - - lib: Add function removing queries from event_filter - - -M src/lib/event-filter.c -M src/lib/event-filter.h - -2021-09-02 14:31:36 +0300 Timo Sirainen (a476e16ae3) - - lib-http: test-http-client-errors - Fix random hangs - - Wait for subprocesses to be initialized before starting each test. This - should fix random hangs with the test. - -M src/lib-http/test-http-client-errors.c - -2021-09-02 15:39:33 +0300 Timo Sirainen (8b883745d6) - - lib-test: test_subprocess_notify_signal_*() - Add signo parameter - - This allows using multiple notification signals. - -M src/lib-http/test-http-client-errors.c -M src/lib-test/test-subprocess.c -M src/lib-test/test-subprocess.h - -2021-08-19 12:50:04 +0200 Timo Sirainen (5280904733) - - lib-storage: Make sure header parsing is deinitialized after failures - - This should fix all the possible reasons for: Panic: file - index-mail-headers.c: line 198 (index_mail_parse_header_init): assertion - failed: (!mail->data.header_parser_initialized) - -M src/lib-storage/index/index-mail-headers.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h - -2021-08-19 12:32:45 +0200 Timo Sirainen (0b6a2fb6c1) - - lib-storage: Fix potential assert-crash if filter-stream fails - - If filter-stream isn't read until header (because the parent istream fails), - the header parsing isn't deinitialized. If after the failure the headers are - attempted to be parsed again, there's an assert-crash. Make sure this won't - happen by finishing the filter-istream read, and if that fails then reset - the header parsing anyway. - - Destroying the filter_stream may also change the parent istream offset to - change, so this commit adds an extra seek to beginning of the istream when - beginning to parse the mail headers. - - Fixes: Panic: file index-mail-headers.c: line 198 - (index_mail_parse_header_init): assertion failed: - (!mail->data.header_parser_initialized) - -M src/lib-storage/index/index-mail-headers.c - -2021-08-19 12:29:36 +0200 Timo Sirainen (45df8159fe) - - lib-storage: Split off index_mail_filter_stream_destroy() - - -M src/lib-storage/index/index-mail-headers.c - -2021-08-17 14:33:56 +0200 Markus Valentin (6b7e4d1527) - - imapc: Fix crashing when copying nonexistent mails - - Check the msgmap before attempting to copy an mail which may has been - expunged already. Fixes: - - Panic: file mail-storage.c: line 2385 - (mailbox_transaction_commit_get_changes): assertion failed: (ret < 0 || - seq_range_count(&changes_r->saved_uids) == save_count || - array_count(&changes_r->saved_uids) == 0) - -M src/lib-storage/index/imapc/imapc-save.c - -2021-08-18 14:04:53 +0200 Timo Sirainen (8e592661d5) - - lib-storage: Fix assert-crash in special partial mail parsing failures - - This happened for example if: - - mail_precache() started parsing mail - - header was parsed, but mail body parsing failed due to mail size mismatch - - vsize parsing doesn't restart header parsing, because header size is - already known - - body parsing assert-crashes because there is no messsage parser - initialized - - Fixes: Panic: file index-mail.c: line 1290 (index_mail_parse_body): - assertion failed: (data->parser_ctx != NULL) - -M src/lib-storage/index/index-mail.c - -2021-08-12 12:42:40 +0300 Aki Tuomi (35f7ff1c41) - - lib-oauth2: Add unit test for missing exp field - - -M src/lib-oauth2/test-oauth2-jwt.c - -2021-08-12 12:40:39 +0300 Aki Tuomi (5bc6fa7571) - - lib-oauth2: Add unit tests for valid tokens - - -M src/lib-oauth2/test-oauth2-jwt.c - -2021-06-08 00:35:13 +0200 s3lph <5564491+s3lph@users.noreply.github.com> (f3bef96857) - - lib-oauth2-jwt: Remove 'nbf < iat' check, as it's not mandated by RFC7519, - and not uncommon to predate the nbf field - - -M src/lib-oauth2/oauth2-jwt.c - -2021-08-24 22:58:59 +0200 Timo Sirainen (8a7fa002d2) - - lib-test: Fix race when subprocess immediately receives signal - - Signal could be received before test_subprocess_is_child=1 is set, causing - the subprocess's signal handler to also attempt to cleanup other - subprocesses. - - This was causing http-test-client-errors unit tests to fail somewhat - randomly, especially when running them only with 1 CPU. - -M src/lib-test/test-subprocess.c - -2021-08-24 15:02:44 +0300 Timo Sirainen (07d66366ab) - - lib: Add test-macros - - -M src/lib/Makefile.am -M src/lib/test-lib.inc -A src/lib/test-macros.c - -2021-08-23 14:21:02 +0300 Timo Sirainen (a4f9219709) - - lib: Rewrite POINTER_CAST_TO() to avoid new clang warning - - Fixes: warning: performing pointer subtraction with a null pointer has - undefined behavior [-Wnull-pointer-subtraction] - -M src/lib/macros.h - -2021-08-23 14:20:54 +0300 Timo Sirainen (9c4077a843) - - dbox: Remove unnecessary variable - - The variable was set and updated, but never read. - -M src/lib-storage/index/dbox-common/dbox-file.c - -2021-08-23 14:20:24 +0300 Timo Sirainen (a11c739b86) - - lib-dcrypt: Remove unnecessary variable - - The variable was set and updated, but never read. - -M src/lib-dcrypt/istream-decrypt.c - -2021-08-23 11:46:46 +0300 Martti Rannanjärvi (bc679231f1) - - doveadm-dsync: Free ssl_iostream_context on connection failure - - -M src/doveadm/doveadm-dsync.c - -2021-04-13 18:25:06 +0200 Stephan Bosch (415c305d6c) - - lib-smtp: smtp-server-cmd-rcpt - Fix assert crash occurring for pipelined - MAIL RCPT MAIL sequence. - - The assertion is wrong in that it assumes that no MAIL commands can be - pending once RCPT command is next to reply. The RCPT command does not block - the pipeline, so that a subsequent MAIL command can also be pending (but - will almost never succeed). - -M src/lib-smtp/smtp-server-cmd-rcpt.c -M src/lib-smtp/test-smtp-server-errors.c - -2021-04-13 18:25:31 +0200 Stephan Bosch (23246612f2) - - lib-smtp: smtp-server-cmd-data - Add comment to pipeline state assertion. - - -M src/lib-smtp/smtp-server-cmd-data.c - -2021-08-20 01:19:28 +0200 Stephan Bosch (741a963c19) - - lib-smtp: smtp-server-cmd-data - Remove useless trans != NULL checks. - - -M src/lib-smtp/smtp-server-cmd-data.c - -2021-08-19 17:06:42 +0100 Siavash Tavakoli (285cf9c849) - - dict-sql: Fail early if there's unexpected number of bind arguments for iter - - Otherwise, lib-sql raises a panic. - -M src/lib-dict-backend/dict-sql.c - -2021-08-17 15:23:31 +0200 Timo Sirainen (e34bffaab5) - - lib: istreams - Make sure freeing snapshots can't access freed parent - istream memory - - This happened after the recent istream-header-filter snapshot changes. - -M src/lib/istream.c - -2021-08-18 19:49:43 +0200 Timo Sirainen (b401e4136f) - - imap: Fix mailbox leak if MOVE can't open the source mailbox - - Broken by 143b7c2b412ed8f155e812603fda81886bec466e - - Fixes: Panic: file mail-user.c: line 229 (mail_user_deinit): assertion - failed: ((*user)->refcount == 1) - -M src/imap/cmd-copy.c - -2021-08-18 13:54:39 +0100 Siavash Tavakoli (16deb5b8bc) - - lib-lua: Don't include lua_resume_compat() for 5.1 - - lua_resume() is not supported in 5.1, so don't try to add a compatibility - function that fails compilation. - -M src/lib-lua/dlua-compat.c -M src/lib-lua/dlua-compat.h - -2021-05-25 19:26:14 +0300 Timo Sirainen (bb1d67a870) - - lib: Remove unused event_filter_add() - - -M src/lib/event-filter.c -M src/lib/event-filter.h - -2021-08-16 17:13:27 +0300 Timo Sirainen (f1bbfcb712) - - lib: test-event-filter - Replace event_filter_add() with - event_filter_parse() - - -M src/lib/test-event-filter.c - -2021-05-24 23:57:13 +0300 Timo Sirainen (c4369cbf6a) - - lib: Add comments to event-related code - - -M src/lib/event-log.c -M src/lib/event-log.h -M src/lib/lib-event-private.h -M src/lib/lib-event.h - -2021-05-24 22:26:27 +0300 Timo Sirainen (d2c0f1374c) - - lib: event_want_level() - Minor code cleanup - - event_want_log_level() internally does both of these checks, so it's enough - to just check its return value. - -M src/lib/event-log.c - -2021-08-17 12:12:18 +0300 Timo Sirainen (730b2a449f) - - lib-fs: Fix fs_stats.copy_count tracking with fs_default_copy() - - The copy_count could have been decreased too many times with async - operations. - -M src/lib-fs/fs-api-private.h -M src/lib-fs/fs-api.c - -2021-08-16 15:36:37 +0300 Timo Sirainen (b82faee3cb) - - global: Add ATTR_UNSIGNED_WRAPS to fix various ubsan issues - - -M src/auth/crypt-blowfish.c -M src/lib/numpack.c -M src/lib/sha3.c - -2021-08-05 18:53:57 +0300 Timo Sirainen (9e80b588f4) - - global: Fix various ubsan issues - - -M src/lib-mail/istream-header-filter.c -M src/lib-mail/test-qp-decoder.c -M src/lib-test/test-istream.c -M src/lib/test-base64.c -M src/lib/test-data-stack.c - -2021-08-17 10:59:49 +0300 Timo Sirainen (05189ecdc7) - - doveadm: Free memory for all loaded mail_plugins at deinit - - -M src/doveadm/doveadm-mail.c - -2021-08-17 10:50:34 +0300 Timo Sirainen (654d7b2d11) - - doveadm pw -l: Free all memory to avoid memory leak complaints - - -M src/doveadm/doveadm-pw.c - -2021-08-17 09:30:25 +0200 Timo Sirainen (b997fc957e) - - doveadm batch: Fix memory leak - - -M src/doveadm/doveadm-mail-batch.c - -2021-08-17 11:06:36 +0300 Timo Sirainen (46a511412a) - - doveadm: Split off doveadm_mail_cmd_deinit() - - -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-mail.h - -2021-05-07 21:15:04 +0300 Timo Sirainen (f708052c5d) - - doveadm: Make doveadm_mail_cmd_free() public - - -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-mail.h - -2021-08-13 11:08:30 +0100 Siavash Tavakoli (f28482afb8) - - global: Use consistent lua function names - - Change lua-style function names to be consistent with dovecot's style. - -M src/auth/db-lua.c -M src/lib-lua/dlua-dovecot.c -M src/lib-lua/dlua-error.c -M src/lib-lua/dlua-pushstring.c -M src/lib-lua/dlua-script-private.h -M src/lib-lua/dlua-script.c -M src/lib-storage/mail-lua.c -M src/lib-storage/mail-storage-lua.c -M src/lib-storage/mail-user-lua.c -M src/lib-storage/mailbox-lua.c -M src/plugins/push-notification/push-notification-driver-lua.c - -2021-08-12 19:43:25 +0100 Siavash Tavakoli (e14026e708) - - lib-lua: test-lua: Fix the test for lua versions later than 5.3 - - -M src/lib-lua/test-lua.c - -2021-08-12 19:40:22 +0100 Siavash Tavakoli (72a864b4b0) - - lib-lua: Add lua_resume_compat() and use it in lua versions prior to 5.4 - - Starting lua 5.4 "lua_resume()" expects an extra "nresults" argument. Add a - compatibility function to handle this argument in earlier versions. - -M src/lib-lua/dlua-compat.c -M src/lib-lua/dlua-compat.h -M src/lib-lua/dlua-resume.c - -2020-05-24 14:47:18 -0400 Felipe Gasper (2595113387) - - man: Document command/args destination format to sync/backup. - - -M doc/man/doveadm-sync.1.in - -2021-08-16 14:52:50 +0300 Timo Sirainen (e14e68cb0b) - - lib-compression: istream-lz4 - Fix handling partial header reads - - Reading assert-crashed if the header was read only partially. Either because - the file really was truncated or because parent stream already had fewer - bytes buffered. - -M src/lib-compression/istream-lz4.c -M src/lib-compression/test-compression.c - -2021-08-16 14:51:29 +0300 Timo Sirainen (d8995452c8) - - lib-compression: istream-lz4 - Remove redundant check - - The loop is reached only if ret is 0, so there's no need to check it again. - -M src/lib-compression/istream-lz4.c - -2021-08-16 14:50:10 +0300 Timo Sirainen (eea3b751de) - - lib-compression: istream-lz4 - Add asserts to make sure parent buffer isn't - full - - The parent buffer's max size would have to be tiny for these to happen. - -M src/lib-compression/istream-lz4.c - -2021-07-01 13:52:29 +0100 Siavash Tavakoli (f38100a5fe) - - dict: Use dict-init-cache - - Make use of dict-init-cache for initialization and deinitialization of - dicts. - -M src/dict/dict-connection.c -M src/dict/main.c - -2021-06-25 14:11:52 +0100 Siavash Tavakoli (222e8d5b55) - - dict: Add caching mechanism for initializing dicts - - Add a pool for dict instances. Each dict is refcounted and given a grace - period of 30 seconds for deletion. If refcount drops to 0 and no new dict - operation uses the instance in that period, it will be freed. A maximum of - 10 dicts are kept in the cache. - -M src/dict/Makefile.am -A src/dict/dict-init-cache.c -A src/dict/dict-init-cache.h - -2021-08-09 00:35:09 +0100 Siavash Tavakoli (f5a2a9a6d8) - - dict: Add dict_created and dict_destroyed events - - Inherit from dict.event and emitted at dict initialization/deinit. - -M src/lib-dict/dict.c - -2021-08-15 12:45:12 +0300 Martti Rannanjärvi (fcf23d9919) - - lib-sasl: test-sasl-client.c - Initialize authid of sasl_empty_set - - This fixes the compiler warning: - - test-sasl-client.c:8:1: error: missing initializer for field 'authid' - of 'const struct dsasl_client_settings' - -M src/lib-sasl/test-sasl-client.c - -2021-08-15 07:12:42 +0300 Martti Rannanjärvi (0434bd96f7) - - lib-sasl: oauthbearer - Fix memory leak on auth failure - - -M src/lib-sasl/mech-oauthbearer.c - -2021-08-11 09:48:06 +0300 Aki Tuomi (64ab5d866c) - - lib-sasl: Add unit tests - - -M src/lib-sasl/Makefile.am -A src/lib-sasl/test-sasl-client.c - -2021-08-11 09:59:05 +0300 Aki Tuomi (5071cfe16c) - - lib-sasl: Do not crash if password is NULL - - -M src/lib-sasl/dsasl-client.c - -2021-08-11 09:47:17 +0300 Aki Tuomi (feba4f0c88) - - lib-sasl: When setting port, parse value, not key. - - Broken in 228f1e8d583 - -M src/lib-sasl/mech-oauthbearer.c - -2021-08-11 08:49:44 +0300 Aki Tuomi (902407f7eb) - - auth: Do not forward empty "master" passdb field - - -M src/auth/auth-request-handler.c - -2021-08-11 08:48:29 +0300 Aki Tuomi (f4cf9d6974) - - login-common: Ignore empty value for "master" passdb extra field - - -M src/login-common/client-common-auth.c - -2021-08-10 12:26:14 +0100 Siavash Tavakoli (a0c1fe343e) - - mail-crypt: Add password confirmation for doveadm cryptokey password command - - To prevent setting wrong passwords by accident. - -M src/plugins/mail-crypt/doveadm-mail-crypt.c - -2021-08-10 12:23:55 +0100 Siavash Tavakoli (13830767a0) - - mail-crypt: Fix -O argument type for doveadm cryptokey password command - - Should be boolean instead of string. - -M src/plugins/mail-crypt/doveadm-mail-crypt.c - -2021-04-28 02:01:14 +0300 Timo Sirainen (ddf224808e) - - lib-index: Fix "Extension introduction for unknown id" errors after map is - generated - - This happens when: - * View is opened - * Messages are expunged - * View is synced with NOEXPUNGES flag - * A new extension is introduced - * Index is rotated at least twice - * View is again synced with NOEXPUNGES flag - * More changes are done to index with the new extension - * Once more view is synced with NOEXPUNGES flag - - The last sync will see changes with the new extension ID, but the view's map - doesn't know its ID. - -M src/lib-index/mail-index-sync-ext.c -M src/lib-index/test-mail-index.c - -2021-06-24 12:58:58 -0400 Josef 'Jeff' Sipek (710346bcb8) - - virtual: Expunge old emails if backend box guid changed - - This introduces a new extensible "ext2" header to make it easier to add new - fields in the future. It also allows keeping backwards/forwards - compatibility with the old code, so the virtual index isn't rebuilt on - upgrades or downgrades. - -M src/plugins/virtual/virtual-storage.c -M src/plugins/virtual/virtual-storage.h -M src/plugins/virtual/virtual-sync.c - -2021-07-29 12:38:12 +0300 Timo Sirainen (5310858bd0) - - virtual: Don't use data stack when building extension header - - Some users may have thousands of mailboxes, which grows the data stack - unnecessarily large. - -M src/plugins/virtual/virtual-sync.c - -2021-08-09 13:01:12 +0300 Timo Sirainen (97367ef617) - - indexer: Fix crash if client disconnects while it's waiting for command - reply - - This happened for example if IMAP SEARCH triggered long fts indexing and the - IMAP client disconnected while waiting for the reply. - - Broken by f62a25849358e40a08a2c47f5bcaa1613a31d076 - -M src/indexer/indexer-client.c - -2021-05-06 11:58:21 +0200 Stephan Bosch (9f5e723974) - - lib-smtp: smtp-server-cmd-data - Fix global state cleanup upon DATA command - destroy. - - Should cleanup global state only when it belongs to the DATA/BDAT command - currently being destroyed. - - Fixes NULL-dereference in i_stream_read() found by OSS-Fuzz. - -M src/lib-smtp/smtp-server-cmd-data.c -M src/lib-smtp/test-smtp-server-errors.c - -2021-08-05 11:38:26 +0200 Stephan Bosch (da1d2332bd) - - lib-smtp: test-smtp-server-errors - Perform "Bad pipelined DATA" test with - actual pipelining. - - -M src/lib-smtp/test-smtp-server-errors.c - -2021-08-03 19:47:54 +0300 Timo Sirainen (7f9cfccb54) - - imap, pop3: Prevent reading ssl_ca setting into memory - - Especially with imap there can be a lot of processes and a large ssl_ca - could be wasting a lot of memory. This was already the old behavior before - removing ssl_* settings from lib-storage. - -M src/imap/main.c -M src/lib-master/master-service-settings.c -M src/lib-master/master-service-settings.h -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage-service.h -M src/pop3/main.c - -2021-08-03 19:46:59 +0300 Timo Sirainen (4ea4a85607) - - config: Add exclude= settings to drop specific settings - - -M src/config/config-connection.c -M src/config/config-request.c -M src/config/config-request.h -M src/config/doveconf.c - -2021-07-29 18:04:53 +0300 Timo Sirainen (327bd99f84) - - lib-storage: Remove SSL settings from mail_storage_settings - - They can be accessed via master_service_ssl_settings instead. - -M src/lib-master/master-service-ssl-settings.c -M src/lib-storage/mail-storage-settings.c -M src/lib-storage/mail-storage-settings.h - -2021-07-29 18:02:57 +0300 Timo Sirainen (1e5324b580) - - lib-storage: mail_user_init_ssl_client_settings() - Use - master_service_ssl_settings - - This will allow dropping the duplicate SSL settings handling. - -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-user.c - -2021-07-29 17:45:16 +0300 Timo Sirainen (4930b1b883) - - dsync: Get SSL settings via master_service_ssl_settings - - -M src/doveadm/doveadm-dsync.c - -2021-07-29 17:44:43 +0300 Timo Sirainen (6fcaffd1e5) - - lib-storage: Add mail_storage_service_user_get_ssl_settings() - - -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage-service.h - -2021-07-29 17:44:25 +0300 Timo Sirainen (aa8cb602eb) - - lib-master: Add master_service_ssl_settings_get_from_parser() - - -M src/lib-master/master-service-ssl-settings.c -M src/lib-master/master-service-ssl-settings.h - -2021-07-29 17:57:42 +0300 Timo Sirainen (61a7a9e00e) - - global: Don't zero SSL settings unnecessarily - - mail_user_init_ssl_client_settings() and mail_user_init_fs_settings() will - clear them again anyway. - -M src/doveadm/doveadm-settings.c -M src/lib-lda/mail-send.c -M src/lib-storage/mailbox-list.c -M src/lmtp/lmtp-proxy.c -M src/plugins/fts-solr/fts-backend-solr-old.c -M src/plugins/fts-solr/fts-backend-solr.c -M src/plugins/fts/fts-parser-tika.c -M src/plugins/push-notification/push-notification-driver-ox.c -M src/stats/event-exporter-transport-http-post.c -M src/submission/submission-backend-relay.c - -2021-07-29 17:58:23 +0300 Timo Sirainen (c59736a995) - - lib-storage: mail_user_init_fs_settings() - Clarify that ssl settings are - fully initialized - - -M src/lib-storage/mail-user.c -M src/lib-storage/mail-user.h - -2021-07-29 17:57:12 +0300 Timo Sirainen (b8a60edd6a) - - lib-storage: mail_user_init_ssl_client_settings() - Clarify that ssl - settings are fully initialized - - -M src/lib-storage/mail-user.c -M src/lib-storage/mail-user.h - -2021-07-29 15:31:56 +0300 Timo Sirainen (1b2134e0be) - - doveadm: Free SSL iostream contexts at deinit - - This wasn't really a memory leak, because the contexts are always kept - allocated until deinit anyway. - -M src/doveadm/doveadm-mail-server.c - -2021-07-29 16:06:50 +0300 Timo Sirainen (48d8cb6b4f) - - lib-ssl-iostream: ssl_iostream_context_unref(NULL) is a no-op - - -M src/lib-ssl-iostream/iostream-ssl.c - -2021-08-07 18:52:09 +0200 Timo Sirainen (c84de300ae) - - man: doveadm-pw - Fix default scheme to be CRYPT / $2y$ bcrypt - - -M doc/man/doveadm-pw.1.in - -2021-07-22 15:31:11 +0300 Timo Sirainen (c5cbbdf177) - - lib-index: Remove mail_index_transaction_get_highest_modseq() - - This isn't actually used anywhere, so there's no need to keep it. - -M src/lib-index/mail-index-transaction-export.c -M src/lib-index/mail-index-transaction.c -M src/lib-index/mail-index.h -M src/lib-index/mail-transaction-log-file.c - -2021-07-22 15:28:39 +0300 Timo Sirainen (4ddc389c16) - - lib-index: mail_index_transaction_get_highest_modseq() - Fix handling - MAIL_INDEX_MAIL_FLAG_UPDATE_MODSEQ - - MAIL_INDEX_MAIL_FLAG_UPDATE_MODSEQ flag updates didn't calculate the - returned modseq correctly. This function wasn't used outside - --with-devel-checks though, but with it this fixes: - - Panic: file mail-index-transaction.c: line 212 - (mail_index_transaction_commit_real): assertion failed: (t->reset || - expected_highest_modseq == log->head->sync_highest_modseq) - -M src/lib-index/mail-index-transaction-export.c - -2021-07-22 14:24:11 +0300 Timo Sirainen (11c6ffa0f6) - - lib-index: Avoid modseq warnings --with-devel-checks - - Avoids warnings: Requested highest-modseq for transaction, but modseq - tracking isn't enabled for the file (this shouldn't happen) - -M src/lib-index/mail-index-transaction.c - -2021-07-22 14:29:24 +0300 Timo Sirainen (a6548a3b73) - - director: Avoid calling timeval_diff_msecs() with too great time difference - - Fixes assert-crash --with-devel-checks: Panic: file time-util.c: line 76 - (timeval_diff_msecs): assertion failed: (diff <= INT_MAX) - -M src/director/director-connection.c - -2021-07-14 10:00:28 +0300 Aki Tuomi (5245129f06) - - lib: data-stack - Initialize alloc_count / alloc_bytes - - This has only effect with devel checks enabled. Fixes counter values to show - sensible data. - -M src/lib/data-stack.c - -2021-07-13 13:41:14 +0300 Aki Tuomi (d74cf4ca2a) - - lib: data-stack - Allow errno changes when sending event - - -M src/lib/data-stack.c - -2021-07-29 22:21:52 +0300 Timo Sirainen (368a96783e) - - lib-master, global: Remove unnecessary MASTER_SERVICE_FLAG_USE_SSL_SETTINGS - - SSL client settings are now always read. - -M src/auth/main.c -M src/doveadm/doveadm.c -M src/doveadm/main.c -M src/lib-master/master-service.h -M src/lmtp/main.c -M src/login-common/main.c -M src/stats/main.c - -2021-07-29 22:20:17 +0300 Timo Sirainen (36ff43f1a9) - - lib-master: Use ssl-server settings only when necessary - - -M src/lib-master/master-service-private.h -M src/lib-master/master-service-settings.c -M src/lib-master/master-service-ssl-settings.c -M src/lib-master/master-service.c - -2021-07-29 22:18:56 +0300 Timo Sirainen (a7fb3cce6a) - - lib-master: Remove unused master_service_is_ssl_module_loaded() - - -M src/lib-master/master-service-private.h -M src/lib-master/master-service.c -M src/lib-master/master-service.h - -2021-07-29 21:45:18 +0300 Timo Sirainen (c6cea57577) - - lib-master, login-common: Split off master_service_ssl_server_settings - - -M src/config/settings-get.pl -M src/lib-master/master-service-settings.c -M src/lib-master/master-service-ssl-settings.c -M src/lib-master/master-service-ssl-settings.h -M src/lib-master/master-service-ssl.c -M src/login-common/client-common.c -M src/login-common/client-common.h -M src/login-common/login-settings.c -M src/login-common/login-settings.h -M src/login-common/main.c - -2021-07-29 21:43:03 +0300 Timo Sirainen (79a210c1f7) - - lib-master, global: Split master_service_ssl_settings_to_iostream_set() to - client/server functions - - -M src/auth/auth-policy.c -M src/doveadm/doveadm-settings.c -M src/lib-master/master-service-ssl-settings.c -M src/lib-master/master-service-ssl-settings.h -M src/lmtp/lmtp-proxy.c -M src/login-common/client-common.c -M src/login-common/login-proxy.c -M src/login-common/main.c -M src/stats/event-exporter-transport-http-post.c - -2021-08-05 17:48:42 +0300 Timo Sirainen (77dd65422c) - - master: Avoid creating prefork timeout if process_limit is already reached - - -M src/master/service-monitor.c - -2021-08-05 17:53:58 +0300 Timo Sirainen (0610336a86) - - master: Avoid high CPU usage when process_min_avail reaches process_limit - - process_min_avail handling always created a 0ms timeout to try to create the - missing processes. This timeout was supposed to stop when it couldn't launch - all the wanted processes, but the check wasn't done right. This ended up - causing the timeout to be called rapidly over and over again. - -M src/master/service-monitor.c - -2021-07-22 14:51:05 -0600 Michael M Slusarz (904ee71927) - - lazy_expunge: Add lazy_expunge_exclude setting - - This allows mailboxes to be excluded via configuration. - -M src/plugins/lazy-expunge/lazy-expunge-plugin.c - -2021-08-03 17:38:33 +0300 Timo Sirainen (9d02ac2e42) - - fts: Use mailbox-match-plugin API for fts_autoindex_exclude - - This doesn't change the functionality, just deduplicates the code. - -M src/plugins/fts/fts-storage.c -M src/plugins/fts/fts-user.c -M src/plugins/fts/fts-user.h - -2021-08-04 15:50:54 +0300 Timo Sirainen (3eb404aa8c) - - fts: Always initialize struct fts_user - - Initializing lib-fts is still optional within it. - -M src/plugins/fts-lucene/fts-lucene-plugin.c -M src/plugins/fts-solr/fts-solr-plugin.c -M src/plugins/fts/fts-user.c -M src/plugins/fts/fts-user.h - -2021-07-22 14:20:25 -0600 Michael M Slusarz (27a98a2d3c) - - lib-storage: Add mailbox exclusion plugin API - - Allows mailbox exclusion configuration to be easily added to any plugin. - -M src/lib-storage/Makefile.am -A src/lib-storage/mailbox-match-plugin.c -A src/lib-storage/mailbox-match-plugin.h - -2021-08-04 19:57:35 +0300 Timo Sirainen (8939c30ce9) - - master: Fix unfinished "time moved backwards" comment - - -M src/master/main.c - -2021-08-04 19:54:29 +0300 Timo Sirainen (0768778bb6) - - master: Log a warning also about "time moved forwards" - - This isn't really important to know, but it could help figure out - performance problems if it happens a lot. - -M src/master/main.c - -2021-08-04 19:52:14 +0300 Timo Sirainen (24216a4924) - - lib: ioloop - Handle "time moved forwards" only after 100ms difference - - Previously this was done after even a single microsecond difference, causing - it to happen almost constantly. This was causing performance problems when - there were many timeouts that had to be updated. Especially master process - could have been spending a lot of time unnecessarily here. - - Broken by b258137d0e0618ae792e3606071a1715d26f107b - -M src/lib/ioloop.c - -2021-08-04 19:55:36 +0300 Timo Sirainen (87bd288902) - - lib: ioloop - Fix 0 timeout with kqueue() and select() - - With these it was waiting for 1 ms instead of 0. - - Broken by fac27f192d8432c45d360025613f7d432271c5bb - -M src/lib/ioloop.c - -2021-08-04 17:24:00 +0300 Timo Sirainen (1f6aaaeb3c) - - fts: Fix internal error when fts_index_timeout is set - - Broken by cf114f90e0ba25c18db846ee582e3a130bd52949 - -M src/plugins/fts/fts-indexer.c - -2021-08-03 16:11:35 +0300 Timo Sirainen (b79d3118e5) - - acl: Cast enums explicitly to int in sorting function - - Fixes ubsan complaint: runtime error: unsigned integer overflow: 0 - 4 - cannot be represented in type 'unsigned int' - -M src/plugins/acl/acl-api.c - -2021-06-29 22:45:33 +0200 Stephan Bosch (bb6efaa417) - - lib-program-client: program-client-remote - Fix signed integer arithmetic. - - Make type cast explicit to gain ubsan approval. Also prevent negative - reserve_mod from having unexpected effect. - -M src/lib-program-client/program-client-remote.c - -2021-08-03 11:44:06 +0300 Martti Rannanjärvi (ac769778d1) - - util: dovecot-sysreport - Fix help to have -o as the short form of --core - - -M src/util/dovecot-sysreport - -2021-08-03 10:56:08 +0300 Martti Rannanjärvi (6cbeaf165d) - - util: dovecot-sysreport - Use only spaces for indentation - - Stop mixing tabs and spaces. - -M src/util/dovecot-sysreport - -2021-07-27 20:13:24 +0300 Timo Sirainen (23388cf96e) - - stats: Revert the previous OpenMetrics info type revert - - The OpenMetrics standard does support "info" type. The original Prometheus - format doesn't support it, but our support is for OpenMetrics. They don't - even have any overlapping types that could be used for this, so the only - other possibility would have been to make this configurable. - - Reverts 55a519d18fbbb8435854f1fcf2642b908d6fc074 - -M src/stats/stats-service-openmetrics.c - -2021-07-28 16:39:59 +0300 Timo Sirainen (8b80c45ab1) - - submission-login: Fix compiling error with some older compilers - - -M src/submission-login/submission-proxy.c - -2021-07-05 00:37:46 +0200 Stephan Bosch (c096b7fd77) - - submission-login: submission-proxy - Optionally send XCLIENT LOGIN to - backend and skip authentication. - - This behavior is enabled by returning proxy_noauth from passdb. - -M src/submission-login/submission-proxy.c - -2021-07-19 00:29:23 +0200 Stephan Bosch (f94dd904b8) - - login-common: Add proxy field proxy_noauth. - - -M src/login-common/client-common-auth.c -M src/login-common/client-common.h - -2021-07-19 00:24:32 +0200 Stephan Bosch (bdba22fecb) - - submission-login: submission-proxy - Move - submission_proxy_success_reply_sent(). - - -M src/submission-login/submission-proxy.c - -2021-05-18 20:18:45 +0300 Timo Sirainen (c5387d7778) - - dict: Use the dict name as the log prefix - - Otherwise if there are multiple dicts it may not be obvious which one is - causing the errors. - -M src/dict/dict-connection.c - -2021-07-22 11:26:10 +0300 Aki Tuomi (55a519d18f) - - stats: Revert dovecot build information to untyped data - - OpenMetrics does not know type 'info', so use 'untyped' instead. - - Broken in ae678116a79fff609cdf4fb1eb7eb3db2975bf1c - -M src/stats/stats-service-openmetrics.c - -2021-07-21 18:12:36 +0300 Timo Sirainen (bf111f6830) - - lib-storage: mail_cache_*_fields - Check for invalid header names while - parsing config - - This way the errors are noticed early on. - -M src/config/settings-get.pl -M src/lib-storage/mail-storage-settings.c - -2020-04-14 12:24:50 +0300 Timo Sirainen (723d129153) - - lib-storage: mail_cache_*_fields - Log an error if hdr. isn't valid - - Mainly verify that it doesn't have accidental UTF-8 characters that aren't - easily visible in text editors. - -M src/lib-storage/index/index-storage.c - -2020-04-19 14:03:24 +0300 Timo Sirainen (ecac22474a) - - lib-mail: Add message_header_name_is_valid() - - -M src/lib-mail/message-header-parser.c -M src/lib-mail/message-header-parser.h - -2021-07-22 16:38:22 +0300 Timo Sirainen (fafd7ad584) - - login-proxy: Make sure input line isn't freed too early - - proxy_parse_line() could free the proxy's istream, which frees the line - string. With IMAP the line could have been used as part of the error string - passed to login_proxy_failed(), which can free the istream before using the - string for logging purposes. This could have resulted in logging a corrupted - line or a crash. - - Broken by e3134289529cec16ade44cefd0fd26594ae40e30 - -M src/login-common/client-common-auth.c - -2021-07-23 14:45:03 +0200 Timo Sirainen (af3e934e33) - - lib-test: Make sure child processes exit cleanly with SIGTERM - - It's normal behavior that the parent process kills the child process with - SIGTERM. This shouldn't result in the child process dying with SIGTERM, but - a clean exit. This was causing http-test-client-errors unit tests to fail - somewhat randomly, especially when running them only with 1 CPU. - -M src/lib-test/test-subprocess.c - -2021-07-21 14:06:55 +0300 Aki Tuomi (128bcb85a9) - - lib-test: Ensure we send signals to regular PIDs only - - -M src/lib-test/test-subprocess.c - -2021-07-21 14:05:34 +0300 Aki Tuomi (34bdfdcbc7) - - lib-test: Update subprocess list after forking - - Due to a race condition, we could end up killing PID 0 by accident - sometimes. - -M src/lib-test/test-subprocess.c - -2021-07-22 11:23:00 +0300 Timo Sirainen (e3e4cd2681) - - lib: random_fill() - Optimize away memmove() - - We just need to track the position of how far the random_next buffer has - been used. - -M src/lib/randgen.c - -2021-07-05 00:36:36 +0200 Stephan Bosch (82d9013dd3) - - submission-login: submission-proxy - Send XCLIENT data in multiple commands - if line exceeds 512 bytes. - - When the proxy talks to non-Dovecot software, failures could occur - otherwise. Particularly Postfix will fail. - -M src/submission-login/client.h -M src/submission-login/submission-proxy.c - -2021-06-19 00:31:19 +0200 Stephan Bosch (12c9ce36a4) - - submission-login: submission-proxy - Send PROTO and HELO XCLIENT fields. - - -M src/submission-login/submission-proxy.c - -2021-06-18 19:32:03 +0200 Stephan Bosch (9127db1a89) - - submission-login: submission-proxy - Properly send EHLO after XCLIENT. - - -M src/submission-login/client.h -M src/submission-login/submission-proxy.c - -2021-07-05 23:33:51 +0200 Stephan Bosch (3764af4b42) - - submission-login: submission-proxy - Reorder XCLIENT fields to match - lib-smtp client. - - -M src/submission-login/submission-proxy.c - -2021-06-19 00:25:02 +0200 Stephan Bosch (b1e0d63624) - - submission-login: submission-proxy - Handle EHLO reply in a separate - function. - - -M src/submission-login/submission-proxy.c - -2021-06-18 23:58:38 +0200 Stephan Bosch (297f39ba26) - - submission-login: submission-proxy - Move sending STARTTLS to separate - function. - - -M src/submission-login/submission-proxy.c - -2021-06-18 19:52:33 +0200 Stephan Bosch (bbf725af33) - - submission-login: submission-proxy - Avoid sending empty XCLIENT FORWARD - field. - - -M src/submission-login/submission-proxy.c - -2021-06-18 19:31:54 +0200 Stephan Bosch (52516b0566) - - submission: Separately pass XCLIENT HELO value from pre-login to post-login - service. - - -M src/submission-login/client-authenticate.c -M src/submission/main.c -M src/submission/submission-client.c -M src/submission/submission-client.h - -2021-06-18 17:02:23 +0200 Stephan Bosch (019522fc34) - - submission: submission-backend-relay - Use - smtp_server_connection_get_proxy_data() for composing client settings. - - -M src/submission/submission-backend-relay.c - -2021-06-18 17:46:07 +0200 Stephan Bosch (13f5a8132c) - - submission: main - Restructure parsing of login input data. - - Needed for adding additional fields. - -M src/submission/main.c - -2021-06-18 16:43:55 +0200 Stephan Bosch (0c90556d3f) - - submission-login: client-authenticate - Restructure composition of - master_prefix. - - Needed for later commit. - -M src/submission-login/client-authenticate.c - -2021-06-18 19:27:40 +0200 Stephan Bosch (b33f1b875d) - - lib-smtp: smtp-server-connection - Record proxied EHLO domain separately. - - This prevents it from being overriden by a local EHLO command. - -M src/lib-smtp/smtp-server-connection.c -M src/lib-smtp/smtp-server-private.h - -2021-06-18 19:02:34 +0200 Stephan Bosch (53cdb6dedd) - - lib-smtp: smtp-server - Make smtp_server_connection_set_proxy_data() public. - - -M src/lib-smtp/smtp-server-private.h -M src/lib-smtp/smtp-server.h - -2021-06-18 16:54:51 +0200 Stephan Bosch (5f5f93e962) - - lib-smtp: smtp-server-connection - Use - smtp_server_connection_get_proxy_data() for the conn_proxy_data_updated() - callback. - - Removes code duplication. - -M src/lib-smtp/smtp-server-connection.c - -2021-06-18 16:52:26 +0200 Stephan Bosch (26b64133b2) - - lib-smtp: smtp-server-connection - Allow username/ehlo to be set before - smtp_server_connection_login(). - - This allows setting the proxy data early. - -M src/lib-smtp/smtp-server-connection.c - -2021-06-18 19:25:43 +0200 Stephan Bosch (0f55dcb0bd) - - lib-smtp: Reformat smtp-server.h. - - -M src/lib-smtp/smtp-server.h - -2021-06-18 16:31:08 +0200 Stephan Bosch (85669603b8) - - submission: Reformat submission-client.h. - - -M src/submission/submission-client.h - -2021-06-18 16:30:52 +0200 Stephan Bosch (cf73c66df0) - - submission: Reformat submission-client.c. - - -M src/submission/submission-client.c - -2021-06-24 00:19:16 +0200 Stephan Bosch (c8bdb4578c) - - login-common: Add support for recording rawlog of connection between proxy - and backend. - - -M src/login-common/client-common-auth.c -M src/login-common/login-proxy.c -M src/login-common/login-proxy.h -M src/login-common/login-settings.c -M src/login-common/login-settings.h - -2021-07-21 17:14:26 +0300 Timo Sirainen (d757b9af43) - - doveadm: Mark fs_cmd_help() with ATTR_NORETURN - - This helps static analyzers understand that the function doesn't return. - -M src/doveadm/doveadm-fs.c - -2021-07-21 17:12:05 +0300 Timo Sirainen (6e7928f5cf) - - doveadm: Avoid passing NULL to memcpy() even though zero bytes are copied - - Makes static analyzers happier. - -M src/doveadm/doveadm.c - -2021-07-19 16:38:08 +0300 Timo Sirainen (567d853885) - - doveadm: Remove dead assignment - - -M src/doveadm/client-connection-tcp.c - -2021-04-22 11:09:49 +0300 Timo Sirainen (a7146d0939) - - lib: Use 32 byte buffer for getting randomness - - This reduces the number of syscalls when small amount of randomness is - requested, like i_rand*() calls using only 4 bytes at a time. - -M src/lib/randgen.c - -2021-06-10 12:16:20 +0300 Timo Sirainen (8d396dda21) - - doveadm: Remove code related to obsolete doveadm_mail_cmd handling - - struct doveadm_mail_cmd couldn't be completely removed since v2 mail - commands are still converted to it. - -M src/doveadm/client-connection-tcp.c -M src/doveadm/doveadm-mail-batch.c -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-mail.h -M src/doveadm/doveadm.c - -2021-06-10 12:06:40 +0300 Timo Sirainen (5676c510bf) - - doveadm sync/backup/dsync-server: Convert to v2 command - - -M src/doveadm/doveadm-dsync.c -M src/doveadm/doveadm-dsync.h -M src/doveadm/doveadm-mail.c - -2021-06-10 11:51:51 +0300 Timo Sirainen (dfe41ddaac) - - doveadm batch: Convert to v2 command - - -M src/doveadm/doveadm-mail-batch.c -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-mail.h - -2021-06-10 01:14:14 +0300 Timo Sirainen (1e48423c17) - - doveadm: Remove struct doveadm_cmd and related code - - -M src/doveadm/client-connection-tcp.c -M src/doveadm/doveadm-cmd.c -M src/doveadm/doveadm-cmd.h -M src/doveadm/doveadm.c -M src/doveadm/doveadm.h -M src/doveadm/main.c - -2021-06-10 01:09:34 +0300 Timo Sirainen (875a371693) - - doveadm: Remove doveadm_cmd_ver2.old_cmd - - -M src/doveadm/doveadm-cmd.c -M src/doveadm/doveadm-cmd.h - -2021-06-10 01:08:16 +0300 Timo Sirainen (058f76650a) - - doveadm proxy: Convert to v2 commands - - -M src/doveadm/doveadm-proxy.c - -2021-06-10 01:03:46 +0300 Timo Sirainen (871adaab1f) - - doveadm oldstats: Convert to v2 commands - - -M src/doveadm/doveadm-oldstats.c - -2021-06-10 00:59:53 +0300 Timo Sirainen (3aef610846) - - doveadm stop/reload: Convert to v2 commands - - -M src/doveadm/doveadm-master.c - -2021-06-10 00:58:45 +0300 Timo Sirainen (59087d1dad) - - doveadm fs: Convert to v2 commands - - -M src/doveadm/doveadm-fs.c - -2021-06-10 00:45:43 +0300 Timo Sirainen (b6e92ea8fb) - - doveadm auth cache flush: Convert auth-server command to v2 - - -M src/doveadm/doveadm-auth-server.c -M src/doveadm/doveadm-auth.c - -2021-06-10 00:42:38 +0300 Timo Sirainen (af1d3d37f1) - - doveadm auth: Convert to v2 commands - - -M src/doveadm/doveadm-auth.c - -2021-06-10 00:18:17 +0300 Timo Sirainen (94734b9359) - - doveadm instance: Convert to v2 commands - - -M src/doveadm/doveadm-instance.c - -2021-06-10 00:05:28 +0300 Timo Sirainen (fc0b20f702) - - doveadm log: Convert to v2 commands - - -M src/doveadm/doveadm-log.c - -2021-06-10 00:01:00 +0300 Timo Sirainen (f8290ea73a) - - doveadm replicator: Convert to v2 commands - - -M src/doveadm/doveadm-replicator.c - -2021-06-09 23:48:10 +0300 Timo Sirainen (f1524717c6) - - doveadm config: Convert to v2 command - - -M src/doveadm/doveadm.c - -2021-06-09 23:45:51 +0300 Timo Sirainen (476dc132cb) - - doveadm exec: Convert to v2 command - - -M src/doveadm/doveadm.c - -2021-06-10 14:23:46 +0300 Timo Sirainen (938428f914) - - doveadm: Add CMD_FLAG_NO_UNORDERED_OPTIONS - - -M src/doveadm/doveadm-cmd.c -M src/doveadm/doveadm-cmd.h - -2021-06-09 23:44:29 +0300 Timo Sirainen (8b461f612c) - - doveadm: Add CMD_FLAG_NO_OPTIONS - - This allows command to process all parameters, including parameters starting - with "-". - -M src/doveadm/doveadm-cmd.c -M src/doveadm/doveadm-cmd.h - -2021-06-09 23:39:54 +0300 Timo Sirainen (b086c1a88b) - - doveadm: Split off doveadm_cmd_process_options() - - -M src/doveadm/doveadm-cmd.c - -2021-06-09 23:37:19 +0300 Timo Sirainen (087ec4374b) - - doveadm: Reformat doveadm-cmd.c - - -M src/doveadm/doveadm-cmd.c - -2021-06-09 23:21:27 +0300 Timo Sirainen (9f305a24c5) - - doveadm help: Convert to v2 command - - -M src/doveadm/doveadm.c - -2021-06-09 23:13:30 +0300 Timo Sirainen (7b67742aa7) - - doveadm dump: Convert to v2 command - - -M src/doveadm/doveadm-cmd.h -M src/doveadm/doveadm-dump.c -M src/doveadm/doveadm.c - -2021-06-09 23:10:08 +0300 Timo Sirainen (4a508ba07a) - - doveadm dump: Change doveadm_cmd_dump.cmd() API to be simpler - - -M src/doveadm/doveadm-dump-dbox.c -M src/doveadm/doveadm-dump-dcrypt-file.c -M src/doveadm/doveadm-dump-dcrypt-key.c -M src/doveadm/doveadm-dump-index.c -M src/doveadm/doveadm-dump-log.c -M src/doveadm/doveadm-dump-mailboxlog.c -M src/doveadm/doveadm-dump-thread.c -M src/doveadm/doveadm-dump.c -M src/doveadm/doveadm-dump.h -M src/doveadm/doveadm-zlib.c -M src/plugins/fts-lucene/doveadm-fts-lucene.c -M src/plugins/fts/doveadm-dump-fts-expunge-log.c - -2021-06-09 23:02:36 +0300 Timo Sirainen (ced5df32b5) - - doveadm pw: Convert to v2 command - - -M src/doveadm/doveadm-cmd.h -M src/doveadm/doveadm-pw.c -M src/doveadm/doveadm.c - -2021-06-09 22:55:55 +0300 Timo Sirainen (cfe3a83df7) - - doveadm mailbox mutf7: Convert to v2 command - - -M src/doveadm/doveadm-cmd.c -M src/doveadm/doveadm-cmd.h -M src/doveadm/doveadm-mutf7.c - -2021-06-09 22:47:35 +0300 Timo Sirainen (07ba60c061) - - doveadm sis deduplicate/find: Convert to v2 command - - -M src/doveadm/doveadm-cmd.c -M src/doveadm/doveadm-cmd.h -M src/doveadm/doveadm-sis.c - -2021-06-09 22:42:54 +0300 Timo Sirainen (11439a8366) - - doveadm zlibconnect: Convert to v2 command - - -M src/doveadm/doveadm-cmd.h -M src/doveadm/doveadm-zlib.c -M src/doveadm/doveadm.c - -2021-06-09 22:39:55 +0300 Timo Sirainen (580b696a1f) - - doveadm: Code cleanup - Add doveadm_cmdline_commands_ver2[] - - -M src/doveadm/doveadm.c - -2021-06-10 16:56:06 +0300 Timo Sirainen (3d52021b2d) - - doveadm: Support building ARRAY type mail command parameters - - -M src/doveadm/doveadm-mail.c - -2021-06-10 16:55:04 +0300 Timo Sirainen (5dc7039807) - - doveadm: Fix building IP/INT64 type mail command parameters - - -M src/doveadm/doveadm-mail.c - -2021-06-10 16:51:58 +0300 Timo Sirainen (ce9ac4a9cc) - - doveadm: Split off doveadm_cmd_parse_arg() - - -M src/doveadm/doveadm-mail.c - -2020-12-03 19:20:32 +0200 Timo Sirainen (6477f9be35) - - lib: Fix assert-crash when destroying ioloop that has active context - - Normally the ioloop shouldn't have an active context at deinit, but it seems - to be possible in some situations. It's not really bad anyway, so just allow - it. - - Fixes: Panic: file ioloop.c: line 928 (io_loop_destroy): assertion failed: - (ioloop->cur_ctx == NULL) - -M src/lib/ioloop.c -M src/lib/test-ioloop.c - -2021-07-19 14:56:47 +0300 Timo Sirainen (eac71a2968) - - lib-mail: Fix memory leak in istream-header-filter - - Broken by 1c1b77dbf9a548aac788efb76973ce2d0fa6c732 - -M src/lib-mail/istream-header-filter.c - -2021-07-19 13:54:24 +0300 Timo Sirainen (5bd95c2ba9) - - lib: data-stack - t_try_realloc() - Add missing - data_stack_last_buffer_reset() call - - This fixes incorrect "buffer overflow" panics with DEBUG builds. - -M src/lib/data-stack.c - -2021-07-19 13:52:58 +0300 Timo Sirainen (7dedc453ca) - - lib: data-stack - data_stack_last_buffer_reset(() - Add comments and an - assert - - This clarifies how the function is expected to work. - -M src/lib/data-stack.c - -2021-07-12 14:26:38 +0200 Markus Valentin (4fdb040d24) - - lib-storage: Use escaped name length to calculate truncation margin - - This fixes corruption of mailbox names when the storage_name_escape_char has - been part of the parent folder name. - - Broken by 5dd81d83d8d9120ed2a74d5bd2aa62622885b49c - -M src/lib-storage/list/mailbox-list-index-iter.c - -2021-07-12 13:40:58 +0300 Aki Tuomi (14ad268aa1) - - lib-lua: Fix LIBDICT_LUA variable usage - - It needs to be appended to, not set again. Broken by - 3d0b7e9bb59e3dc41fd5a4d09832eedea7a92933. - -M src/lib-lua/Makefile.am - -2021-07-08 12:24:47 +0300 Aki Tuomi (3d0b7e9bb5) - - lib-lua: Only link libdict_lua if it's available - - -M src/lib-lua/Makefile.am - -2021-07-08 11:10:38 +0300 Aki Tuomi (b4827bc2f2) - - plugins/fts: Restore fts_indexer_cmd - - It was removed in cf114f90e0ba25c18db846ee582e3a130bd52949 and that broke - some FTS plugins. - -M src/plugins/fts/fts-indexer.c - -2021-06-22 13:28:34 +0200 Timo Sirainen (3bac871aea) - - lib-dict: Fix linking when building without Lua - - Linking didn't work on some non-Linux OSes (non-GNU linkers?) - -M src/lib-dict/Makefile.am - -2021-06-04 11:16:53 +0300 Timo Sirainen (b0a354f7a9) - - lib-compression: istream-zstd - Make sure parent stream error isn't - overwritten - - This could have happened if the parent istream failed before the zstd header - was read. Practically this didn't happen currently, because the initial - parent stream error was normally already handled by istream-decompress - before istream-zstd was even called. - -M src/lib-compression/istream-zstd.c - -2021-06-04 11:16:22 +0300 Timo Sirainen (8e3a7d9a50) - - lib-compression: istream-zlib - Fix parent stream error handling near EOF - - This happened when gz stream (including trailer) was fully read, but the - final check to see if there is a concatenated gz stream afterwards failed - due to parent istream failure. In this case the error was ignored and - istream returned success, truncating any potential concatenated istream - input. This situation was very unlikely to happen. - -M src/lib-compression/istream-zlib.c - -2021-05-27 19:34:50 +0300 Timo Sirainen (1c1b77dbf9) - - lib-mail: Fix istream-header-filter snapshotting - - -M src/lib-mail/istream-header-filter.c -M src/lib-mail/test-istream-header-filter.c - -2021-06-17 19:55:56 +0300 Timo Sirainen (25e0619c01) - - lib: Add istream_snapshot.free() to allow more complex snapshots - - -M src/lib/istream-private.h -M src/lib/istream.c - -2021-06-15 12:21:22 +0200 Markus Valentin (f8c0c372a9) - - lib-storage: Make use of MAIL_INDEX_VIEW_SYNC_FLAG_2ND_INDEX - - -M src/lib-storage/index/index-sync-pvt.c - -2021-06-15 12:19:00 +0200 Markus Valentin (1d9b391105) - - lib-index: Introduce MAIL_INDEX_VIEW_SYNC_FLAG_2ND_INDEX - - This flag is used to make sure secondary views flags-index can work properly - without emitting warnings about inconsistency. If an inconsistency is - encountered fix it by fully syncing. - -M src/lib-index/mail-index-view-sync.c -M src/lib-index/mail-index.h - -2021-06-15 08:59:17 +0200 Markus Valentin (c1f2323e15) - - Revert "lib-storage: Always fix inconsistency when syncing private flags - index" - - This reverts commit 986d9cbbecffd836d977b6ad956b04e3ca606677. - - This is reverted because storing flags on private indexes no longer send - untagged replies. - -M src/lib-storage/index/index-sync-private.h -M src/lib-storage/index/index-sync-pvt.c -M src/lib-storage/index/index-sync.c -M src/lib-storage/index/index-transaction.c - -2021-07-01 10:46:05 +0200 Markus Valentin (9183e2b3af) - - acl: Ignore acls in acl_lookup_dict_rebuild_add_backend if ignore_acls is - set - - In case an namespace has been configured to ignore ACLs also respect that - when acl_lookup_dict_rebuild is called. - - Co-Authored-By: Vincent Brillault - -M src/plugins/acl/acl-lookup-dict.c - -2021-06-02 00:40:19 +0200 Stephan Bosch (357ff0b35b) - - lib-smtp: test-smtp-payload - Set all timeouts to CLIENT_PROGRESS_TIMEOUT. - - This prevents connect and idle timeouts from triggering earlier than the - progress timeout. - -M src/lib-smtp/test-smtp-payload.c - -2021-06-22 11:52:02 -0600 Michael M Slusarz (c5edbe6007) - - imap: PREVIEW responses need trailing space - - 2.3.15 regression - - Before 2.3.15, there was this same buggy behavior in error cases; 2.3.15 - moved that buggy behavior to the success code path - - DOP-2463 - -M src/imap/imap-fetch-body.c - -2021-06-14 23:46:48 +0300 Timo Sirainen (5fbff5f80d) - - doveadm-server: Add log prefix to logs written to client - - -M src/doveadm/client-connection-tcp.c - -2021-06-14 23:43:11 +0300 Timo Sirainen (8f2033be24) - - doveadm-server: Simplify writing log output to client - - -M src/doveadm/client-connection-tcp.c - -2021-06-14 20:14:13 +0200 Timo Sirainen (c4acd0ce0e) - - lib: Fix log prefix in internal handler when log handler has been overridden - - Adds back mail_log_prefix to doveadm mail commands when doveadm-server was - accessed via TCP. - - Originally broken by c9dd53f7180a78668cbc1e6eb34d5b1722beccb9 - -M src/lib/failures.c - -2021-06-04 23:00:21 +0100 Siavash Tavakoli (60cbb2959c) - - dict-file: Make sure home_dir doesn't change during operations - - file_dict is initialized for a specific user. Keep record of the user's - home_dir and check for all dict operations that the user did not change. - -M src/lib-dict/dict-file.c - -2021-06-02 16:17:22 +0100 Siavash Tavakoli (ebc92f1ba7) - - global: Remove dict_settings.home_dir - - Allows dict to be shared across users. Dict operations use - dict_op_settings.home_dir if set. - -M src/lib-dict/dict-file.c -M src/lib-dict/dict.h -M src/lib-storage/index/index-attribute.c -M src/plugins/last-login/last-login-plugin.c -M src/plugins/notify-status/notify-status-plugin.c -M src/plugins/quota-clone/quota-clone-plugin.c -M src/plugins/quota/quota-dict.c -M src/plugins/quota/quota.c - -2021-05-26 15:18:20 +0100 Siavash Tavakoli (bdcdd37fb0) - - dict: Split protocol command arguments in dict_command_input() - - Instead of duplicating code and splitting in each command functions - separately. - -M src/dict/dict-commands.c - -2021-05-26 01:41:51 +0100 Siavash Tavakoli (e222a33dc1) - - lib-dict: Make sure username is valid as well when checking key prefix - - If this is a private key, username must be non-empty. - -M src/lib-dict/dict.c - -2021-05-24 12:54:58 +0100 Siavash Tavakoli (4c15dc4ede) - - dict: Remove dict_connection.username and dict_settings.username - - - dict should be user agnostic. dict operations have username. - - same for dict connection - - also removes username from dict process' log prefix - -M src/auth/db-dict.c -M src/auth/db-oauth2.c -M src/dict/dict-connection.c -M src/dict/dict-connection.h -M src/doveadm/doveadm-dict.c -M src/lib-dict-backend/test-dict-sql.c -M src/lib-dict-extra/dict-fs.c -M src/lib-dict-extra/test-dict-fs.c -M src/lib-dict/dict.c -M src/lib-dict/dict.h -M src/lib-dict/test-dict-client.c -M src/lib-fs/fs-dict.c -M src/lib-oauth2/test-oauth2-jwt.c -M src/lib-storage/index/index-attribute.c -M src/plugins/acl/acl-lookup-dict.c -M src/plugins/last-login/last-login-plugin.c -M src/plugins/notify-status/notify-status-plugin.c -M src/plugins/quota-clone/quota-clone-plugin.c -M src/plugins/quota/quota-dict.c -M src/plugins/quota/quota.c - -2021-06-03 19:59:23 +0100 Siavash Tavakoli (037442cde7) - - dict: Add username field for command events - - To prepare for connection username removal in next commit. Instead of adding - username field for the parent event, add it in command events. - - Commands can now be run for different users. Having the same username field - as the one used in initialization can be wrong. - -M src/dict/dict-commands.c -M src/dict/dict-connection.c - -2021-05-24 11:47:15 +0100 Siavash Tavakoli (a9e6e57a73) - - dict-client: Do not send username in initial handshake - - Dict commands that need username have it included in their arguments now. - -M src/lib-dict/dict-client.c - -2021-05-24 11:58:44 +0100 Siavash Tavakoli (2af85d6cbc) - - dict-fs: Remove unused fs_dict.username - - -M src/lib-dict-extra/dict-fs.c - -2021-05-24 11:58:02 +0100 Siavash Tavakoli (88636cd5a1) - - dict-redis: Remove unused redis_dict.username - - -M src/lib-dict/dict-redis.c - -2021-05-24 11:57:18 +0100 Siavash Tavakoli (f7da270894) - - dict-memcached-ascii: Remove unused memcached_ascii_dict.username - - -M src/lib-dict/dict-memcached-ascii.c - -2021-05-24 11:56:29 +0100 Siavash Tavakoli (e2a74dab49) - - dict-sql: Remove unused sql_dict.username - - -M src/lib-dict-backend/dict-sql-private.h -M src/lib-dict-backend/dict-sql.c - -2021-05-24 11:54:56 +0100 Siavash Tavakoli (38ae540aa5) - - dict-ldap: Remove unused ldap_dict.username - - -M src/lib-dict-backend/dict-ldap.c - -2021-06-03 21:27:31 +0100 Siavash Tavakoli (6c94259f8f) - - dict: Add dict_event_create - - Helper function for dict events. If dict_op_settings has username set, adds - it as a field. - -M src/lib-dict/dict.c - -2021-06-03 21:18:03 +0100 Siavash Tavakoli (843cb951df) - - dict-client: Send username in commands - - Lookup, iterate_begin, and transaction_begin need username. This bumps dict - protocol's major version to 3. - -M src/lib-dict/dict-client.c -M src/lib-dict/dict-client.h - -2021-06-03 21:16:22 +0100 Siavash Tavakoli (bb6c727856) - - dict-redis: Use dict_op_settings to get full key - - Switch from dict.username to dict_op_settings.username. Also, ensure that - username is escaped. - -M src/lib-dict/dict-redis.c - -2021-06-03 21:14:51 +0100 Siavash Tavakoli (3d78c522f7) - - dict-memcached-ascii: Use dict_op_settings to get full key - - Switch from dict.username to dict_op_settings.username. - -M src/lib-dict/dict-memcached-ascii.c - -2021-06-03 21:12:27 +0100 Siavash Tavakoli (f4d43cf907) - - dict-fs: Use dict_op_settings to get full key - - Switch from dict.username to dict_op_settings.username. - -M src/lib-dict-extra/dict-fs.c - -2021-06-03 20:58:05 +0100 Siavash Tavakoli (6ed788ca21) - - dict: Use dict_op_settings in backends - - - Use dict_op_settings in dict API functions - - forward the settings object to backends for dict lookup/iterate - - Update backends to use dict_op_settings - -M src/lib-dict-backend/dict-cdb.c -M src/lib-dict-backend/dict-ldap.c -M src/lib-dict-backend/dict-sql.c -M src/lib-dict-extra/dict-fs.c -M src/lib-dict/dict-client.c -M src/lib-dict/dict-fail.c -M src/lib-dict/dict-file.c -M src/lib-dict/dict-memcached-ascii.c -M src/lib-dict/dict-memcached.c -M src/lib-dict/dict-private.h -M src/lib-dict/dict-redis.c -M src/lib-dict/dict.c - -2021-06-03 18:31:57 +0100 Siavash Tavakoli (8d69e81674) - - notify-status: Initialize dict_op_settings for dict operations - - -M src/plugins/notify-status/notify-status-plugin.c - -2021-06-03 18:32:50 +0100 Siavash Tavakoli (b87665654f) - - last-login: Initialize dict_op_settings for dict operations - - -M src/plugins/last-login/last-login-plugin.c - -2021-06-03 18:30:17 +0100 Siavash Tavakoli (88f5f42541) - - quota: Initialize dict_op_settings for dict operations - - -M src/plugins/quota-clone/quota-clone-plugin.c -M src/plugins/quota/quota-dict.c -M src/plugins/quota/quota.c - -2021-06-03 19:32:26 +0100 Siavash Tavakoli (42052d71f3) - - dict: Initialize dict_op_settings for dict operations - - -M src/dict/dict-commands.c - -2021-06-03 18:33:21 +0100 Siavash Tavakoli (b70da6c60b) - - acl: Initialize dict_op_settings for dict lookup - - -M src/plugins/acl/acl-lookup-dict.c - -2021-06-03 18:34:26 +0100 Siavash Tavakoli (737e107ef7) - - lib-oauth2: Initialize dict_op_settings for dict operations - - -M src/lib-oauth2/oauth2-jwt.c -M src/lib-oauth2/test-oauth2-jwt.c - -2021-06-03 18:41:14 +0100 Siavash Tavakoli (683c314667) - - lib-dict: lua: Initialize dict_op_settings for dict operations - - - Add new mandatory argument for lookup, set, and transaction_begin. - - Use the username to initialize dict_op_settings passed to lib-dict API - -M src/lib-dict/dict-iter-lua.c -M src/lib-dict/dict-lua.c -M src/lib-dict/dict-txn-lua.c - -2021-07-01 20:39:41 +0100 Siavash Tavakoli (b3ab76ff1d) - - lib-dict-extra: test-dict-fs: Initialize dict_op_settings for dict - operations - - -M src/lib-dict-extra/test-dict-fs.c - -2021-06-03 18:39:39 +0100 Siavash Tavakoli (b150ee039c) - - lib-dict-backend: test-dict-sql: Initialize dict_op_settings for dict - operations - - -M src/lib-dict-backend/test-dict-sql.c - -2021-06-03 18:38:50 +0100 Siavash Tavakoli (051d8cbe36) - - lib-dict: test-dict-client: Initialize dict_op_settings for dict operations - - -M src/lib-dict/test-dict-client.c - -2021-06-03 18:36:04 +0100 Siavash Tavakoli (7fce91db18) - - lib-storage: Initialize dict_op_settings for dict operations - - -M src/lib-storage/index/index-attribute.c - -2021-06-03 18:35:28 +0100 Siavash Tavakoli (f2083c0b5c) - - lib-fs: Initialize dict_op_settings for dict operations - - -M src/lib-fs/fs-dict.c - -2021-06-03 18:13:31 +0100 Siavash Tavakoli (11046766af) - - auth: userdb-dict: Initialize dict_op_settings for dict iterate - - -M src/auth/userdb-dict.c - -2021-06-03 18:11:47 +0100 Siavash Tavakoli (09e89ca08a) - - auth: db-dict: Initialize dict_op_settings for dict lookup - - -M src/auth/db-dict.c - -2021-06-03 12:53:08 +0100 Siavash Tavakoli (8ec65b7e0c) - - doveadm dict: Initialize & use dict_op_settings for dict commands - - Sets the username in cmd_dict_init_full and use the settings struct for dict - operations. - -M src/doveadm/doveadm-dict.c - -2021-06-03 00:06:44 +0100 Siavash Tavakoli (64719ad090) - - lib-storage: Add mail_user.dict_op_set and mail_user_get_dict_op_settings() - - Used to initialize or obtain dict_op_settings for the user. - -M src/lib-storage/mail-user.c -M src/lib-storage/mail-user.h - -2021-06-04 15:39:05 +0100 Siavash Tavakoli (aceb659c98) - - lib-storage: mail-user: Clarify mail_user_get_home() usage string - - Explicitly comment about returned string lifetime. - -M src/lib-storage/mail-user.h - -2021-05-18 17:52:55 +0100 Siavash Tavakoli (5b579636a4) - - dict: Optionally accept username in lookup/iterate/begin dict protocol - commands - - Only an optional field, don't actually use it. - -M src/dict/dict-commands.c - -2021-05-28 11:57:39 +0100 Siavash Tavakoli (f976f4ac89) - - dict-file: Remove file_dict_iterate_path struct - - No need for the struct since support for multi-path iterate is removed. So - path and path length can be merged with file_dict_iterate_context. - -M src/lib-dict/dict-file.c - -2021-05-26 13:47:50 +0100 Siavash Tavakoli (32e8bd5b5a) - - dict backends: Remove multi-path handling code in dict iteration - - With mutli-path iteration support being dropped from dict protocol, these - can be cleaned up. - -M src/lib-dict-backend/dict-cdb.c -M src/lib-dict-backend/dict-sql.c -M src/lib-dict-extra/dict-fs.c -M src/lib-dict/dict-client.c -M src/lib-dict/dict-fail.c -M src/lib-dict/dict-file.c -M src/lib-dict/dict-private.h -M src/lib-dict/dict.c - -2021-05-26 12:15:06 +0100 Siavash Tavakoli (cbc81b4471) - - dict: Drop support for multi-path iteration in dict protocol - - Remove dict_iterate_init_multiple() since it is not used anywhere. Also drop - support in dict protocol to read multiple paths. - -M src/dict/dict-commands.c -M src/lib-dict/dict.c -M src/lib-dict/dict.h - -2021-05-18 01:50:03 +0100 Siavash Tavakoli (ecc4985151) - - lib-dict: Add dict_op_settings_dup() and dict_op_settings_private_free() - - - dict_op_settings_dup() creates a copy of dict_op_settings into a new - struct dict_dop_settings_private. - - dict_op_settings_private_free() frees the memory for copied object. - -M src/lib-dict/dict-private.h -M src/lib-dict/dict.c - -2021-05-03 15:09:49 +0100 Siavash Tavakoli (4aeba6af64) - - lib-dict: Add dict_op_settings parameter for dict_iterate_init() - - Only adds the parameter, doesn't use it. - -M src/auth/userdb-dict.c -M src/doveadm/doveadm-dict.c -M src/lib-dict-backend/test-dict-sql.c -M src/lib-dict/dict-iter-lua.c -M src/lib-dict/dict.c -M src/lib-dict/dict.h -M src/lib-dict/test-dict-client.c -M src/lib-fs/fs-dict.c -M src/lib-storage/index/index-attribute.c -M src/plugins/acl/acl-lookup-dict.c - -2021-05-03 15:09:01 +0100 Siavash Tavakoli (8c0a16627e) - - lib-dict: Add dict_op_settings parameter for dict_transaction_begin() - - Only adds the parameter, doesn't use it. - -M src/dict/dict-commands.c -M src/doveadm/doveadm-dict.c -M src/lib-dict-backend/test-dict-sql.c -M src/lib-dict-extra/test-dict-fs.c -M src/lib-dict/dict-txn-lua.c -M src/lib-dict/dict.c -M src/lib-dict/dict.h -M src/lib-dict/test-dict-client.c -M src/lib-fs/fs-dict.c -M src/lib-oauth2/test-oauth2-jwt.c -M src/lib-storage/index/index-attribute.c -M src/plugins/acl/acl-lookup-dict.c -M src/plugins/last-login/last-login-plugin.c -M src/plugins/notify-status/notify-status-plugin.c -M src/plugins/quota-clone/quota-clone-plugin.c -M src/plugins/quota/quota-dict.c -M src/plugins/quota/quota.c - -2021-05-03 13:42:56 +0100 Siavash Tavakoli (c840870249) - - lib-dict: Add dict_op_settings - - Used for dict operations. Currently username & home_dir are used. Also, - change dict_lookup() to accept a parameter of this type but don't actually - use it. - -M src/auth/db-dict.c -M src/dict/dict-commands.c -M src/doveadm/doveadm-dict.c -M src/lib-dict-backend/test-dict-sql.c -M src/lib-dict-extra/test-dict-fs.c -M src/lib-dict/dict-client.c -M src/lib-dict/dict-lua.c -M src/lib-dict/dict.c -M src/lib-dict/dict.h -M src/lib-dict/test-dict-client.c -M src/lib-fs/fs-dict.c -M src/lib-oauth2/oauth2-jwt.c -M src/lib-storage/index/index-attribute.c -M src/plugins/quota/quota-dict.c - -2021-05-03 12:15:54 +0100 Siavash Tavakoli (53fa6616c5) - - lib-dict: Remove dict_settings.value_type - - It was originally added to dict-db and no other backend uses it. With - dict-db removed, there is no need to keep it. - -M src/auth/db-oauth2.c -M src/dict/dict-connection.c -M src/lib-dict/dict-client.c -M src/lib-dict/dict.h -M src/lib-oauth2/test-oauth2-jwt.c - -2021-05-12 12:54:30 +0100 Siavash Tavakoli (08fee75254) - - dict-client: Escape username and dict uri in handshake HELLO message - - -M src/lib-dict/dict-client.c - -2021-04-30 14:42:46 +0100 Siavash Tavakoli (d5acb577c9) - - lib-dict-backen: Drop unused dict-db - - -M src/lib-dict-backend/Makefile.am -D src/lib-dict-backend/dict-db.c - -2021-06-24 12:56:05 -0400 Josef 'Jeff' Sipek (5a7c7869c7) - - virtual: Expunge old emails if backend box uidvalidity changed - - -M src/plugins/virtual/virtual-storage.h -M src/plugins/virtual/virtual-sync.c - -2021-06-14 23:28:48 +0300 Timo Sirainen (9ea5d36197) - - doveadm-server: Don't return two error lines if a command fails - - This normally didn't affect doveadm client usage, but it did break reply - matching when multiple usernames were handled by a single command (e.g. - wildcard users). - -M src/doveadm/client-connection-tcp.c - -2020-12-10 10:44:42 +0200 Timo Sirainen (e4ab282d56) - - lib-http: test-http-client-errors - Don't rely on sleeps - - Use the notification signal API instead. Also it's only one test (group) - that needs to do this. - -M src/lib-http/test-http-client-errors.c - -2021-06-18 14:19:36 +0300 Timo Sirainen (ec04bc903e) - - lib-test: Add notification signal send/wait API - - This allows a simple way for child/parent processes to communicate when - they're ready. SIGHUP signal is reserved for this. - -M src/lib-test/test-subprocess.c -M src/lib-test/test-subprocess.h - -2020-12-10 10:54:25 +0200 Timo Sirainen (6192e2a196) - - doveadm batch: Fix assert-crash that happened when it was attempted to be - used - - Fixes: Panic: file mail-storage.c: line 1067 (mailbox_set_reason): assertion - failed: (reason != NULL) - -M src/doveadm/doveadm-mail-batch.c - -2021-06-25 14:52:11 +0200 Markus Valentin (d2d021efe0) - - lib-fs: metawrap - Fix handling empty file - - As empty files are already closed when fs-metawrap attempts to append - metadata there have been problems with size calculation. Fix this by relying - on the same mechanism as if metadata changed during write. - - This recreates metadata and keeps old body. This fixes an issue when writing - empty mails to cache (failed: Cached message size larger than expected). - - This was introduced by 03e102ddccaae9e944c503d4269de755731798e8a - -M src/lib-fs/fs-metawrap.c - -2021-06-25 14:28:57 +0200 Markus Valentin (cab617276a) - - lib-fs: fs-metawrap - Expect fs_stat to return size 0 for empty file - - -M src/lib-fs/test-fs-metawrap.c - -2021-06-14 12:47:15 +0300 Timo Sirainen (f0256e3d60) - - NEWS: Updates for v2.3.15 - - -M NEWS - -2021-05-24 14:03:57 +0300 Aki Tuomi (7ad5753566) - - NEWS: Add news for 2.3.14.1 - - -M NEWS - -2021-05-22 00:16:38 +0200 Stephan Bosch (bcdbf445a9) - - lib-smtp: smtp-server-connection - Fix STARTTLS command injection - vulnerability. - - The input handler kept reading more commands even though the input was - locked by the STARTTLS command, thereby causing it to read the command - pipelined beyond STARTTLS. This causes a STARTTLS command injection - vulerability. - -M src/lib-smtp/smtp-server-cmd-starttls.c -M src/lib-smtp/smtp-server-connection.c - -2021-06-08 09:13:25 +0300 Aki Tuomi (9b04e6fbfb) - - lib-dict-extra: dict-fs - Escape unsafe paths - - Change any path components that are `.` or `..` to `...` and `....`. - Prevents path traversal attacks. - -M src/lib-dict-extra/Makefile.am -M src/lib-dict-extra/dict-fs.c -A src/lib-dict-extra/test-dict-fs.c - -2021-06-08 09:04:21 +0300 Aki Tuomi (15682a20d5) - - lib-oauth2: Do not escape '.' - - This is not really needed and just makes things difficult. - -M src/lib-oauth2/oauth2-jwt.c -M src/lib-oauth2/test-oauth2-jwt.c - -2021-05-03 09:58:29 +0300 Aki Tuomi (368adea6d9) - - lib-oauth2: Add missing test_begin/test_end to token escape - - -M src/lib-oauth2/test-oauth2-jwt.c - -2021-04-14 19:17:30 +0300 Aki Tuomi (dde02b27df) - - lib-oauth2: test-oauth2-jwt - Fix linkage for openssl - - Without whole archive option ssl_iostream_unref isn't included in linkage, - which will prevent libdcrypt from loading openssl backend. - -M src/lib-oauth2/Makefile.am - -2020-11-19 19:55:42 +0200 Aki Tuomi (137558d31c) - - lib-oauth2: Ensure azp is escaped too - - -M src/lib-oauth2/oauth2-jwt.c -M src/lib-oauth2/test-oauth2-jwt.c - -2021-04-14 13:47:16 +0300 Aki Tuomi (cf8f670629) - - lib-oauth2: Add test for token escape - - -M src/lib-oauth2/test-oauth2-jwt.c - -2021-04-14 14:12:16 +0300 Aki Tuomi (8b716828c4) - - lib-oauth2: Improve identifier escaping function - - -M src/lib-oauth2/oauth2-jwt.c - -2021-04-10 17:54:45 +0300 Aki Tuomi (1db66e3950) - - lib-oauth2: Move identifier escaping to own function - - -M src/lib-oauth2/oauth2-jwt.c - -2021-03-25 15:36:49 +0200 Timo Sirainen (fa92b1a362) - - lib-storage: Sync mailbox if autoexpunging finds mails that are already - expunged - - The syncing should remove the mails from the index. - -M src/lib-storage/mail-autoexpunge.c - -2021-03-25 15:34:14 +0200 Timo Sirainen (0e8844adc3) - - lib-storage: Fix infinite loop in autoexpunging if the mails are already - expunged - - This happens if the mails exist in the index, but mail_get_save_date() fails - with MAIL_ERROR_EXPUNGED. - -M src/lib-storage/mail-autoexpunge.c - -2021-05-31 14:48:42 +0300 Aki Tuomi (8609b88e86) - - plugins/fts: Use event logging - - -M src/plugins/fts/fts-indexer.c - -2021-05-26 13:55:52 +0300 Aki Tuomi (cf114f90e0) - - plugins/fts: fts-indexer - Use connection.c functions - - -M src/plugins/fts/fts-indexer.c - -2021-05-31 19:31:35 +0300 Aki Tuomi (43d18b2d3f) - - plugins/fts: fts-indexer - Move fts_indexer_init to end of file - - Simplifies next commit - -M src/plugins/fts/fts-indexer.c - -2021-05-26 13:54:56 +0300 Aki Tuomi (1510536887) - - plugins/fts: fts-indexer - Use connection structures - - -M src/plugins/fts/fts-indexer.c - -2021-05-06 14:55:55 +0300 Aki Tuomi (b832f6c3c1) - - indexer: worker - Fix busy/free status - - Determining whether worker is free or not should be determined using - worker_connection_is_busy, not whether there are connections in the list. - - A worker connection is busy when it has a request. - -M src/indexer/indexer.c -M src/indexer/worker-pool.c - -2021-05-06 12:54:15 +0300 Aki Tuomi (f62a258493) - - indexer: indexer-client - Use connection.c functions - - -M src/indexer/indexer-client.c -M src/indexer/indexer-client.h -M src/indexer/indexer.c - -2021-05-06 12:41:39 +0300 Aki Tuomi (0273caf1b9) - - indexer: indexer-client - Use connection structure - - -M src/indexer/indexer-client.c - -2021-05-06 12:08:39 +0300 Aki Tuomi (0dfa2531ae) - - indexer: indexer-worker - Use event logging - - -M src/indexer/master-connection.c - -2021-05-06 12:03:16 +0300 Aki Tuomi (bf42ae1ae7) - - indexer: indexer-worker: Use connection.c functions - - -M src/indexer/indexer-worker.c -M src/indexer/master-connection.c -M src/indexer/master-connection.h - -2021-05-06 11:42:37 +0300 Aki Tuomi (2f5494df0a) - - indexer: indexer-worker: Use connection structure - - -M src/indexer/master-connection.c - -2021-05-06 11:21:43 +0300 Aki Tuomi (990b69f195) - - indexer: worker-connection - Use connection.c functions - - -M src/indexer/worker-connection.c -M src/indexer/worker-connection.h -M src/indexer/worker-pool.c - -2021-05-06 10:59:24 +0300 Aki Tuomi (1ed0c8be75) - - indexer: worker-connection - Prepare for using connection.c - - -M src/indexer/worker-connection.c -M src/indexer/worker-connection.h -M src/indexer/worker-pool.c - -2021-05-06 10:56:40 +0300 Aki Tuomi (57317458ce) - - indexer: worker-pool - Use connection_list - - -M src/indexer/worker-pool.c - -2021-05-06 10:49:23 +0300 Aki Tuomi (61f8942012) - - indexer: worker-pool - Remove unused last_use - - -M src/indexer/worker-pool.c - -2021-05-06 10:29:23 +0300 Aki Tuomi (4225108434) - - indexer: worker-connection - Use connection.h structures - - -M src/indexer/indexer.c -M src/indexer/worker-connection.c -M src/indexer/worker-connection.h -M src/indexer/worker-pool.c -M src/indexer/worker-pool.h - -2021-05-06 10:11:54 +0300 Aki Tuomi (d76761698a) - - indexer: worker-connection - Move constructor further down - - Simplifies next commit - -M src/indexer/worker-connection.c - -2021-05-06 10:11:24 +0300 Aki Tuomi (9aadd7fa03) - - Reformat worker-connection.c - - -M src/indexer/worker-connection.c - -2021-05-25 10:38:46 +0300 Aki Tuomi (7fcf330135) - - lib: lib-event - Copy ru_last when making passthrough event - - Otherwise user_cpu_usecs does not get added to the sent events. - -M src/lib/lib-event.c -M src/lib/lib-event.h - -2021-05-06 14:29:03 +0300 Aki Tuomi (da607df02a) - - master: Fix idle-kill for processes with a single short-lived client - - lib-master sends unimportant service status updates to master only once per - second when client_limit>1, because within that 1 second the available - client count may have already changed many times. Normally this is fine, but - there's a problem with the initial client: - - * The client connection launches a new process - * The process sends the initial status notification with available_count=MAX - * The client connection is handled, but because the status notification was - just sent, the update won't be sent until 1 second later - * The client disconnects within the 1 second - * The available_count is again MAX, so no status notification is sent - - In this situation the master process never created the idle-kill timeout. - Usually the following clients will cause a status notification to be sent, - but if there was only the one client then this process won't be idle-killed. - Fix the situation so that the idle-kill timeout is created already by the - initial status notification. - -M src/master/service-monitor.c - -2021-06-03 19:04:26 +0300 Timo Sirainen (bb618563b7) - - lib: Add array_foreach_reverse[_modifiable]() - - This is especially useful when deleting multiple elements inside the loop. - -M src/lib/array.h -M src/lib/test-array.c - -2021-06-03 16:50:39 +0300 Timo Sirainen (df1b4b8750) - - lib: Don't use special code for i_unreached() with STATIC_CHECKER - - This was done originally to help scan-build, but this is no longer - necessary. Also actually running code where __builtin_unreachable() was - reached produced (very weird) undefined behavior. - - Reverts e2e9ea6da9f3db5fd7fe467db79232d20d03832f - -M src/lib/macros.h - -2021-06-03 16:48:36 +0300 Timo Sirainen (ecc984350e) - - Makefile.am: Update configure parameters for scan-build - - Especially add --enable-static-checker. - -M Makefile.am - -2021-06-04 12:46:53 +0300 Timo Sirainen (70defb0fb7) - - lib-imap: imap-parser - Parse literal size using as same algorithm as - str_parse*(). - - This prevents wrapping the integer value and fixes an ubsan complaint. - - Based on Stephan's similar patch in managesieve-parser. - -M src/lib-imap/imap-parser.c - -2021-06-04 12:45:08 +0300 Timo Sirainen (71e1d599ed) - - lib-imap: imap-parser - Fix 8 bit atom check to use unsigned char. - - -M src/lib-imap/imap-parser.c - -2020-11-20 11:56:41 +0200 Timo Sirainen (605f65f8c1) - - lib-http: Add http-client category to client events - - -M src/lib-http/http-client.c - -2021-06-02 12:39:39 +0200 Markus Valentin (6b2963fe81) - - acl: Ignore acls in acl_mailbox_right_lookup if ignore_acls is set - - In case an namespace has been configured to ignore ACLs make sure that also - happens for acl_mailbox_right_lookup. - -M src/plugins/acl/acl-mailbox.c - -2021-06-01 13:10:23 +0200 Markus Valentin (d2a85c0441) - - acl: If acl_ignore_namespace is set acl_backend can be NULL - - Allow an uninitialized acl backend when ignore_acls is set. - -M src/plugins/acl/acl-mailbox.c - -2021-05-25 20:03:53 +0300 Timo Sirainen (2d676b0007) - - lib-mail: Add MESSAGE_PART_FLAG_OVERFLOW to MIME parts that reached parsing - limits - - This allows callers to find out which MIME parts were properly parsed. - -M src/lib-mail/message-parser.c -M src/lib-mail/message-part.h -M src/lib-mail/test-message-parser.c - -2021-04-29 17:00:47 +0300 Timo Sirainen (9d21af067f) - - imap: copy: Abort if client disconnects during COPY - - Since the client didn't receive the COPY tagged reply, it doesn't know - whether the COPY succeeded or not. This likely causes it to try the COPY - again and duplicate the mails. - -M src/imap/cmd-copy.c - -2021-05-19 05:56:13 -0600 Splintermail Dev (e903c76ef3) - - imap: imap-sync - Fix VANISHED response with UID=1 - - Fixes a bug introduced in 4eb3f6f27, where a UID EXPUNGE 1 command resulted - in a VANSIHED 0:1 response, which is invalid IMAP syntax - (sequence sets must have nonzero values). - -M src/imap/imap-sync.c - -2021-05-17 12:13:16 +0300 Aki Tuomi (0cb2ec40a4) - - fts: Do not consider arbitrary headers with 8-bit data as language-specific - - If we do stemming etc processing for arbitrary headers, they might become - impossible to find in subsequent searches due to stemming. - - This practically breaks e.g. From/To header searches with non-ascii names. - -M src/plugins/fts/fts-build-mail.c - -2020-03-09 11:11:04 +0200 Timo Sirainen (c38df6196d) - - lib: DEBUG: Fix potential crash in handling "Growing data stack" debug - message - - This could have only happened when data_stack_grow event was enabled and - when --enable-devel-checks was used. - -M src/lib/data-stack.c -M src/lib/test-data-stack.c - -2021-05-27 11:18:05 +0300 Timo Sirainen (4784a79d09) - - lib: test-data-stack: Run each test with the same data stack state - - -M src/lib/test-data-stack.c - -2021-05-21 16:59:17 +0300 Timo Sirainen (b0fd5705af) - - lib-lua: Delay running Lua script until dlua_script_init() - - This allows the caller to register globals before running the script. - -M src/lib-lua/dlua-script.c -M src/lib-lua/dlua-script.h - -2021-05-21 16:58:01 +0300 Timo Sirainen (f45c32c968) - - lib-lua: Move finalizing event and setting linked list to - dlua_create_script() - - There's no need to delay them until dlua_script_create_finish(). - -M src/lib-lua/dlua-script.c - -2021-05-21 17:48:48 +0300 Timo Sirainen (f985653670) - - lib-lua: Update dlua_script_create_*() comment - - Reusing existing scripts wasn't actually implemented. - -M src/lib-lua/dlua-script.h - -2021-05-21 17:06:37 +0300 Timo Sirainen (67c7c1aaae) - - lib-lua: dlua_script_init() - Always return -1 if script_init() fails - - The previous behavior was to forward the script_init() return value to the - caller. This was somewhat unexpected behavior. - -M src/lib-lua/dlua-script.c - -2021-05-31 11:33:40 +0300 Timo Sirainen (2b508d396c) - - lib-storage: dlua_register_mail_storage() - Fix popping dlua_dovecot in Lua - stack - - -M src/lib-storage/mail-storage-lua.c - -2021-05-07 20:37:02 +0300 Timo Sirainen (c8ac1fd03b) - - lib-storage: Fix corrupted cache when adding attachment keywords - - If IMAP BODYSTRUCTURE parsing fails, it means the BODYSTRUCTURE doesn't - match the MIME parts. This likely means that one or both of them are - corrupted. Handle this by deleting the email from cache, so this error won't - keep repeating. - -M src/lib-storage/mail.c - -2021-05-07 20:28:03 +0300 Timo Sirainen (bbcf91c5d6) - - lib-storage: Don't log error if attachment flags couldn't be set due to - missing cache - - Ever since 194dcaa65cdd247393633f2daa4b40fd12985440 missing attachment - keywords have been attempted to be automatically added if all the necessary - fields are in dovecot.index.cache. However, if mime.parts wasn't in the - cache an error was unnecessarily logged. - - Fixes: Error: Failed to add attachment keywords: mail_get_parts() failed: - Mail field not cached - -M src/lib-storage/mail.c - -2021-05-21 13:53:02 +0200 Markus Valentin (2480f7bd2c) - - imap-acl: In case mailbox name is "" set it to INBOX for shared namespaces - - To prevent proxying ACL commands with mailbox "" replace it with "INBOX" - when used with shared namespaces. - -M src/plugins/imap-acl/imap-acl-plugin.c - -2021-05-25 16:09:25 +0200 Markus Valentin (bfde81138a) - - imapc: Extract imapc_mailbox_name_equals from imapc_untagged_status - - -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h - -2021-05-20 16:03:12 +0200 Markus Valentin (b58ac1f607) - - imap-acl: Replace mailbox_open_as_admin with mailbox_open_allocated_as_admin - - -M src/plugins/imap-acl/imap-acl-plugin.c - -2021-05-20 14:27:46 +0200 Markus Valentin (becb0ee0d5) - - imap-acl: Allow LISTRIGHT replies without opening as admin - - As the reply is hardcoded there is no need to proxy the ACL command to a - remote backend in case imapc_feature "acl" is enabled. - -M src/plugins/imap-acl/imap-acl-plugin.c - -2021-05-19 15:12:35 +0200 Markus Valentin (8d994ed413) - - imap-acl: Implement proxying commands to an imapc location for DELETEACL - - Before calling imap_acl_cmd_deleteacl in cmd_deleteacl the new code checks - if the command should be proxied and if so, does the proxying. - -M src/plugins/imap-acl/imap-acl-plugin.c - -2021-05-19 15:11:40 +0200 Markus Valentin (52333bdb22) - - imap-acl: Implement proxying commands to an imapc location for SETACL - - Before calling imap_acl_cmd_setacl in cmd_setacl the new code checks if the - command should be proxied and if so, does the proxying. - -M src/plugins/imap-acl/imap-acl-plugin.c - -2021-05-19 15:09:24 +0200 Markus Valentin (7a6dda9cef) - - imap-acl: Implement proxying commands to an imapc location for GETACL - - Before calling imap_acl_cmd_getacl in cmd_getacl the new code checks if the - command should be proxied and if so, does the proxying. - -M src/plugins/imap-acl/imap-acl-plugin.c - -2021-05-25 16:59:31 +0200 Markus Valentin (d64123e856) - - imap-acl: Extract imap_acl_cmd_deleteacl from cmd_deletacl - - This change makes acl_mailbox_open_allocated_as_admin called later which is - necessary for the following proxying IMAP ACL changes. - -M src/plugins/imap-acl/imap-acl-plugin.c - -2021-05-25 16:45:13 +0200 Markus Valentin (98f1a2a6e4) - - imap-acl: Extract imap_acl_cmd_setacl from cmd_setacl - - This change makes acl_mailbox_open_allocated_as_admin called later which is - necessary for the following proxying IMAP ACL changes. - -M src/plugins/imap-acl/imap-acl-plugin.c - -2021-05-25 16:29:10 +0200 Markus Valentin (f583ef8991) - - imap-acl: Extract imap_acl_cmd_getacl from cmd_getacl - - This change makes acl_mailbox_open_allocated_as_admin called later which is - necessary for the following proxying IMAP ACL changes. - -M src/plugins/imap-acl/imap-acl-plugin.c - -2021-05-19 14:52:36 +0200 Markus Valentin (5a7cf68dfd) - - imap-acl: Implement proxying commands to an imapc location for MYRIGHTS - - Introduce the needed changes to proxy imap-acl commands to a remote backend - using imap-client. - - Before calling imap_acl_cmd_myrights in cmd_myrights the new code checks if - the command should be proxied and if so, does the proxying. - -M src/plugins/imap-acl/Makefile.am -M src/plugins/imap-acl/imap-acl-plugin.c - -2021-05-25 12:40:55 +0200 Markus Valentin (c923bd0f75) - - imap-acl: Add imapc_acl_get_mailbox_error - - Allows to retrieve full mailbox error. - -M src/plugins/imap-acl/Makefile.am -M src/plugins/imap-acl/imap-acl-plugin.c - -2021-05-25 11:19:47 +0200 Markus Valentin (f2e0cdfc9c) - - imap-acl: Split off imap_acl_cmd_myrights from cmd_myrights - - -M src/plugins/imap-acl/imap-acl-plugin.c - -2021-05-20 13:47:55 +0200 Markus Valentin (358432fba5) - - imap-acl: Split acl_mailbox_open_as_admin - - This allows easier implementation of the imap-acl proxying. - -M src/plugins/imap-acl/imap-acl-plugin.c - -2021-05-20 23:21:10 +0200 Markus Valentin (c963be712f) - - imap-acl: Add imap_acl_storage with module context - - -M src/plugins/imap-acl/imap-acl-plugin.c -M src/plugins/imap-acl/imap-acl-plugin.h - -2021-05-25 12:38:50 +0200 Markus Valentin (7f7a39bcb1) - - imapc: Add imapc_mail_error_to_resp_text_code to access error msg by enum - - -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h - -2021-05-26 10:31:26 +0200 Markus Valentin (fa47e36587) - - imapc: Change function signature prefix to imapc_resp_text_code_parse - - -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h - -2021-05-20 23:18:30 +0200 Markus Valentin (07e2f39e5c) - - imapc: Add imapc_storage_client_unregister_untagged function - - -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h - -2021-05-18 16:26:46 +0200 Markus Valentin (885794cbce) - - imapc: Add imapc_features=acl - - In order to allow proxying IMAP ACL commands to a remote backend - -M src/lib-storage/index/imapc/imapc-settings.c -M src/lib-storage/index/imapc/imapc-settings.h - -2021-05-21 19:23:57 +0200 Timo Sirainen (67c08cfc9b) - - lib: test-event-filter-*: Hide details of tests unless they fail - - This removes ~14k lines of output from test-lib run. - -M src/lib/test-event-filter-expr.c -M src/lib/test-event-filter-merge.c -M src/lib/test-event-filter-parser.c - -2021-05-21 16:11:45 +0300 Timo Sirainen (d9f2b426ea) - - imap: Send tagged login reply before finalizing user initialization - - Broken by 5fc66f182ff6941639d30372b414c1b39ae1e67e - -M src/imap/imap-client.c -M src/imap/imap-client.h -M src/imap/imap-master-client.c -M src/imap/main.c - -2021-05-21 16:23:36 +0300 Timo Sirainen (02363cfb7b) - - m4, dovecot-config: Add LIBDOVECOT_LUA_INCLUDE - - This allows building plugins that use lib-lua against uninstalled Dovecot - source code tree. - -M dovecot-config.in.in -M m4/dovecot.m4 - -2021-05-20 11:05:37 -0400 Josef 'Jeff' Sipek (d386e3727f) - - lib: event filter - Return invalid chars in the lexer - - This way, we leave it up to the parser to figure out whether or not they - make sense. - -M src/lib/event-filter-lexer.l -M src/lib/test-event-filter-parser.c - -2021-05-20 10:24:35 -0400 Josef 'Jeff' Sipek (8c6ea200af) - - lib: event filter - Allow '?' in filter language tokens - - Without this, it is not possible to use '?' wildcards without quoting the - value. - -M src/lib/event-filter-lexer.l -M src/lib/test-event-filter-parser.c - -2021-05-18 17:44:08 +0300 Timo Sirainen (308ba466c8) - - dict-sql: Support SQL_DB_FLAG_ON_CONFLICT_DO - - -M src/lib-dict-backend/dict-sql.c - -2021-05-18 17:40:00 +0300 Timo Sirainen (5329cd3af4) - - lib-sql: Add SQL_DB_FLAG_ON_CONFICT_DO for new enough sqlite and pgsql - - -M src/lib-sql/driver-pgsql.c -M src/lib-sql/driver-sqlite.c -M src/lib-sql/driver-test.c -M src/lib-sql/sql-api.h - -2021-05-18 17:21:59 +0300 Timo Sirainen (6cc9bd8e2b) - - lib-sql: sqlpool: Implement get_flags() as a wrapper to the real db - - -M src/lib-sql/driver-sqlpool.c - -2021-05-18 17:15:02 +0300 Timo Sirainen (3b3d90d2c9) - - lib: test-array - Add more unit tests for array_foreach*() - - Make sure that the elem value is as expected after the loop completes. - -M src/lib/test-array.c - -2021-05-18 17:08:51 +0300 Timo Sirainen (60dc5c2fe0) - - lib-sql: Add sql_db_vfuncs.get_flags() - - -M src/lib-sql/sql-api-private.h -M src/lib-sql/sql-api.c - -2021-05-18 17:02:30 +0300 Timo Sirainen (88a56737a5) - - dict-sql: Use SQL_DB_FLAG_ON_DUPLICATE_KEY - - Instead of hardcoding mysql check. - -M src/lib-dict-backend/dict-sql-private.h -M src/lib-dict-backend/dict-sql.c - -2021-05-18 17:00:44 +0300 Timo Sirainen (0d8acaeae2) - - lib-sql: Add SQL_DB_FLAG_ON_DUPLICATE_KEY flag for MySQL - - -M src/lib-sql/driver-mysql.c -M src/lib-sql/driver-test.c -M src/lib-sql/sql-api.h - -2021-05-24 18:55:28 +0300 Aki Tuomi (4766b85437) - - auth: mech-oauth2 - Iterate fields in safer manner - - Static analyser wasn't happy about the previous way. - -M src/auth/mech-oauth2.c - -2020-11-09 12:29:16 +0100 Stephan Bosch (5703f0b007) - - lib-smtp: smtp-server-recipient - Remove smtp_server_recipient_initialize(). - - It is no longer needed. - -M src/lib-smtp/smtp-server-cmd-rcpt.c -M src/lib-smtp/smtp-server-private.h -M src/lib-smtp/smtp-server-recipient.c - -2020-11-09 12:29:29 +0100 Stephan Bosch (b09ec34569) - - lib-smtp: smtp-server-recipient - Create transaction event early if there is - no transaction yet. - - This allows having a parent for the recipient event once the recipient is - created, which can precede the creation of the transaction. - -M src/lib-smtp/smtp-server-connection.c -M src/lib-smtp/smtp-server-private.h -M src/lib-smtp/smtp-server-recipient.c -M src/lib-smtp/smtp-server-transaction.c - -2021-05-21 18:20:10 +0300 Timo Sirainen (57874285f2) - - lib: Free unused data stack memory once per second while running ioloop - - This way if the data stack has grown excessively large temporarily, it won't - permanently waste memory. And if the data stack grows back to the same large - size, re-allocating it once per second doesn't cause performance problems. - -M src/lib/ioloop.c - -2021-05-21 18:13:08 +0300 Timo Sirainen (14ac1c5efe) - - lib: data-stack - Keep the largest unused block in memory after all - - This reverts 2da21080dbbe50b4924ac0135c84babfb404dcce, but that alone - doesn't produce working code so there are also some further fixups. - -M src/lib/data-stack.c -M src/lib/data-stack.h -M src/lib/test-data-stack.c - -2021-05-17 01:24:31 +0200 Stephan Bosch (d0ce18bc7f) - - lib-smtp: test-smtp-payload - Double the client progress timeout. - - Otherwise, SSL tests can fail on systems with low entropy. - -M src/lib-smtp/test-smtp-payload.c - -2021-04-21 03:02:38 +0200 Stephan Bosch (a2ea45e543) - - lib-smtp: smtp-client-transaction - Allow destroying connection while - transaction still holds reference. - - The lifetime of the transaction is controlled by the application and not so - much by the connection. The transaction holds a reference to the connection, - so if the connection is forcibly destroyed it needs, to notify the - transaction of this event. - - This fixes: - - Panic: file connection.c: line 938 (connection_list_deinit): assertion - failed: (conn != list->connections) - -M src/lib-smtp/smtp-client-connection.c -M src/lib-smtp/smtp-client-private.h -M src/lib-smtp/smtp-client-transaction.c - -2021-04-22 12:13:35 +0200 Stephan Bosch (efcb45d77f) - - lib-smtp: smtp-client-transaction - Properly handle pending failure upon - smtp_client_transaction_send_reset(). - - -M src/lib-smtp/smtp-client-transaction.c - -2021-04-22 12:03:59 +0200 Stephan Bosch (f73471d049) - - lib-smtp: smtp-client-connection - Add - smtp_client_connection_transactions_fail() and use it. - - Use it to always fail the whole transaction first before the individual - commands if possible. - -M src/lib-smtp/smtp-client-connection.c - -2021-04-22 11:53:30 +0200 Stephan Bosch (406f3a4ee7) - - lib-smtp: smtp-client-connection - Split off - smtp_client_connection_transactions_fail_reply(). - - -M src/lib-smtp/smtp-client-connection.c - -2021-04-22 12:36:18 +0200 Stephan Bosch (9673639616) - - lib-smtp: smtp-client-connection - Always abort all commands upon - smtp_client_connection_close(). - - Before, these would get a disconnect failure, which makes no sense when the - client is causing the disconnect. - -M src/lib-smtp/smtp-client-connection.c - -2021-04-22 12:32:38 +0200 Stephan Bosch (0ef7144312) - - lib-smtp: smtp-client-connection - Abort all transactions upon - smtp_client_connection_close(). - - Before, these would get a disconnect failure, which makes no sense when the - client is causing the disconnect. - -M src/lib-smtp/smtp-client-connection.c - -2021-04-22 12:09:11 +0200 Stephan Bosch (c93786ad17) - - lib-smtp: test-smtp-payload - Finish client transaction only when it - finishes completely. - - -M src/lib-smtp/test-smtp-payload.c - -2021-05-17 01:13:36 +0200 Stephan Bosch (a2371f18ce) - - lib-smtp: Reformat smtp-client-transaction.c. - - -M src/lib-smtp/smtp-client-transaction.c - -2021-04-22 11:46:30 +0200 Stephan Bosch (105fd27947) - - lib-smtp: Reformat smtp-client-connection.c. - - -M src/lib-smtp/smtp-client-connection.c - -2021-05-10 22:37:44 +0300 Aki Tuomi (c6de40d420) - - auth: oauth2 - Support passing openid-configuration URL to client on failure - - -M doc/example-config/dovecot-oauth2.conf.ext -M src/auth/auth-request.h -M src/auth/db-oauth2.c -M src/auth/mech-oauth2.c - -2021-05-10 22:29:23 +0300 Aki Tuomi (291452bca5) - - auth: mech-oauth2 - Pass error fields as array - - Makes it easier to add fields to it later on. - -M src/auth/mech-oauth2.c - -2021-05-21 14:42:07 +0300 Timo Sirainen (f9461066c5) - - imap: copy/move: Fix memory leak when no messages were found - - -M src/imap/cmd-copy.c - -2021-02-12 01:22:25 +0200 Timo Sirainen (b13c1e300e) - - doveadm: Delay reading settings until doveadm plugins are loaded - - -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-mail.h -M src/doveadm/doveadm.c -M src/doveadm/main.c - -2021-02-12 01:54:48 +0200 Timo Sirainen (d8841feb84) - - doveadm: Add doveadm_setting_roots_*() API for plugins to register settings - - -M src/doveadm/doveadm-settings.c -M src/doveadm/doveadm-settings.h -M src/doveadm/doveadm.c -M src/doveadm/main.c -M src/lib-master/master-service-settings.c - -2021-02-15 17:11:07 +0200 Timo Sirainen (b1b19b0e25) - - doveadm: Move settings reading code into doveadm-settings.c - - This code is now shared between doveadm and doveadm-server. - -M src/doveadm/doveadm-settings.c -M src/doveadm/doveadm-settings.h -M src/doveadm/doveadm.c -M src/doveadm/main.c - -2021-02-12 19:17:25 +0200 Timo Sirainen (ca96472b05) - - lib-master: Add master_service_settings_input.extra_modules - - This allows specifying more than one module. - -M src/lib-master/master-service-settings.c -M src/lib-master/master-service-settings.h - -2021-02-12 19:15:44 +0200 Timo Sirainen (5f1126a9fb) - - lib-master: master_service_exec_config() - Build argv using dynamic array - - -M src/lib-master/master-service-settings.c - -2021-05-11 00:07:24 +0300 Aki Tuomi (ef2a1b2336) - - auth: auth-worker - Respect service_count - - If service_count is set, then auth-worker will stop after given number of - requests. - -M src/auth/auth-settings.c -M src/auth/auth-worker-client.c -M src/auth/auth-worker-client.h -M src/auth/main.c - -2021-05-20 15:54:04 +0300 Timo Sirainen (714ff4342e) - - imap: Improve sending internal error to client if initialization fails - - The "Internal server error" should be sent using the same ostream that was - created. Also if service_user initialization failed there was no OK reply to - sent to login. - -M src/imap/main.c - -2021-05-20 15:42:45 +0300 Timo Sirainen (2e56339868) - - imap: Send initial tagged reply directly using ostream - - This simplifies the following commits. - -M src/imap/main.c - -2021-05-20 13:22:18 +0300 Timo Sirainen (5fc66f182f) - - imap: Send initial tagged reply and capability after rawlogs are initialized - - This way the initial tagged reply and capability is written to the rawlog. - Broken by 16328738d35370685387ec51d20657265855e770 - -M src/imap/main.c - -2021-05-20 13:16:40 +0300 Timo Sirainen (2dcb967ec1) - - imap: Split client_add_input_capability() into two functions - - -M src/imap/main.c - -2021-05-20 13:14:00 +0300 Timo Sirainen (75c4ad294a) - - imap: Rename struct client_input to imap_login_request - - This better indicates what it is about, and causes less confusion with all - the other client_input variables. - -M src/imap/main.c - -2021-03-08 16:45:08 +0200 Timo Sirainen (7c8becb4b0) - - pop3: Handle pipelined input via istream-concat - - This fixes rawlog_dir to work properly. It didn't log the pipelined input to - rawlog and it may have also caused the connection to hang. - -M src/pop3/main.c - -2021-03-08 16:44:31 +0200 Timo Sirainen (8fa48cb6d0) - - pop3: Move finishing istream to client_create_finish() - - -M src/pop3/pop3-client.c -M src/pop3/pop3-client.h - -2021-03-08 16:55:49 +0200 Timo Sirainen (e56bea8045) - - imap: Handle pipelined input from imap-hibernate via istream-concat - - Similarly to the previous commit, this fixes issues with rawlog. - -M src/imap/imap-master-client.c - -2021-03-08 16:37:15 +0200 Timo Sirainen (380aa66738) - - imap: Handle pipelined input via istream-concat - - This fixes rawlog_dir to work properly. It didn't log the pipelined input to - rawlog and it may have also caused the connection to hang. - -M src/imap/imap-client.c -M src/imap/imap-client.h -M src/imap/main.c - -2021-03-08 16:33:50 +0200 Timo Sirainen (16328738d3) - - imap: Move iostream-rawlog creation to client_create_finish() - - This allows the caller to modify the istream before rawlog. - -M src/imap/imap-client.c - -2021-03-08 16:33:33 +0200 Timo Sirainen (c8a9ccc5aa) - - lib: Add i_stream_copy_fd() - - -M src/lib/istream.c -M src/lib/istream.h - -2021-05-14 15:57:20 +0200 Markus Valentin (ad4c2b77a8) - - acl: Fix broken LIST for shared namespaces - - Due to the recent changes in the usage of the acl_ignore_namespace setting - shared namespaces where trying to use fast listing too. This resulted in - wrong LIST IMAP command outputs when using acl plugin. - - Broken by dc8ecd38a7e54b8bb80ae97712a0d8ad4edcbed3 - -M src/plugins/acl/acl-mailbox-list.c - -2021-05-12 19:06:27 +0300 Aki Tuomi (83939b222d) - - lib-lua: dlua-compat - Undefine lua_isinteger - - It's being defined in compat to return boolean, so undefine it here to make - sure it compiles. Broken in b59e89ebd97fa52de25b8e976a7dfe61f0d8a639 - -M src/lib-lua/dlua-compat.c - -2021-04-30 11:34:51 +0200 Markus Valentin (dc8ecd38a7) - - acl: Prevent crashes with acl_ignore_namespace - - In case a namespace was ignored for ACLs an crash could occur because of - "Module context acl_storage_module missing". This panic is prevented by this - change. - -M src/plugins/acl/acl-mailbox-list.c -M src/plugins/acl/acl-mailbox.c -M src/plugins/acl/acl-plugin.h - -2021-05-06 10:18:10 +0200 Markus Valentin (81b845fcf7) - - acl: Move static acl_namespace_is_ignored - - -M src/plugins/acl/acl-mailbox-list.c - -2021-02-18 12:41:51 +0200 Timo Sirainen (b04d1a4a71) - - lib-program-client: Change program_client_run*() to return enum - program_client_exit_status - - Their behavior is clearer when result is expressed as enum than int. - -M src/director/director.c -M src/lib-program-client/program-client.c -M src/lib-program-client/program-client.h -M src/lib-program-client/test-program-client-net.c -M src/lib-program-client/test-program-client-unix.c -M src/lib-smtp/smtp-submit.c - -2021-02-18 12:33:06 +0200 Timo Sirainen (da5c1d11b9) - - lib-program-client: Rename "exit_code" to "exit_status" - - exit_code typically refers to the numeric 0..255 value that processes exit - with. - -M src/lib-program-client/program-client-local.c -M src/lib-program-client/program-client-private.h -M src/lib-program-client/program-client-remote.c -M src/lib-program-client/program-client.c -M src/lib-program-client/program-client.h - -2021-02-18 12:30:50 +0200 Timo Sirainen (6a30dcc20b) - - lib-program-client: Move enum program_client_exit_code to public .h file - - -M src/lib-program-client/program-client-private.h -M src/lib-program-client/program-client.h - -2021-05-10 19:46:53 +0300 Aki Tuomi (2b403bc75c) - - lib-lua: dlua-dovecot - Ref event on push - - Matches with unref on __gc. - -M src/auth/db-lua.c -M src/lib-lua/dlua-dovecot.c - -2021-05-10 19:23:48 +0300 Aki Tuomi (5becc3bb36) - - lib-lua: test-lua - Use bool for expected_isnum in check_tointegerx_compat - - -M src/lib-lua/test-lua.c - -2021-05-10 19:21:50 +0300 Aki Tuomi (b59e89ebd9) - - lib-lua: Define lua_isinteger as boolean function - - -M src/lib-lua/dlua-script-private.h -M src/lib-lua/dlua-script.c -M src/lib-lua/test-lua.c - -2021-04-19 14:51:05 +0300 Aki Tuomi (1fa8dbb63e) - - lib-lua: Fix error reporting for script loading - - -M src/lib-lua/dlua-script.c - -2021-04-19 14:45:56 +0300 Aki Tuomi (27e165d381) - - lib-lua: Use dluaL_error for luaL_error - - -M src/lib-lua/dlua-script-private.h - -2021-04-16 13:19:26 +0300 Aki Tuomi (4258a2d8d7) - - lib-lua: Fix luaL_error usage - - -M src/auth/db-lua.c -M src/lib-lua/dlua-script.c -M src/lib-storage/mailbox-lua.c - -2021-04-16 13:11:20 +0300 Aki Tuomi (5d70672760) - - lib-lua: Add dluaL_error - - -M src/lib-lua/Makefile.am -A src/lib-lua/dlua-error.c -M src/lib-lua/dlua-script-private.h - -2021-04-16 13:10:41 +0300 Aki Tuomi (890c7a0581) - - lib-lua: dlua-script - Add dlua_pushfstring - - Uses full sprintf - -M src/lib-lua/Makefile.am -A src/lib-lua/dlua-pushstring.c -M src/lib-lua/dlua-script-private.h - -2021-04-15 11:19:52 +0300 Aki Tuomi (15773af5b3) - - lib-lua: dlua-wrapper - Constify extra functions - - -M src/lib-lua/dlua-wrapper.h - -2021-05-11 16:53:57 +0200 Timo Sirainen (da9ccf08a4) - - lib-index, lib-compression: Fix explicit integer wrapping - - Using modulo instead of AND wrapped it one number too early. Luckily these - didn't break anything. - -M src/lib-compression/test-compression.c -M src/lib-index/mail-cache-lookup.c -M src/lib-index/mail-cache-purge.c - -2021-05-05 12:45:25 +0300 Timo Sirainen (f550663b37) - - lib: abort() on unexpected exit() - - This can especially be useful in catching bugs in Lua script that could - unexpectedly exit. - -M src/lib-master/master-service.c -M src/lib/failures.c -M src/lib/lib.c -M src/lib/lib.h -M src/master/main.c - -2021-05-05 12:44:03 +0300 Timo Sirainen (6d52674782) - - global: Replace exit() with lib_exit() - - -M src/auth/checkpassword-reply.c -M src/auth/db-checkpassword.c -M src/config/doveconf.c -M src/dict/main.c -M src/doveadm/doveadm-mail.c -M src/doveadm/doveadm-pw.c -M src/doveadm/doveadm.c -M src/lib-compression/bench-compression.c -M src/lib-oauth2/test-oauth2-jwt.c -M src/lib-test/test-common.c -M src/lib-test/test-subprocess.c -M src/lib/failures.c -M src/lib/lib.h -M src/lib/test-file-create-locked.c -M src/master/main.c -M src/util/rawlog.c -M src/util/tcpwrap.c - -2021-04-14 10:45:55 +0200 Stephan Bosch (f2fc1c01f8) - - lib-http: http-client-peer - Fix segfault occurring upon backoff connect. - - If peers decide to close and destroy immediately, the iteration in the - shared peer yields an invalid pointer for the next peer to connect. Fixed by - preserving pointer to next peer inside the loop. - -M src/lib-http/http-client-peer.c - -2021-04-30 16:59:50 -0400 Josef 'Jeff' Sipek (aefe4941c1) - - lib: event filter - Avoid using event field wildcard matching when not - needed - - If the right hand side of an event field comparison is not using any - wildcards, we can compare using strcasecmp() instead of the more expensive - wildcard_match_icase(). - - This wildcard matching avoidance change speeds up matching quite a bit. When - the desired comparison is *not* a wildcard match (i.e., the filter is - 'fieldname=abc'), microbenchmarks show at least a 11% speedup in filter - matching speed. When the comparison includes a wildcard (i.e., the filter - is 'fieldname=abc*'), microbenchmarks show approximately 0.9% filer matching - slowdown. - - Since there are so many non-wildcard matches in a typical filter, this is a - very good trade-off. - -M src/lib/event-filter-parser.y -M src/lib/event-filter-private.h -M src/lib/event-filter.c - -2021-04-30 16:39:15 -0400 Josef 'Jeff' Sipek (dcb47858e1) - - lib: event filter - Rename EVENT_FILTER_NODE_TYPE_EVENT_FIELD to denote - wildcard matching - - -M src/lib/event-filter-parser.y -M src/lib/event-filter-private.h -M src/lib/event-filter.c - -2021-04-30 12:41:55 -0400 Josef 'Jeff' Sipek (33e01c1c30) - - lib: event filter - Avoid using event name wildcard matching when not needed - - If the right hand side of an event name comparison is not using any - wildcards, we can compare using strcmp() instead of the more expensive - wildcard_match(). - - This wildcard matching avoidance change speeds up matching quite a bit. When - the desired comparison is *not* a wildcard match (i.e., the filter is - 'event=abc'), microbenchmarks show at least a 30% speedup in filter matching - speed. When the comparison includes a wildcard (i.e., the filter is - 'event=abc*'), microbenchmarks show approximately 0.4% filer matching - slowdown. - - Since there are so many non-wildcard matches in a typical filter, this is a - very good trade-off. - -M src/lib/event-filter-parser.y -M src/lib/event-filter-private.h -M src/lib/event-filter.c - -2021-04-30 12:44:17 -0400 Josef 'Jeff' Sipek (aa6edb3499) - - lib: event filter - Rename EVENT_FILTER_NODE_TYPE_EVENT_NAME to denote - wildcard matching - - -M src/lib/event-filter-parser.y -M src/lib/event-filter-private.h -M src/lib/event-filter.c - -2021-04-30 14:09:10 -0400 Josef 'Jeff' Sipek (0e7cf747a9) - - lib: Add wildcard_is_literal to check if a mask has * or ? - - -M src/lib/wildcard-match.h - -2021-05-10 11:26:54 +0300 Timo Sirainen (e786e5f40a) - - lib: test-env-util - Make static analyzer happy - - -M src/lib/test-env-util.c - -2021-05-06 21:25:54 +0300 Aki Tuomi (79a2edcd07) - - lib-dict: dict-lua - Don't yield again until previous one has completed - - -M src/lib-dict/dict-iter-lua.c - -2021-05-04 12:15:55 +0300 Aki Tuomi (315f9073f4) - - lib-dict: dict-lua - Use absolute stack positions for arguments - - -M src/lib-dict/dict-iter-lua.c -M src/lib-dict/dict-lua.c -M src/lib-dict/dict-txn-lua.c - -2021-05-05 13:40:29 +0300 Aki Tuomi (9547662586) - - acl: Reinitialize local acl object after creating mailbox - - For INDEX layout this is needed to actually get the local mailbox path. This - fixes inheriting ACLs from parent folder for INDEX layouts. - -M src/plugins/acl/acl-mailbox.c - -2021-05-05 18:18:29 +0300 Timo Sirainen (8b92cf375f) - - lib: Add unit tests to env-util - - -M src/lib/Makefile.am -A src/lib/test-env-util.c -M src/lib/test-lib.inc - -2021-01-20 20:53:53 +0200 Timo Sirainen (d9dad9970e) - - lib-index: Use env_put() instead of putenv() directly - - -M src/lib-index/test-mail-index-transaction-update.c - -2021-01-20 20:51:56 +0200 Timo Sirainen (d1f628e8b0) - - configure, lib: Remove workarounds for unsetenv() - - It's in POSIX.1-2001 and available on all modern systems. - -M configure.ac -D m4/unsetenv.m4 -M src/lib/env-util.c - -2021-01-20 20:48:24 +0200 Timo Sirainen (8e7744b179) - - lib: env_put() - Use setenv() instead of putenv() - - It's already in POSIX.1-2001 so it should be available everywhere. - -M src/lib/env-util.c -M src/lib/env-util.h -M src/lib/lib.c - -2021-01-20 20:46:27 +0200 Timo Sirainen (9f1b0a7fa5) - - lib, global: Change env_put() API to take name,value pair - - -M src/auth/db-checkpassword.c -M src/auth/db-ldap.c -M src/auth/mech-gssapi.c -M src/config/doveconf.c -M src/dict/main.c -M src/doveadm/doveadm.c -M src/lda/main.c -M src/lib-master/master-service-settings.c -M src/lib-master/master-service.c -M src/lib/env-util.c -M src/lib/env-util.h -M src/lib/restrict-access.c -M src/lib/test-var-expand.c -M src/master/service-process.c -M src/util/script-login.c - -2021-01-20 20:45:11 +0200 Timo Sirainen (990bb780a3) - - lib-program-client, script: Use env_put_array() - - -M src/lib-program-client/program-client-local.c -M src/util/script.c - -2021-01-20 20:42:40 +0200 Timo Sirainen (3af2f08c27) - - lib: Add env_put_array() - - -M src/lib/env-util.c -M src/lib/env-util.h - -2021-04-20 18:06:19 +0200 Timo Sirainen (f19988344d) - - util/dovecot-sysreport: Finish report even if doveadm calls fail - - It can be useful to generate the report even when dovecot isn't running. - -M src/util/dovecot-sysreport - -2021-04-01 14:16:34 +0300 Timo Sirainen (ebf2557b57) - - util/dovecot-sysreport --core: Support multiple core files - - -M doc/man/dovecot-sysreport.1.in -M src/util/dovecot-sysreport - -2021-04-01 14:12:14 +0300 Timo Sirainen (d7cb97d26c) - - util/dovecot-sysreport --core: Check gdb existence earlier - - Simplifies the next commit. - -M src/util/dovecot-sysreport - -2021-04-01 14:09:42 +0300 Timo Sirainen (74d399f441) - - util/dovecot-sysreport --core: Change binary path to be optional - - If not specified, detect it from the core file itself - -M src/util/dovecot-sysreport - -2021-05-06 01:08:50 +0300 Timo Sirainen (e2651f1d5e) - - global: Use array_idx_elem() where possible - - -M src/auth/auth-worker-server.c -M src/auth/db-dict.c -M src/auth/db-ldap.c -M src/auth/db-lua.c -M src/director/director.c -M src/doveadm/dsync/dsync-mailbox-import.c -M src/doveadm/dsync/dsync-mailbox-tree-sync.c -M src/indexer/indexer-queue.c -M src/lib-dict-backend/dict-ldap.c -M src/lib-dict/dict-client.c -M src/lib-dns/test-dns-util.c -M src/lib-http/http-server-resource.c -M src/lib-imap-client/imapc-connection.c -M src/lib-index/mail-index-transaction.c -M src/lib-ldap/ldap-connection.c -M src/lib-sql/driver-cassandra.c -M src/lib-storage/index/imapc/imapc-save.c -M src/lib-storage/index/imapc/imapc-sync.c -M src/lib-storage/index/maildir/maildir-keywords.c -M src/lib-storage/list/mailbox-list-fs-iter.c -M src/lib-storage/list/mailbox-list-index-notify.c -M src/lib-storage/mail-search-args-imap.c -M src/lib-storage/mailbox-attribute.c -M src/lib-storage/mailbox-list.c -M src/lib/hash2.c -M src/plugins/acl/acl-lookup-dict.c -M src/plugins/push-notification/push-notification-drivers.c -M src/plugins/push-notification/push-notification-events.c -M src/plugins/quota/quota.c -M src/plugins/virtual/virtual-save.c -M src/stats/stats-service-openmetrics.c - -2021-05-04 16:40:09 +0300 Timo Sirainen (2070e0faf9) - - lib: Add array_idx_elem() - - This returns array_idx()'s value dereferenced, so it only works for arrays - of pointers. - - Note that using *array_idx() does the same, but it won't compile if the - compiler doesn't have typeof() support. - -M src/lib/array.h -M src/lib/test-array.c - -2021-02-10 22:06:29 +0200 Timo Sirainen (f79dbc248c) - - lib: Remove array_swap() - - It's not used anywhere, and it's a bit too weird. - -M src/lib/array.h -M src/lib/test-array.c - -2021-02-10 21:45:58 +0200 Timo Sirainen (2b50ec125b) - - global: Use array_foreach_elem() where possible - - -M src/dict/dict-commands.c -M src/imap-login/imap-login-commands.c -M src/imap-urlauth/imap-urlauth-worker.c -M src/ipc/ipc-connection.c -M src/ipc/ipc-group.c -M src/lib-fs/fs-api.c -M src/lib-mail/istream-attachment-connector.c -M src/lib-master/master-service-settings.c -M src/lib-program-client/program-client-local.c -M src/lib-program-client/program-client-remote.c -M src/lib-sql/driver-cassandra.c -M src/lib-sql/driver-sqlpool.c -M src/lib-test/test-subprocess.c -M src/lmtp/lmtp-proxy.c -M src/login-common/login-proxy.c -M src/login-common/main.c -M src/replication/replicator/doveadm-connection.c -M src/replication/replicator/replicator-brain.c - -2021-02-10 21:45:41 +0200 Timo Sirainen (b3bc25eac5) - - lib-fts: Use array_foreach_elem() where possible - - -M src/lib-fts/fts-filter.c -M src/lib-fts/fts-language.c -M src/lib-fts/fts-tokenizer.c - -2021-02-10 21:45:19 +0200 Timo Sirainen (bdc37a1d9c) - - submission: Use array_foreach_elem() where possible - - -M src/submission/submission-backend-relay.c -M src/submission/submission-backend.c -M src/submission/submission-recipient.c - -2021-02-10 21:43:18 +0200 Timo Sirainen (6392b0706f) - - stats: Use array_foreach_elem() where possible - - -M src/stats/client-http.c -M src/stats/stats-metrics.c -M src/stats/stats-service-openmetrics.c -M src/stats/stats-settings.c - -2021-02-10 21:35:04 +0200 Timo Sirainen (7c7e7215de) - - lib-smtp: Use array_foreach_elem() where possible - - -M src/lib-smtp/smtp-server-cmd-data.c -M src/lib-smtp/smtp-server-transaction.c -M src/lib-smtp/smtp-submit.c - -2021-02-10 21:31:16 +0200 Timo Sirainen (162320b73c) - - lib-old-stats: Use array_foreach_elem() where possible - - -M src/lib-old-stats/stats.c - -2021-02-10 21:20:25 +0200 Timo Sirainen (1bf42b1140) - - config: Use array_foreach_elem() where possible - - -M src/config/config-filter.c -M src/config/config-parser.c -M src/config/doveconf.c - -2021-02-10 21:18:42 +0200 Timo Sirainen (3200ca5b9a) - - plugins: Use array_foreach_elem() where possible - - -M src/plugins/fts/fts-search-args.c -M src/plugins/fts/fts-user.c -M src/plugins/mail-crypt/doveadm-mail-crypt.c -M src/plugins/mail-crypt/mail-crypt-acl-plugin.c -M src/plugins/mail-crypt/mail-crypt-key.c -M src/plugins/notify-status/notify-status-plugin.c -M src/plugins/push-notification/push-notification-driver-dlog.c -M src/plugins/push-notification/push-notification-driver-lua.c -M src/plugins/push-notification/push-notification-drivers.c -M src/plugins/push-notification/push-notification-event-flagsclear.c -M src/plugins/push-notification/push-notification-event-flagsset.c -M src/plugins/push-notification/push-notification-plugin.c -M src/plugins/push-notification/push-notification-triggers.c - -2021-02-10 21:09:42 +0200 Timo Sirainen (6a1099f54a) - - master: Use array_foreach_elem() where possible - - -M src/master/main.c -M src/master/master-client.c -M src/master/master-settings.c -M src/master/service-listen.c -M src/master/service-log.c -M src/master/service-monitor.c -M src/master/service.c - -2021-02-10 21:03:16 +0200 Timo Sirainen (4dea1aeb5f) - - lib-index: Use array_foreach_elem() where possible - - -M src/lib-index/mail-index-fsck.c -M src/lib-index/mail-index-transaction.c - -2021-02-10 21:01:06 +0200 Timo Sirainen (6d8e8e328a) - - lib-imap-client: Use array_foreach_elem() where possible - - -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-connection.c - -2021-02-10 20:58:20 +0200 Timo Sirainen (d97ca599fa) - - lib-http: Use array_foreach_elem() where possible - - -M src/lib-http/http-client-host.c -M src/lib-http/http-client-peer.c -M src/lib-http/http-client-queue.c -M src/lib-http/http-client.c -M src/lib-http/http-message-parser.c -M src/lib-http/http-request.c -M src/lib-http/http-response.c -M src/lib-http/http-server-resource.c -M src/lib-http/http-server-response.c -M src/lib-http/http-server.c - -2021-02-10 20:45:50 +0200 Timo Sirainen (93c59b3309) - - lib-dict: Use array_foreach_elem() where possible - - -M src/lib-dict/dict-client.c -M src/lib-dict/dict.c - -2021-02-10 20:44:08 +0200 Timo Sirainen (b797b8377c) - - imap: Use array_foreach_elem() where possible - - -M src/imap/imap-client.c -M src/imap/imap-commands-util.c -M src/imap/imap-notify.c -M src/imap/imap-state.c - -2021-02-10 20:41:27 +0200 Timo Sirainen (75b985c753) - - doveadm: Use array_foreach_elem() where possible - - -M src/doveadm/doveadm-dump.c -M src/doveadm/doveadm-fs.c -M src/doveadm/doveadm-mail-batch.c -M src/doveadm/doveadm-mail-mailbox.c -M src/doveadm/doveadm-mail-server.c -M src/doveadm/doveadm-print-table.c -M src/doveadm/doveadm-who.c -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-ibc-pipe.c -M src/doveadm/dsync/dsync-mailbox-import.c -M src/doveadm/server-connection.c - -2021-02-10 20:34:25 +0200 Timo Sirainen (8364fd0be1) - - director: Use array_foreach_elem() where possible - - -M src/director/director-connection.c -M src/director/director-host.c -M src/director/director.c -M src/director/doveadm-connection.c -M src/director/mail-host.c -M src/director/main.c -M src/director/notify-connection.c -M src/director/user-directory.c - -2021-02-10 20:25:30 +0200 Timo Sirainen (cab67ca2cd) - - auth: Use array_foreach_elem() where possible - - -M src/auth/auth-worker-server.c -M src/auth/auth.c -M src/auth/db-dict-cache-key.c -M src/auth/db-dict.c -M src/auth/passdb.c -M src/auth/userdb.c - -2021-02-10 20:13:52 +0200 Timo Sirainen (6c540c71a7) - - lib-storage: Use array_foreach_elem() where possible - - -M src/lib-storage/index/dbox-single/sdbox-file.c -M src/lib-storage/index/dbox-single/sdbox-sync.c -M src/lib-storage/index/imapc/imapc-mail-fetch.c -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/index-search.c -M src/lib-storage/index/maildir/maildir-save.c -M src/lib-storage/list/mailbox-list-index-sync.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/mail-autoexpunge.c -M src/lib-storage/mail-namespace.c -M src/lib-storage/mail-storage-hooks.c -M src/lib-storage/mail-storage.c -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-lua.c -M src/lib-storage/mailbox-tree.c -M src/lib-storage/mailbox-watch.c - -2021-02-10 20:06:07 +0200 Timo Sirainen (6934e3eff8) - - lib: Use array_foreach_elem() where possible - - -M src/lib/env-util.c -M src/lib/event-filter.c -M src/lib/ioloop.c -M src/lib/istream-multiplex.c -M src/lib/lib-event.c -M src/lib/ostream-multiplex.c - -2021-02-10 19:53:25 +0200 Timo Sirainen (e788a21940) - - lib: array.h - Update array_foreach*() comments - - -M src/lib/array.h - -2021-02-10 19:49:00 +0200 Timo Sirainen (178a24d520) - - lib: array.h - Require C99 - - We're already requiring C99 elsewhere. - -M src/lib/array.h - -2021-05-05 17:49:33 +0300 Timo Sirainen (50957d30d6) - - lib: array_foreach_elem() - Don't allow using it for sizes larger than a - pointer - - Dovecot doesn't use any types larger than the pointer size (e.g. long - double). Restricting it to max pointer size might prevent inefficient usage. - -M src/lib/array.h -M src/lib/test-array.c - -2021-02-10 19:47:13 +0200 Timo Sirainen (db41d8aef3) - - lib: array_foreach_elem() - Small optimization - - Avoid having to recalculate the end of the array after each loop. This makes - the resulting assembler output similar to array_foreach(). - -M src/lib/array.h - -2021-04-01 17:24:10 +0300 Timo Sirainen (c9fa200175) - - lib-index: Try harder to open index with MAIL_INDEX_OPEN_FLAG_READONLY - - The readonly-flag is used when rebuilding index or dumping indexes. In both - cases it's better to try to open the index as best as possible, since fsck - isn't allowed. - -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index.c - -2021-05-06 15:17:05 -0400 Josef 'Jeff' Sipek (ef61bea432) - - lib-lua: Remove obsolete threading check - - We support multiple lua thread as long as they are created using the - dlua_script_new_thread() helper. - -M src/lib-lua/dlua-script.c - -2021-05-05 16:47:43 +0300 Timo Sirainen (3d2a582d56) - - dict-ldap: Fix calling dict_wait() on async lookup - - The dict_wait() could have waited forever because nothing stopped the - ioloop. Also fix calling the callback with the proper active ioloop. - -M src/lib-dict-backend/dict-ldap.c - -2021-05-05 16:41:21 +0300 Timo Sirainen (8e730ab0b7) - - dict-redis: dict-client: Use the proper active ioloop while calling commit() - callbacks - - If the callbacks did any IO/timeout changes, they would have gone to a wrong - ioloop. This would have caused a warning about IO/timeout leak though, so it - doesn't seem like there were such code paths currently. - -M src/lib-dict/dict-redis.c - -2021-05-05 16:37:52 +0300 Timo Sirainen (d559180d9e) - - dict-memcached-ascii: Assert-crash if dict ioloop gets any unexpected IOs or - timeouts - - -M src/lib-dict/dict-memcached-ascii.c - -2021-03-22 17:05:24 +0200 Timo Sirainen (92c30d0d36) - - dict-client: Assert-crash if dict ioloop gets any unexpected IOs or timeouts - - -M src/lib-dict/dict-client.c - -2021-03-22 16:50:04 +0200 Timo Sirainen (ad5d1ee03f) - - dict-client: Use the proper active ioloop while calling commit() and - lookup() callbacks - - If the callbacks did any IO/timeout changes, they would have gone to a wrong - ioloop. - -M src/lib-dict/dict-client.c - -2021-03-22 16:59:09 +0200 Timo Sirainen (4c40609b56) - - lib: Add io_loop_is_empty() - - -M src/lib/ioloop.c -M src/lib/ioloop.h -M src/lib/test-ioloop.c - -2021-05-05 11:19:24 +0300 Timo Sirainen (49b2183103) - - stats: Truncate field values to 1000 bytes with log exporter - - This attempts to prevent log lines from growing longer than 4 kB, which - causes them to wrap. - -M src/stats/event-exporter-fmt-json.c -M src/stats/event-exporter-fmt-tab-text.c -M src/stats/stats-metrics.c -M src/stats/stats-metrics.h - -2021-05-04 14:12:20 +0300 Timo Sirainen (2227e1ab77) - - imap: copy/move: Refresh source mailbox before copying/moving - - This way if another session had just expunged mails, the expunges will be - noticed and the copy/move will abort early. - -M src/imap/cmd-copy.c - -2021-04-29 15:49:00 +0300 Timo Sirainen (143b7c2b41) - - imap: move: Sync source mailbox between commits - - This way the messages are actually expunged from storage after the commit, - not just requested to be expunged. Most importantly this means that if - another session attempts to start moving the same messages it can be noticed - earlier and one of the moves aborted. - -M src/imap/cmd-copy.c - -2021-04-29 15:45:44 +0300 Timo Sirainen (739a46fe1b) - - imap: Add imap_search_anyset_to_uidset() - - -M src/imap/imap-search-args.c -M src/imap/imap-search-args.h - -2021-04-29 15:46:48 +0300 Timo Sirainen (3704149543) - - imap: Allow imap_search_seqset_iter_init() to iterate over uidset also - - -M src/imap/imap-search-args.c -M src/imap/imap-search-args.h - -2021-04-29 15:43:10 +0300 Timo Sirainen (3421ea2f78) - - lib-storage: Fix mailbox_get_uid_range() to handle "*" correctly - - Previously attempting to convert e.g. 1:* range would just assert-crash. - There were no such callers currently though. - -M src/lib-storage/mailbox-get.c -M src/lib-storage/test-mailbox-get.c - -2021-04-29 15:39:29 +0300 Timo Sirainen (91ba53a4a0) - - lib-storage: Always set struct mail.expunged - - Previously it was set only when some error noticed that there was a problem - accessing the mail. Now this is set immediately in mail_set_seq(). This - allows e.g. IMAP COPY/MOVE to abort when it encounters expunged mails. - -M src/lib-storage/index/index-mail.c - -2021-05-04 02:19:07 +0200 Stephan Bosch (d9ce815d93) - - lib-program-client: test-program-client-unix - Add test for delayed - disconnect after sending result code. - - -M src/lib-program-client/test-program-client-unix.c - -2021-05-03 23:54:11 +0200 Stephan Bosch (9599b0daaa) - - lib-program-client: test-program-client-net - Add test for delayed - disconnect after sending result code. - - -M src/lib-program-client/test-program-client-net.c - -2021-05-04 02:12:21 +0200 Stephan Bosch (9af1bb34e8) - - lib-program-client: test-program-client-unix - Fix server-side argument - count check. - - -M src/lib-program-client/test-program-client-unix.c - -2021-05-04 02:11:34 +0200 Stephan Bosch (982322ac6e) - - lib-program-client: test-program-client-net - Fix server-side argument count - check. - - -M src/lib-program-client/test-program-client-net.c - -2021-05-03 23:54:26 +0200 Stephan Bosch (1666e897f3) - - lib-program-client: program-client-remote - Fix result parsing in the - istream. - - This fixes internal errors occurring when the parent stream is fully read - before EOF is signaled. This was caused by the fact that the final bytes - were not always reserved properly for parsing, so that these ended up being - exposed to and eaten by the application. At the end, the result parsing code - would be faced with no data, thereby causing an internal error to be - returned by the calling application. - - This came to light as CI tests involving Sieve extprograms failed - irregularly. This problem only occurs when a (slight) delay exists between - the last data being sent and the connection being closed by the script - service, making this hard to reproduce. It typically occurred only under - high server load. - -M src/lib-program-client/program-client-remote.c - -2021-05-03 23:51:36 +0200 Stephan Bosch (4d4b1a1798) - - lib-program-client: program-client-remote - Fix error handling of istream. - - These days, input streams also set eof upon error, making the existing code - path wrong. - -M src/lib-program-client/program-client-remote.c - -2021-05-04 01:46:22 +0200 Stephan Bosch (0ffc146325) - - lib-program-client: program-client-remote - Add proper error and debug - logging for result code parsing. - - -M src/lib-program-client/program-client-remote.c - -2021-05-04 01:34:30 +0200 Stephan Bosch (17ca57dba7) - - lib-program-client: program-client-local - Add debug for child start - problem. - - -M src/lib-program-client/program-client-local.c - -2021-05-03 23:49:11 +0200 Stephan Bosch (ca34fd9db1) - - lib-program-client: Reformat test-program-client-unix.c. - - -M src/lib-program-client/test-program-client-unix.c - -2021-05-03 23:43:47 +0200 Stephan Bosch (e04a83afc8) - - lib-program-client: Reformat test-program-client-net.c. - - -M src/lib-program-client/test-program-client-net.c - -2021-05-03 23:35:38 +0200 Stephan Bosch (cfb3944760) - - lib-program-client: Reformat program-client-remote.c. - - -M src/lib-program-client/program-client-remote.c - -2021-04-22 12:07:12 +0300 Timo Sirainen (159e07879e) - - lib-test: Convert test_assert()s to fatal asserts when running static - analyzer - - This avoids unnecessary warnings about unit tests crashing when - test_assert()s fail. The warnings are correct, but it's a bit unnecessary to - write the failure code paths that nicely. - -M src/lib-test/test-common.c -M src/lib-test/test-common.h - -2021-04-26 14:14:45 +0300 Timo Sirainen (e71b8894ab) - - lib: Perform most of the event logging within data stack frame - - -M src/lib/event-log.c -M src/lib/test-event-log.c - -2021-04-26 14:13:09 +0300 Timo Sirainen (7fae81da43) - - lib-storage: Add data stack frames to mail_set_*() - - This can reduce data stack usage significantly with mail thread building. - -M src/lib-storage/mail.c - -2021-03-31 16:26:00 +0300 Timo Sirainen (6a058be026) - - lib: data-stack - If frame doesn't change current block, no blocks need to - be freed - - This is a micro-optimization to t_pop() to avoid an extra if-check. - -M src/lib/data-stack.c - -2021-03-31 16:22:24 +0300 Timo Sirainen (68ecc20d7b) - - lib: data-stack - Use stack_block.left_lowwater only with DEBUG - - -M src/lib/data-stack.c - -2021-03-31 16:17:30 +0300 Timo Sirainen (e8942f869c) - - lib: Remove data_stack_set_clean_after_pop() - - -M src/lib/data-stack.c -M src/lib/data-stack.h -M src/lib/test-data-stack.c - -2021-03-31 16:04:47 +0300 Timo Sirainen (62fa24f787) - - lib: data-stack - Move frame memory allocation inside data stack block - - -M src/lib/data-stack.c -M src/lib/test-data-stack.c - -2021-03-31 14:25:47 +0300 Timo Sirainen (158dfdf6ff) - - lib: data-stack - Replace stack_frame_block with a single stack_frame - - This simplifies the code at the cost of more memory allocations. However, - this will be fixed by the following commit. - -M src/lib/data-stack.c - -2020-11-16 20:54:20 +0200 Timo Sirainen (0e3652c4ea) - - lib: data-stack - Add data_stack_grow event - - This is now always enabled, not just in debug builds. - -M src/lib/data-stack.c -M src/lib/data-stack.h -M src/lib/lib.c -M src/lib/test-data-stack.c - -2021-03-31 14:40:12 +0300 Timo Sirainen (aff92930fb) - - lib: t_get_bytes_available() - Fix return value when current_block is almost - full - - -M src/lib/data-stack.c -M src/lib/test-data-stack.c - -2020-11-16 14:56:50 +0200 Timo Sirainen (f520a62a25) - - lib-settings: settings_check() - Avoid growing data stack unnecessarily - - Each check_func() could have increased data stack usage. Add it inside a - data stack frame to avoid it growing unnecessarily large. - -M src/lib-settings/settings-parser.c - -2020-11-16 14:58:08 +0200 Timo Sirainen (df4f7032cb) - - lib: module_dir_*load*(): Avoid growing data stack when checking duplicates - - This check could have unnecessarily grown data stack size when many plugins - are installed. - -M src/lib/module-dir.c - -2020-11-16 19:37:26 +0200 Timo Sirainen (a7ccda0286) - - global: Use T_END_PASS_STR() where possible - - -M src/config/config-parser.c -M src/lib-fs/fs-api.c -M src/lib-imap/imap-bodystructure.c -M src/lib-mail/mail-user-hash.c -M src/lib-mail/message-search.c -M src/lib-settings/settings-parser.c -M src/lib-sql/driver-cassandra.c -M src/lib-sql/driver-sqlpool.c - -2020-11-16 18:23:59 +0200 Timo Sirainen (6f68dc6736) - - lib: data-stack - Add t_pop_pass_str() and T_END_PASS_STR[_IF]() - - This simplifies passing error strings out of stack frames. For example: - - const char *error; - T_BEGIN { - ... - if (ret < 0) - error = t_strdup_printf("foo() failed: %m"); - } T_END_PASS_STR_IF(ret < 0, &error); - // error is still valid - -M src/lib/data-stack.c -M src/lib/data-stack.h -M src/lib/test-data-stack.c - -2021-03-31 11:56:10 +0300 Timo Sirainen (b5b15e1d41) - - lib: Add data_stack_frame_contains() - - -M src/lib/data-stack.c -M src/lib/data-stack.h - -2021-03-31 13:19:00 +0300 Timo Sirainen (f0180e7885) - - lib: Add data_stack_get_alloc_size() - - -M src/lib/data-stack.c -M src/lib/data-stack.h - -2021-03-31 12:59:29 +0300 Timo Sirainen (b2bb139396) - - lib: Fix data_stack_get_used_size() to return correct size - - It only included the last allocated block's used size. - -M src/lib/data-stack.c - -2021-03-31 12:52:47 +0300 Timo Sirainen (1f021a21b1) - - lib: data-stack - Don't set stack_block.next=NULL after mem_block_alloc() - already did it - - -M src/lib/data-stack.c - -2021-03-31 12:51:34 +0300 Timo Sirainen (7b1c81b369) - - lib: data-stack - mem_block_alloc() - Set stack_block.left to final value - immediately - - There's no need to first set it to 0 and then have the caller change it - again. - -M src/lib/data-stack.c - -2020-11-17 00:36:27 +0200 Timo Sirainen (6c37802b18) - - lib: data-stack - Remove unused_frame_blocks - - It's not that expensive to keep allocating them as needed, and it's a - potential waste of memory to keep them around. - -M src/lib/data-stack.c - -2020-11-17 00:32:45 +0200 Timo Sirainen (2da21080db) - - lib: data-stack - Don't keep largest unused block in memory - - It's not that expensive to allocate it again, but it might be expensive to - keep allocated a block that became huge due to a bug. The huge block could - be just wasting memory without ever being used again. - -M src/lib/data-stack.c - -2020-11-16 18:09:44 +0200 Timo Sirainen (59ff832bd1) - - lib: data-stack - Add unit test for data_stack_set_clean_after_pop() - - -M src/lib/test-data-stack.c - -2020-11-16 18:08:57 +0200 Timo Sirainen (8d5c1b2ecb) - - lib: data-stack - Rename variables in clean_after_pop handling - - These new variables make more sense than the old ones. - -M src/lib/data-stack.c - -2020-11-16 18:06:55 +0200 Timo Sirainen (c702072ece) - - lib: data-stack - Rename lowwater to left_lowwater - - This describes its behavior better. Also add a comment explaining what - exactly it is. - -M src/lib/data-stack.c - -2020-11-16 17:57:39 +0200 Timo Sirainen (8a37fc6f68) - - lib: data-stack - Rename block_space_used[] to block_space_left[] - - This describes its behavior better. Also add a comment explaining what - exactly it is. - -M src/lib/data-stack.c - -2020-11-16 15:25:36 +0200 Timo Sirainen (d3e36b20b1) - - lib: data-stack - Use INITIAL_STACK_SIZE without growing it to nearest power - - -M src/lib/data-stack.c - -2021-03-31 13:13:22 +0300 Timo Sirainen (dda74fe776) - - global: Never use t_push(NULL) - - A non-NULL name is expected by the debug logging. - -M src/lib-master/master-service.c -M src/lib/data-stack.c - -2021-03-31 13:11:16 +0300 Timo Sirainen (afe3adbd51) - - lib: Recalculate events' debug logging state after replacing event filters - - -M src/lib/event-log.c -M src/lib/event-log.h -M src/lib/lib-event-private.h -M src/lib/lib-event.c - -2021-05-03 19:40:23 +0300 Timo Sirainen (10dbf465e0) - - lib-index: test-mail-index-sync-ext - Fix memory leak - - -M src/lib-index/test-mail-index-sync-ext.c - -2021-04-12 22:43:57 +0200 Stephan Bosch (02de37f6c2) - - lib-smtp: smtp-server-transaction - Make sure current data command is - recorded as soon as possible. - - This prevents crashes when replies are sent early. This also prevents - crashes when invalid DATA commands are sent in succession. - -M src/lib-smtp/smtp-server-cmd-data.c -M src/lib-smtp/smtp-server-recipient.c -M src/lib-smtp/smtp-server-transaction.c -M src/lib-smtp/test-smtp-server-errors.c - -2021-04-12 22:50:48 +0200 Stephan Bosch (b9d41364d0) - - lib-smtp: smtp-server-transaction - Rename - smtp_server_transaction_last_data() to - smtp_server_transaction_data_command(). - - -M src/lib-smtp/smtp-server-cmd-data.c -M src/lib-smtp/smtp-server-private.h -M src/lib-smtp/smtp-server-transaction.c - -2021-04-12 22:46:17 +0200 Stephan Bosch (b98ebb2b00) - - lib-smtp: smtp-server-recipient - Rename smtp_server_recipient_last_data() - to smtp_server_recipient_data_command(). - - -M src/lib-smtp/smtp-server-private.h -M src/lib-smtp/smtp-server-recipient.c -M src/lib-smtp/smtp-server-transaction.c - -2021-05-03 14:07:44 +0300 Timo Sirainen (635fb845ea) - - login-common: Add client.list_type to better track which linked list client - belongs to - - Add asserts to make sure the client is always in the expected list. - -M src/login-common/client-common.c -M src/login-common/client-common.h - -2021-04-23 16:43:36 +0300 Timo Sirainen (e619fe552d) - - login-common: Fix handling destroyed_clients linked list - - The client needs to be removed from destroyed_clients linked list before - it's added to client_fd_proxies linked list. - - Broken by 1c622cdbe08df2f642e28923c39894516143ae2a - -M src/login-common/client-common.c - -2021-02-06 20:11:14 +0200 Timo Sirainen (1992a4d1d6) - - lib-index: test-mail-index-sync-ext - Fix to link with the full libindex - - -M src/lib-index/Makefile.am -M src/lib-index/test-mail-index-sync-ext.c - -2021-02-02 17:41:28 +0200 Timo Sirainen (37a5735c2d) - - lib-index: Add/update comments related to cloning maps - - -M src/lib-index/mail-index-map.c -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-sync-update.c - -2021-02-02 17:25:33 +0200 Timo Sirainen (b249bb724c) - - lib-index: Don't call mail_index_modseq_sync_map_replaced() if nothing - changed - - -M src/lib-index/mail-index-sync-update.c - -2021-02-02 16:13:50 +0200 Timo Sirainen (e274d915fc) - - lib-index: Add comments to struct mail_transaction_log and related - - -M src/lib-index/mail-transaction-log-private.h - -2021-02-02 16:13:01 +0200 Timo Sirainen (4c74469147) - - lib-index: Rename MAIL_TRANSACTION_LOG_LOCK_CHANGE_TIMEOUT to .._DOTLOCK_.. - - -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log.c - -2021-02-02 16:02:58 +0200 Timo Sirainen (f309a14f3d) - - lib-index: Rename mail_transaction_log_file.lock_created to lock_create_time - - -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log.c - -2021-02-02 15:59:34 +0200 Timo Sirainen (7eb8a13552) - - lib-index: Move mail_transaction_log_file_get_modseq_next_offset() to its - own file - - This nicely isolates the modseq_cache code to its own file. - -M src/lib-index/Makefile.am -M src/lib-index/mail-transaction-log-file.c -A src/lib-index/mail-transaction-log-modseq.c - -2021-02-02 15:26:08 +0200 Timo Sirainen (52fb040144) - - lib-index: Remove unused mail_transaction_log_file.saved_tail_sync_offset - - Shrinking tail_offsets have been ignored since - 082e82792b8ac33ad42beac510441b37a3c50737 - -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-private.h - -2021-02-02 15:24:53 +0200 Timo Sirainen (f2a5850203) - - lib-index: Rename mail_transaction_log_file.saved_tail_offset to - last_read_hdr_tail_offset - - This describes better what it's actually used for. - -M src/lib-index/mail-transaction-log-append.c -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log.c - -2021-02-02 15:07:02 +0200 Timo Sirainen (9a2f2a1149) - - lib-index: Remove mail_transaction_log.nfs_flush - - Just access it via mail_index.flags like it's done elsewhere. - -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log.c - -2021-02-02 14:59:02 +0200 Timo Sirainen (751e99be42) - - lib-index: Rename mail_transaction_log.dotlock_count to dotlock_refcount - - Also change it to a signed integer and add asserts to make sure it's >=0. - This is how refcounts are handled generally in Dovecot. - -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-private.h - -2021-02-01 23:05:50 +0200 Timo Sirainen (63cf1888d1) - - lib-index: Update mail caching decisions explanation comment. - - -M src/lib-index/mail-cache-decisions.c - -2021-02-01 22:30:27 +0200 Timo Sirainen (f7ab72fd4e) - - lib-index: Add test-mail-cache-fields unit test - - -M src/lib-index/Makefile.am -A src/lib-index/test-mail-cache-fields.c - -2021-02-01 22:11:11 +0200 Timo Sirainen (ea548e9c48) - - lib-index: Add comments to struct mail_cache and related - - Also reorder some fields so the grouping makes more sense. - -M src/lib-index/mail-cache-fields.c -M src/lib-index/mail-cache-private.h -M src/lib-index/mail-cache.h - -2021-01-25 21:10:32 +0200 Timo Sirainen (67b438b599) - - lib-index: Add comments to struct mail_cache_header and related - - -M src/lib-index/mail-cache-private.h -M src/lib-index/mail-cache.h - -2021-01-29 19:11:36 +0200 Timo Sirainen (cf1c443ca8) - - lib-index: Add comments to mail-transaction-log.h - - -M src/lib-index/mail-transaction-log.h - -2021-01-25 23:06:59 +0200 Timo Sirainen (d13f33d7a9) - - lib-index: Update mail_index_mail_flags comments and add - MAIL_INDEX_MAIL_FLAG_UNUSED - - -M src/lib-index/mail-index.h - -2021-01-25 22:42:37 +0200 Timo Sirainen (9a71b83bdd) - - lib-index: Add comments to struct mail_index_ext_header and related - - -M src/lib-index/mail-index-private.h -M src/lib-index/mail-transaction-log.h - -2021-01-25 22:10:29 +0200 Timo Sirainen (f18d48f83f) - - lib-index: Add comments to struct mail_index_header and related - - -M src/lib-index/mail-index.h - -2021-01-20 19:22:06 +0200 Timo Sirainen (60db30ce31) - - lib-index: Add comments to struct mail_index_view - - -M src/lib-index/mail-index-view-private.h - -2021-01-20 19:21:10 +0200 Timo Sirainen (52ae13770e) - - lib-index: Add comments and reorder fields in struct mail_index - - The field ordering was pretty random for some fields. The new ordering - should make more sense. - -M src/lib-index/mail-index-private.h - -2021-01-20 18:43:27 +0200 Timo Sirainen (382fe4cf01) - - lib-index: Rename mail_index.pending_log2_rotate_time to - hdr_log2_rotate_time_delayed_update - - This describes better what it does. Also add some comments explaining what - its purpose is. - -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-sync.c -M src/lib-index/mail-transaction-log.c - -2021-02-06 21:00:58 +0200 Timo Sirainen (ffe862c746) - - lib-index: mail_index_expunge_handler_t - Remove seq and context parameters - - They're not actually used anywhere. - -M src/lib-index/mail-cache-private.h -M src/lib-index/mail-cache-sync-update.c -M src/lib-index/mail-cache.c -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-sync-ext.c -M src/lib-index/mail-index-sync-update.c -M src/lib-index/mail-index.c - -2021-01-25 22:44:17 +0200 Timo Sirainen (7943d5ec25) - - lib-index: mail_index_register_expunge_handler() - Remove call_always - handling - - It's not needed anymore. - -M src/lib-index/mail-cache.c -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-sync-ext.c -M src/lib-index/mail-index.c - -2021-01-20 18:17:27 +0200 Timo Sirainen (5068447559) - - lib-index: Remove "sync lost" callback handlers - - These were used to invalidate in-memory dovecot.index.cache cache with - mmap_disable=yes. This became unnecessary when cache file became - append-only. - -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index.c - -2021-01-20 18:07:33 +0200 Timo Sirainen (15aea21ba8) - - lib-index: Move fields from struct mail_index to struct mail_index_error - - This clarifies which are error related fields. - - nodiskspace isn't actually currently used for anything, but it seems - potentially useful in the future. - -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-strmap.c -M src/lib-index/mail-index.c - -2021-01-20 18:04:40 +0200 Timo Sirainen (ba11772d6e) - - lib-index: Use mail_index_reset_error() when opening index - - This resets the error more cleanly than changing nodiskspace directly. - -M src/lib-index/mail-index.c - -2021-01-20 18:01:03 +0200 Timo Sirainen (25d5331503) - - lib-index: Remove mail_index.index_lock_timeout - - Nothing needs it. - -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index.c -M src/lib-index/mail-transaction-log-file.c - -2021-01-20 17:54:49 +0200 Timo Sirainen (2f0a0e87b2) - - lib-index: Move fields from struct mail_index to struct mail_index_settings - - This clarifies which fields are settings related. - -M src/lib-index/mail-cache-purge.c -M src/lib-index/mail-cache-transaction.c -M src/lib-index/mail-cache.c -M src/lib-index/mail-index-lock.c -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-strmap.c -M src/lib-index/mail-index-transaction-export.c -M src/lib-index/mail-index-write.c -M src/lib-index/mail-index.c -M src/lib-index/mail-transaction-log-append.c -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log.c - -2021-01-20 17:35:20 +0200 Timo Sirainen (706709e677) - - lib-index: Remove mail_index_view.index_sync_view - - Nothing was using it. - -M src/lib-index/mail-index-sync.c -M src/lib-index/mail-index-view-private.h - -2021-01-20 17:34:01 +0200 Timo Sirainen (920b0ad025) - - lib-index: Remove mail_index_view.transactions and related functions - - It's enough to have transaction_list, nothing needs the count. - -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-transaction.c -M src/lib-index/mail-index-view-private.h -M src/lib-index/mail-index-view-sync.c -M src/lib-index/mail-index-view.c - -2021-01-20 17:31:36 +0200 Timo Sirainen (ab3f44539b) - - lib-index: Change mail_index_view_get_transaction_count() into - _have_transactions() - - This allows removing mail_index_view.transactions in the next commit. - -M src/lib-index/mail-index-view.c -M src/lib-index/mail-index.h -M src/lib-storage/index/dbox-multi/mdbox-map.c - -2021-01-20 17:22:20 +0200 Timo Sirainen (09a5aeb327) - - lib-index: Rename mail_index.last_read_log_* to main_index_hdr_log_* - - Also update the comment to describe better what the variables do. - -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-sync.c -M src/lib-index/mail-index-write.c - -2021-01-19 12:51:07 +0200 Timo Sirainen (1eea5d4468) - - lib-index: Remove mail_index_map.hdr_base - - It was just causing unnecessary complexity. Simpler to just keep - hdr_copy_buf always up-to-date and access it directly. - -M src/lib-index/mail-index-fsck.c -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-map.c -M src/lib-index/mail-index-modseq.c -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-sync-ext.c -M src/lib-index/mail-index-sync-keywords.c -M src/lib-index/mail-index-sync-update.c -M src/lib-index/test-mail-index-write.c - -2021-01-29 17:45:45 +0200 Timo Sirainen (6383fd8538) - - lib-index: MAIL_TRANSACTION_LOG_VERSION_* - Add also FEATURE_ suffix for - feature macros - - This more clearly differentiates them from the other - MAIL_TRANSACTION_LOG_VERSION_* macros - -M src/lib-index/mail-transaction-log.h - -2021-01-29 17:03:34 +0200 Timo Sirainen (c697dd10a1) - - lib-index: Verify that keywords in dovecot.index header don't change - unexpectedly - - Previously this was behind DEBUG for performance reasons, but that was only - because dovecot.index file used to be modified directly. Nowadays it's rare - that the index is being re-read within the same session (most changes are - read via dovecot.index.log), so it's better to verify that things are - working correctly. - -M src/lib-index/mail-index-map-hdr.c - -2021-01-19 12:48:16 +0200 Timo Sirainen (d71c7b5cf2) - - lib-index: Add and use MAIL_INDEX_MAP_HDR_OFFSET() helper macro - - -M src/doveadm/doveadm-dump-index.c -M src/lib-index/mail-index-fsck.c -M src/lib-index/mail-index-map-hdr.c -M src/lib-index/mail-index-map.c -M src/lib-index/mail-index-modseq.c -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-sync-keywords.c -M src/lib-index/mail-index-view.c -M src/lib-index/mail-index-write.c - -2021-01-19 12:42:02 +0200 Timo Sirainen (55f8474dbf) - - lib-index: Fill mail_index_map.hdr_copy_buf also when mmap()ing index - - This doesn't seem to have been necessary so far, but will be required by the - following changes. - -M src/lib-index/mail-index-map-read.c - -2021-05-03 13:15:17 +0300 Timo Sirainen (7031569672) - - imap: Fix using SETMETADATA NIL to unset value - - Broken by 923362d27d9b2428e301614673cb0efba3bf928f - -M src/imap/cmd-setmetadata.c - -2021-04-22 11:36:40 +0300 Timo Sirainen (28ca2bb152) - - master: Explain how "client_limit is lower than required" is calculated in - the warning - - -M src/config/settings-get.pl -M src/master/master-settings.c - -2021-04-21 10:41:27 -0400 Josef 'Jeff' Sipek (a200c09711) - - stats: Use only one filter for stats and exports - - Since there is no way to have a exported-only metric (i.e., all metrics are - used for statistics calculations), the exported metrics are always a subset - of all metrics. Additionally, since exported metrics have a non-NULL - exporter info while stats-only metrics have a NULL, it is very easy to check - if a given metric shoud be exported or not. - - We can combine these facts and simplify the event matching. We can simply - match against the "all metrics" filter, perform the statistics, and then - export the event if needed. - - This reduces the CPU load quite dramatically since we are no longer - duplicating the matching for exported metrics. Stats-only metrics shouldn't - see any measurable difference in performance. - -M src/stats/stats-metrics.c - -2021-04-21 11:50:54 -0400 Josef 'Jeff' Sipek (32cb941a17) - - lib: event filter - Extend existing queries if context matches - (event_filter_parse) - - Since there is no practical difference between a filter with one query and a - filter with multiple queries using the same context pointer, we can extend - the existing queries as long as there is a context pointer match. This - reduces the number of queries (and filter expressions) thereby increasing - future optimization opportunities. - -M src/lib/event-filter.c - -2021-04-21 11:47:51 -0400 Josef 'Jeff' Sipek (12507668f7) - - lib: event filter - Extend existing queries if context matches - (event_filter_merge_with_context*) - - Since there is no practical difference between a filter with one query and a - filter with multiple queries using the same context pointer, we can extend - the existing queries as long as there is a context pointer match. This - reduces the number of queries (and filter expressions) thereby increasing - future optimization opportunities. - -M src/lib/event-filter.c - -2021-04-21 11:42:55 -0400 Josef 'Jeff' Sipek (1115aeff8b) - - lib: event filter - Extend existing queries if context matches - (event_filter_add) - - Since there is no practical difference between a filter with one query and a - filter with multiple queries using the same context pointer, we can extend - the existing queries as long as there is a context pointer match. This - reduces the number of queries (and filter expressions) thereby increasing - future optimization opportunities. - -M src/lib/event-filter.c - -2021-04-21 11:52:27 -0400 Josef 'Jeff' Sipek (c18107397c) - - lib: event filter - Move add_node higher up in the file to avoid a prototype - - -M src/lib/event-filter.c - -2021-04-21 11:37:31 -0400 Josef 'Jeff' Sipek (725c7bdec7) - - lib: event filter - Add filter op argument to add_node - - -M src/lib/event-filter.c - -2021-04-21 11:19:31 -0400 Josef 'Jeff' Sipek (d8d2f0ea3c) - - lib: event filter - Generalize query construction helpers - - If instead of taking the internal query, they take a filter expression node, - they can be reused by optimizations in subsequent commits. - -M src/lib/event-filter.c - -2021-04-26 19:49:22 +0300 Timo Sirainen (714fb52a99) - - lib: Rename event_find_field() to event_find_field_nonrecursive() and make - it public - - -M src/lib/lib-event.c -M src/lib/lib-event.h - -2021-03-16 19:13:23 +0200 Timo Sirainen (b3460178be) - - lib: Reformat lib-event to avoid long lines - - -M src/lib/lib-event.c -M src/lib/lib-event.h - -2021-03-16 19:09:06 +0200 Timo Sirainen (07437af0e5) - - lib: Rename event_find_field*() to event_find_field_recursive*() - - This clarifies how it works. - -M src/auth/test-auth-request-fields.c -M src/lib-dict/dict.c -M src/lib/event-filter.c -M src/lib/lib-event.c -M src/lib/lib-event.h -M src/lib/test-event-filter-expr.c -M src/lib/test-event-filter.c -M src/stats/event-exporter-fmt-json.c -M src/stats/event-exporter-fmt-tab-text.c -M src/stats/stats-metrics.c - -2021-03-16 18:26:20 +0200 Timo Sirainen (30fd8eada2) - - lib: event_find_field() - Rewrite without using recursion - - This simplifies the following change. - -M src/lib/lib-event.c - -2021-03-09 16:32:35 +0200 Timo Sirainen (f9177a5788) - - lib: event_match_field() - Avoid recursing event fields twice - - event_find_field() is already recursive. - -M src/lib/event-filter.c - -2021-03-09 16:31:20 +0200 Timo Sirainen (012a453862) - - lib: Split off event_has_category_nonrecursive() - - -M src/lib/event-filter.c - -2021-03-11 18:55:21 +0200 Timo Sirainen (66d3263685) - - lib-master: test-event-stats - Fix "large event id" test to check for END - - Otherwise the END would be visible in the next test. - -M src/lib-master/test-event-stats.c - -2021-03-11 18:29:45 +0200 Timo Sirainen (a6437c7668) - - lib-master: test-event-stats - Avoid busy-looping while waiting for "test - done" file - - -M src/lib-master/test-event-stats.c - -2021-01-27 10:55:14 +0200 Aki Tuomi (c0f394fe76) - - lib: event importing - Do not accept empty field name - - -M src/lib/lib-event.c - -2020-12-15 09:15:56 +0200 Aki Tuomi (e3bd0f78e1) - - lib: lib-event - Use named initializators for passthrough event - - -M src/lib/lib-event.c - -2021-04-26 15:39:36 +0300 Aki Tuomi (94f8661813) - - m4: Include local copy of pkg.m4 - - We need features not present in early versions. The variable=name support - has been there since 1.7.4 of pkg-config. - -M configure.ac -A m4/pkg.m4 - -2021-04-21 19:18:07 +0300 Timo Sirainen (0b49075d90) - - lib-storage: Avoid logging the same mail istream read error multiple times - - -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h - -2021-04-26 12:02:58 +0300 Aki Tuomi (226d78ac75) - - master: Notify systemd after we are really stopped - - -M src/master/main.c - -2021-04-26 08:39:50 +0300 Aki Tuomi (2465a431d4) - - Makefile.am: Fix systemd detection mess in automake - - -M Makefile.am -M configure.ac -A m4/want_systemd.m4 - -2021-04-26 08:29:02 +0300 Aki Tuomi (8df32a724b) - - dovecot.service: Set type to notify only when compiling with systemd - - -M Makefile.am -M configure.ac -M dovecot.service.in - -2021-04-26 08:38:14 +0300 Aki Tuomi (599271fcc1) - - Makefile.am: Make systemd service file generation more readable - - -M Makefile.am - -2021-04-26 09:38:44 +0300 Aki Tuomi (2353fd43af) - - configure.ac: Move CFLAGS to right place - - Now it's in middle of passdb displaying - -M configure.ac - -2021-03-24 16:09:51 +0200 Timo Sirainen (eb6509f963) - - lib-storage: Fix detecting duplicate nodes in mailbox list index - - The duplicates were checked only for root nodes, not for child nodes. - -M src/lib-storage/list/mailbox-list-index.c - -2021-04-08 17:08:54 +0100 Siavash Tavakoli (49f4107082) - - driver-mysql: Rollback a failed multi-statement transaction - - If transaction failed, send "ROLLBACK" statement. - -M src/lib-sql/driver-mysql.c - -2021-04-07 16:44:00 +0100 Siavash Tavakoli (0795e4cc62) - - driver-mysql: Avoid BEGIN/COMMIT for single statement transactions - - To reduce unnecessary load to database. - -M src/lib-sql/driver-mysql.c - -2021-04-01 20:39:27 +0300 Timo Sirainen (0f66865e0e) - - lib-imap: imap_bodystructure_write() - Return error on corruption instead of - assert-crash - - This could happen if broken message_parts came from cache and - message_part->data was newly read from the mail input. - -M src/lib-imap-storage/imap-msgpart.c -M src/lib-imap/fuzz-imap-bodystructure.c -M src/lib-imap/imap-bodystructure.c -M src/lib-imap/imap-bodystructure.h -M src/lib-imap/test-imap-bodystructure.c -M src/lib-storage/index/imapc/imapc-mail-fetch.c -M src/lib-storage/index/index-mail.c - -2021-04-08 15:04:42 +0300 Timo Sirainen (4db18b7413) - - lib-storage: Split off index_mail_parse_bodystructure_full() - - -M src/lib-storage/index/index-mail.c - -2021-04-09 14:09:17 +0300 Timo Sirainen (12ae2af6ac) - - lib-imap: fuzz-imap-bodystructure - Change failures to i_panic() instead of - i_fatal() - - -M src/lib-imap/fuzz-imap-bodystructure.c - -2021-03-04 09:52:40 +0200 Aki Tuomi (641cfdb62a) - - NEWS: Mention XZ/LZMA removal. - - -M NEWS - -2021-03-02 10:55:53 +0200 Aki Tuomi (b2f9c2f538) - - NEWS: Update news for 2.3.14 - - -M NEWS - -2021-03-30 21:12:41 +0200 Stephan Bosch (a5209c83c3) - - lib-smtp: smtp-params - Make explicit which extra parameters can be written - by smtp_params_*_write(). - - This can be used to prevent sending unsupported parameters to the remote - server, even when these are listed in extra_parameters. Before, blindly - proxying parameters would cause MAIL/RCPT error replies from the remote - server. - -M src/lib-smtp/smtp-client-command.c -M src/lib-smtp/smtp-params.c -M src/lib-smtp/smtp-params.h -M src/lib-smtp/test-smtp-params.c - -2021-03-30 21:06:58 +0200 Stephan Bosch (4987b516aa) - - lib-smtp: smtp-client-connection - Explicitly specify which MAIL/RCPT - parameters are added by extra capabilities. - - This is used in later commit to limit which custom parameters are actually - sent to the server based on the capabilities supported by said server. - -M src/lib-smtp/smtp-client-connection.c -M src/lib-smtp/smtp-client-private.h -M src/lib-smtp/smtp-client.h -M src/lmtp/lmtp-proxy.c - -2021-03-30 21:48:24 +0200 Stephan Bosch (b37ecc4f02) - - lib-smtp: smtp-client-connection - Prevent recording extra capabilities from - server more than once. - - -M src/lib-smtp/smtp-client-connection.c - -2021-03-30 21:45:33 +0200 Stephan Bosch (8bf233ddf3) - - lib-smtp: smtp-client-connection - Prevent duplicate registrations for extra - capabilities. - - -M src/lib-smtp/smtp-client-connection.c - -2021-03-31 12:33:38 +0200 Stephan Bosch (47203e9f30) - - lib-smtp: smtp-client-connection - Move - smtp_client_connection_find_extra_capability(). - - -M src/lib-smtp/smtp-client-connection.c - -2021-03-30 21:33:17 +0200 Stephan Bosch (af677f5b78) - - lib-smtp: smtp-client-connection - Change extra capability registration to - use a struct. - - This is needed for adding additional features in later commit. - -M src/lib-smtp/smtp-client-connection.c -M src/lib-smtp/smtp-client-connection.h -M src/lib-smtp/smtp-client-private.h -M src/lib-smtp/smtp-client.h -M src/lmtp/lmtp-proxy.c - -2021-03-30 21:41:48 +0200 Stephan Bosch (1a77fca29f) - - lib-smtp: smtp-client-connection - Fix typo in function name. - - -M src/lib-smtp/smtp-client-connection.c - -2021-03-31 00:06:29 +0200 Stephan Bosch (985f21ad5a) - - lmtp: lmtp-commands - Drop XRCPTFORWARD parameter once processed. - - This prevents it from popping up elsewhere. This for example crudely fixes a - problem in the proxy where XRCPTFORWARD was sent even without backend server - support. - -M src/lmtp/lmtp-commands.c - -2021-04-19 12:46:44 +0300 Timo Sirainen (cdbb581436) - - imap: NOTIFY - Fix crash if client disconnects while sending FETCH - notification (try #2) - - Continues the incomplete fix for c4f4058d16096f23eea0b3182205d6653f5954dd - - Fixes: Panic: Trying to close mailbox INBOX with open transactions - -M src/imap/imap-client.c - -2021-04-16 16:13:39 +0300 Timo Sirainen (673a9e1d17) - - login-common: Fix memory leak if anvil query is aborted - - -M src/login-common/client-common.h -M src/login-common/sasl-server.c - -2021-04-16 11:18:15 +0300 Aki Tuomi (50b5ee12db) - - virtual: virtual-mail - Use index_mail_set_seq to ensure cleanup - - Forgotten in 67ab2070cf513179382b564871f2a0f177987cc9 - -M src/plugins/virtual/virtual-mail.c - -2021-04-16 11:16:36 +0300 Aki Tuomi (0cd683c086) - - virtual: virtual-mail - Pass wanted_headers and wanted_fields to backend - mails only - - Broken in 67ab2070cf513179382b564871f2a0f177987cc9 - -M src/plugins/virtual/virtual-mail.c - -2021-04-16 10:01:45 +0300 Aki Tuomi (e5098ff2b0) - - virtual: virtual-mail - Use index_mail_free - - Since we are using index_mail_init, we need to use index_mail_free to free - up the virtual mail. - -M src/plugins/virtual/virtual-mail.c - -2021-04-16 10:24:22 +0300 Aki Tuomi (df46da1ace) - - virtual: virtual-mail - Free wanted headers in close if we are freeing - - Simplifies next change - -M src/plugins/virtual/virtual-mail.c - -2021-04-16 10:03:33 +0300 Aki Tuomi (448330c320) - - virtual: virtual-mail - Free up mails in virtual_mail_close if we are - freeing up - - Makes next change easier - -M src/plugins/virtual/virtual-mail.c - -2021-04-14 18:08:03 +0300 Timo Sirainen (829b04676c) - - lib: Add comment to CALLBACK_TYPECHECK() macro - - -M src/lib/macros.h - -2021-03-31 03:08:26 +0100 Siavash Tavakoli (0d252dccb3) - - lib-index: Add "mail_cache_lookup" event - - Adds new event for cache lookups with lookup name as "field" event field. - -M src/lib-index/mail-cache-lookup.c - -2021-03-31 17:28:46 +0100 Siavash Tavakoli (fa7a490bc3) - - lib-index: Small refactor in mail_cache_lookup_field() - - Makes it easier to emit event in next commit regardless of code path. - -M src/lib-index/mail-cache-lookup.c - -2021-03-30 00:37:59 +0100 Siavash Tavakoli (d6ceec7f3a) - - lib-storage: Add "mail_expunged" event - - Emitted when a message is actually expunged. Has UID as a field. - -M src/lib-storage/mail-storage.c - -2021-03-29 13:41:55 +0100 Siavash Tavakoli (d5fe1b3c75) - - lib-storage, plugins/virtual: Use mail_sync_notify() - - Instead of calling sync_notify vfunc directly. - -M src/lib-storage/index/dbox-multi/mdbox-sync.c -M src/lib-storage/index/dbox-single/sdbox-sync.c -M src/lib-storage/index/imapc/imapc-sync.c -M src/lib-storage/index/maildir/maildir-sync-index.c -M src/lib-storage/index/mbox/mbox-sync.c -M src/plugins/virtual/virtual-sync.c - -2021-03-29 13:41:32 +0100 Siavash Tavakoli (8f9b9731e6) - - lib-storage: Add mailbox_sync_notify() - - Instead of calling sync_notify vfunc directly everywhere. - -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.c - -2021-03-29 13:01:40 +0100 Siavash Tavakoli (0972d42cdb) - - lib-storage: Emit "mail_expunge_requested" event - - Adds a new event, "mail_expunge_requested" which is emitted when a message - is marked to being expunged. - -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail.c - -2021-02-10 13:57:08 +0200 Aki Tuomi (c8fa10672b) - - lib-storage: Emit "mail_opened" event when mails opened - - Adds a new event, "mail_opened" with "reason" as field. Also drop duplicate - event in index_mail_init_stream(). - -M src/lib-storage/index/index-mail.c -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail.c - -2021-04-06 00:38:06 +0100 Siavash Tavakoli (9a8449d815) - - lib-storage: Include "age_days" field in mail.event - - Goes back one week, if mail age information is known, an integer field is - added with value of mail age in number of days. - -M src/lib-storage/index/index-mail.c - -2021-03-31 16:08:06 +0100 Siavash Tavakoli (67ab2070cf) - - plugins/virtual: Use index_mail_init() to initialize the mail - - Cleans up duplicated code. Also, index_mail_init initializes mail.event as - well. Something that was missing previously. - -M src/plugins/virtual/virtual-mail.c - -2021-03-31 16:01:02 +0100 Siavash Tavakoli (3fe38329a9) - - lib-storage: Refactor index_mail_init() to make it more reusable - - Adds arguments for two memory pools, to be set for mail.pool and - mail.data_pool. If data_pool is NULL, a pool is allocated but mail_pool is - required. - -M src/lib-storage/index/dbox-common/dbox-mail.c -M src/lib-storage/index/imapc/imapc-mail.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h -M src/lib-storage/index/pop3c/pop3c-mail.c - -2021-03-11 14:14:53 +0200 Timo Sirainen (5dd81f98a9) - - lib-storage: Recreate mail.event when active mail is changed - - This makes sure that the two mails' events are treated completely - independently without any accidental spilling. It also prevents wasting - memory if each mail changes the event and grows the memory pool. - -M src/lib-storage/index/index-mail.c - -2021-04-12 21:18:05 +0200 Stephan Bosch (4d76fa500b) - - lib-smtp: fuzz-smtp-server - Implement all callbacks required for full - transaction. - - Before required RCPT and DATA callbacks were omitted, causing assertion - failures when the fuzzer reached the RCPT stage. - -M src/lib-smtp/fuzz-smtp-server.c - -2021-04-12 21:14:07 +0200 Stephan Bosch (99b3f881f8) - - lib-test: fuzzer - Fix FD-based fuzzing to only shutdown input FD upon end - of data. - - Before, it closed the whole socket once the data input ended. This for - example caused the SMTP server fuzzer to end before all replies were sent. - This shortened the test and could have hidden bugs that occur later in the - SMTP transaction. - -M src/lib-test/fuzzer.c -M src/lib-test/fuzzer.h - -2021-04-12 21:12:27 +0200 Stephan Bosch (d14c6b5e52) - - lib-smtp: smtp-reply - Add debug message for reply send error. - - This makes it a little clearer at what point the connection loss or error - was noticed and for which command/reply. - -M src/lib-smtp/smtp-server-reply.c - -2021-04-14 11:57:39 +0300 Timo Sirainen (6a3b1ac4fb) - - lib-lua: Fix compiler warning with dlua_pcall_yieldable() - - -M src/lib-lua/dlua-script-private.h - -2021-04-09 11:35:05 +0200 Markus Valentin (c3fc5c9060) - - lib-storage: Make sure listescape can work correctly with shared namespaces - - This makes sure that if storage_name_escape_char is set, shared mailboxes do - not return the invalid/unescaped mailbox storage_name internally which could - result in failures like "Invalid mailbox name: Name must not have '/' - character" even when using the listescape plugin. - - Broken by 5fd5ad3a2be6708e81f8dcfcbb06a3957dddd276 - -M src/lib-storage/mailbox-list.c - -2021-04-01 21:42:02 +0300 Timo Sirainen (1d9b4e1400) - - lib: Fix buffer_t aliasing problems with LTO - - This changes the buffer_t slightly, which requires adding extra braces when - buffer_t contents are directly defined. - - This changes Dovecot to require C11 compatible compiler, because it uses - anonymous union and struct. GNU99 extensions are also enough. - -M src/anvil/anvil-settings.c -M src/auth/auth-settings.c -M src/config/config-settings.c -M src/config/settings-get.pl -M src/dict/dict-settings.c -M src/director/director-settings.c -M src/dns/dns-client-settings.c -M src/doveadm/doveadm-settings.c -M src/imap-hibernate/imap-hibernate-settings.c -M src/imap-login/imap-login-settings.c -M src/imap-urlauth/imap-urlauth-login-settings.c -M src/imap-urlauth/imap-urlauth-settings.c -M src/imap-urlauth/imap-urlauth-worker-settings.c -M src/imap/imap-settings.c -M src/indexer/indexer-settings.c -M src/indexer/indexer-worker-settings.c -M src/ipc/ipc-settings.c -M src/lib/buffer.c -M src/lib/buffer.h -M src/lib/test-buffer.c -M src/lmtp/lmtp-settings.c -M src/log/log-settings.c -M src/old-stats/stats-settings.c -M src/plugins/fts-lucene/Snowball.cc -M src/plugins/fts-lucene/lucene-wrapper.cc -M src/pop3-login/pop3-login-settings.c -M src/pop3/pop3-settings.c -M src/replication/aggregator/aggregator-settings.c -M src/replication/replicator/replicator-settings.c -M src/stats/stats-settings.c -M src/submission-login/submission-login-settings.c -M src/submission/submission-settings.c - -2021-04-01 21:37:27 +0300 Timo Sirainen (4e5bb6738d) - - lib: buffer - Change real_buffer.r_buffer type to const void * - - -M src/lib/buffer.c - -2021-04-01 12:47:15 +0300 Timo Sirainen (831c95f67d) - - imap: Fix accessing uninitialized variable warning with LTO - - There doesn't seem to be any other way to quiet this warning, although it's - wrong. - -M src/imap/imap-master-client.c - -2021-04-01 12:45:39 +0300 Timo Sirainen (21bb5d5224) - - doveadm dict: Handle missing parameters without crashing - - -M src/doveadm/doveadm-dict.c - -2021-04-01 12:20:46 +0300 Timo Sirainen (7831a1f082) - - global: Fix accessing uninitialized variables on unit test failures - - -M src/lib-index/test-mail-index-modseq.c -M src/lib/test-strnum.c -M src/lib/test-time-util.c - -2021-04-01 12:33:33 +0300 Timo Sirainen (7da0d129c5) - - lib-imap: imap_envelope_parse() - Refactor to avoid LTO warnings - - The original code was correct, but gcc with LTO still gave warnings about - potentially uninitialized envlp_r and error_r. - -M src/lib-imap/imap-envelope.c - -2021-04-01 12:22:37 +0300 Timo Sirainen (a879354bbf) - - lib: test-array - Fix LTO compiler warnings - - -flto correctly realizes that the source buffer size is 1, while memcpy() is - trying to copy UINT_MAX. Try to hide this by allocating the source buffer - dynamically. The intention is to assert-crash anyway before the memcpy() is - reached. - -M src/lib/test-array.c - -2021-04-13 12:45:45 +0300 Aki Tuomi (7473d1c11e) - - lib-compression: ostream-zstd - Do not return 0 as default - - This is accepted by the library but does complicate things with dovecot. - -M src/lib-compression/ostream-zstd.c - -2021-04-13 12:45:23 +0300 Aki Tuomi (3fd17f53c9) - - lib-compression: ostream-zstd - Fix assert on value range - - -M src/lib-compression/ostream-zstd.c - -2021-04-10 13:52:15 +0200 Arjen de Korte (397ca180b8) - - doc/openssl.cnf: Increase default_bits to 2048 - - NIST guidelines mandate that all SSL certificates must be of at least 2048 - key length - -M doc/dovecot-openssl.cnf - -2021-03-26 14:10:37 +0200 Aki Tuomi (096b7122b9) - - global: Update default TLS protocol to TLSv1.2 - - -M doc/example-config/conf.d/10-ssl.conf -M src/lib-master/master-service-ssl-settings.c -M src/lib-storage/mail-storage-settings.c - -2021-04-06 15:42:22 +0300 Aki Tuomi (9301b1042b) - - lib-ssl-iostream: Accept TLS version case-insensitive - - -M src/lib-ssl-iostream/iostream-openssl-common.c - -2021-03-26 14:11:48 +0200 Aki Tuomi (585e09f4d7) - - lib-ssl-iostream: Add additional supported protocols - - ANY - Any protocol version accepted TLSv1.3 - Self-explanatory LATEST - The - newest protocol only - -M src/lib-ssl-iostream/iostream-openssl-common.c - -2021-03-26 12:08:40 +0200 Aki Tuomi (57aa5d271f) - - lib-master: Add ssl_cipher_suites - - -M src/lib-master/master-service-ssl-settings.c -M src/lib-master/master-service-ssl-settings.h -M src/lib-storage/mail-storage-settings.c -M src/lib-storage/mail-storage-settings.h - -2021-04-01 12:41:40 +0300 Aki Tuomi (4b8d368a91) - - imap-zlib: Support per-algorithm compression level - - -M src/config/old-set-parser.c -M src/plugins/imap-zlib/imap-zlib-plugin.c - -2021-03-30 19:05:42 +0300 Aki Tuomi (46eb5a53d1) - - zlib: Check that compression level is within supported range - - -M src/plugins/zlib/zlib-plugin.c - -2021-03-30 19:04:31 +0300 Aki Tuomi (d4d2eec8a4) - - imap-zlib: Check that compression level is within supported range - - -M src/plugins/imap-zlib/imap-zlib-plugin.c - -2021-03-30 19:03:30 +0300 Aki Tuomi (9b420dde6e) - - fs-compress: Check that compression range is within supported range - - -M src/plugins/fs-compress/fs-compress.c - -2021-04-01 09:26:10 +0300 Aki Tuomi (97628ea00b) - - lib-compression: Implement min/default/max getters - - -M src/lib-compression/compression.c -M src/lib-compression/ostream-bzlib.c -M src/lib-compression/ostream-lz4.c -M src/lib-compression/ostream-zlib.c -M src/lib-compression/ostream-zlib.h -M src/lib-compression/ostream-zstd.c - -2021-03-30 19:01:20 +0300 Aki Tuomi (250a7ea9db) - - lib-compression: Add compression level range to handlers - - -M src/lib-compression/compression.h - -2021-03-30 18:54:42 +0300 Aki Tuomi (fa63cbcd70) - - lib-compression: Use designated initializers for compression handlers - - -M src/lib-compression/compression.c - -2021-04-01 09:51:09 +0300 Aki Tuomi (ca81d36252) - - m4: want_zstd.m4 - Detect is ZSTD_minCLevel is present - - -M m4/want_zstd.m4 - -2021-02-05 14:48:52 -0500 Josef 'Jeff' Sipek (0a81b9bccb) - - lib-compression: Be explicit about xz magic number including a \0 - - -M src/lib-compression/compression.c - -2021-04-09 01:49:21 +0200 Stephan Bosch (4e55a32d71) - - lib-smtp: test-smtp-server-errors - Add actual HELO tests to "bad HELO" - test. - - Before, it only tested the EHLO command. - -M src/lib-smtp/test-smtp-server-errors.c - -2021-04-09 01:43:38 +0200 Stephan Bosch (642ecfa43e) - - lib-smtp: test-smtp-server-errors - Add correct command test to "bad HELO" - test. - - -M src/lib-smtp/test-smtp-server-errors.c - -2021-04-09 01:25:59 +0200 Stephan Bosch (b3a21d8622) - - lib-smtp: test-smtp-server-errors - Properly check server reply in "bad - HELO" test. - - -M src/lib-smtp/test-smtp-server-errors.c - -2021-04-09 01:29:06 +0200 Stephan Bosch (f97765d1b7) - - lib-smtp: test-smtp-server-errors - Rename "bad EHLO" test to "bad HELO". - - -M src/lib-smtp/test-smtp-server-errors.c - -2020-09-11 21:08:03 +0200 Stephan Bosch (896f120709) - - lib-smtp: smtp-server-cmd-helo - Fix panic occurring for default HELO reply. - - This only fails for the HELO command; the EHLO command is unaffected. The - default reply routine is not actually used at the moment, but it is used by - the fuzzer. - - Panic was: - - Panic: file smtp-server-cmd-helo.c: line 160 - (smtp_server_cmd_ehlo_reply_create): assertion failed: (cmd->cmd->reg->func - == smtp_server_cmd_ehlo) - -M src/lib-smtp/smtp-server-cmd-helo.c - -2020-09-11 22:40:31 +0200 Stephan Bosch (0cf64cf8f1) - - lib-smtp: Reformat smtp-server-cmd-helo.c. - - -M src/lib-smtp/smtp-server-cmd-helo.c - -2021-03-23 10:27:23 +0100 Stephan Bosch (905668e0ac) - - lib-smtp: smtp-server-cmd-data - Fix crash occurring when BDAT is the last - in a too long sequence of bad commands. - - When smtp_server_reply() detects that too many replies were sent regarding - syntax errors, it will terminate the connection. Most commands will just - stop processing and exit when a reply is submitted, so no crash occurs for - those. However, BDAT will try to skip the data block, so that it will not be - interpreted as a large set of input commands, which subsequentely crashes - because the command parser is already gone after terminating the connection. - -M src/lib-smtp/smtp-server-cmd-data.c - -2021-03-25 10:59:19 +0200 Timo Sirainen (444b4afdf0) - - push-notification: Fix logging initialization error - - -M src/plugins/push-notification/push-notification-drivers.c - -2021-03-24 09:43:17 +0100 Markus Valentin (81ec456313) - - imapc: imapc_list_get_fs() - Set index_pvt_dir for mailbox_list_settings - - To allow using private indexes with imapc storage the index_pvt_dir must be - set when listing the mailbox. Previously this did not happen because the - index_pvt_dir was simply NULL, now the value is copied from the - imapc_mailbox_list. - -M src/lib-storage/index/imapc/imapc-list.c - -2021-03-30 16:50:13 +0300 Timo Sirainen (57069b23e6) - - lib-index: Avoid accessing already freed "reason" when purging - - Broken by 4b60d609c05d334d29a72c6dbbe301a66f518089 - -M src/lib-index/mail-cache-purge.c - -2021-03-30 11:00:57 +0100 Siavash Tavakoli (a64539fba0) - - lib-ssl-iostream: Avoid calling X509_check_ip_asc if malformed input was - used - - Try to match certificate using "X509_check_ip_asc" only when - "X509_check_host" didn't report an internal error or malformed input. - -M src/lib-ssl-iostream/iostream-openssl-common.c - -2021-03-24 11:01:34 -0400 Josef 'Jeff' Sipek (4ccc5f9571) - - lib-lua: Document the DLUA_WRAP_C_DATA macro - - -M src/lib-lua/dlua-wrapper.h - -2020-08-13 20:01:41 +0300 Aki Tuomi (18cf172fc0) - - oauth2-jwt: Use int64_t instead time_t for portability - - -M src/lib-oauth2/oauth2-jwt.c - -2021-03-21 22:15:48 +0000 Siavash Tavakoli (af41ad228f) - - lib-ssl-iostream: Use OpenSSL's X509_check_host and X509_check_ip_asc if - available - - Make use of "X509_check_host()" and "X509_check_ip_asc()" if OpenSSL version - used has support for these functions. Revert back to previous custom - implementation in case either is not available. - - Hosts are checked with partial wildcards (e.g. foo*.example.com) disabled. - If host name check fails, check against IP addresses in the certificate. - -M src/lib-ssl-iostream/iostream-openssl-common.c - -2021-03-21 22:14:55 +0000 Siavash Tavakoli (202a65fb59) - - m4: Add HAVE_X509_CHECK_HOST, HAVE_X509_CHECK_IP, and HAVE_X509_CHECK_IP_ASC - - Defined when compiling against an OpenSSL version supporting - "X509_check_host", - "X509_check_ip()", and "X509_check_ip_asc()" respectively. - -M m4/ssl.m4 - -2021-03-18 12:20:35 +0000 Siavash Tavakoli (8d84e36e31) - - lib-ssl-iostream: Ignore case when checking certificate name - - Host name case must be ignored when cheking with certificate. - -M src/lib-ssl-iostream/iostream-openssl-common.c - -2021-03-22 13:00:31 +0200 Timo Sirainen (ca86ef368a) - - lib: ioloop - Remove unused timer_is_larger() macro - - -M src/lib/ioloop.c - -2021-03-01 12:56:21 +0200 Timo Sirainen (d92eb240cd) - - lib: test-ioloop - Make sure recreating 0-timeout in callback works - - -M src/lib/ioloop.c -M src/lib/test-ioloop.c - -2021-03-01 13:03:16 +0200 Timo Sirainen (fac27f192d) - - lib: ioloop - Fix 0 ms timeouts to trigger without waiting 2ms between calls - - -M src/lib/ioloop.c -M src/lib/test-ioloop.c - -2021-03-01 13:02:40 +0200 Timo Sirainen (adad8ad7fc) - - lib-test: test_assert_ucmp() - Fix typo to make it compile - - -M src/lib-test/test-common.h - -2021-03-22 13:04:15 +0100 Markus Valentin (1fc91d56d4) - - lib-compression: Get error with i_stream_get_error() so it's recursive - - In some cases the iostream.error was NULL so the errno default message was - used. This fixes an regression introduced by 8b6142f9ba9. - -M src/lib-compression/istream-decompress.c - -2021-03-23 09:02:06 +0200 Aki Tuomi (b72e08e519) - - lib-dict: dict-lua - Do not free pool after iteration finishes - - Otherwise we get double-free from gc. - - Broken in 1e67b93cc9f469bb144fc890a6cb9b9b9cd20811 - -M src/lib-dict/dict-iter-lua.c - -2021-03-23 12:32:13 +0200 Timo Sirainen (9c58ce8e50) - - man: doveconf - Fix -P/ typo to just -P - - -M doc/man/doveconf.1.in - -2021-03-23 12:31:46 +0200 Timo Sirainen (c4d7aea669) - - man: doveconf - Document -s parameter - - -M doc/man/doveconf.1.in - -2021-01-27 20:26:26 +0200 Timo Sirainen (e453a424d9) - - doveadm zlibconnect: Support multiple compression algorithms - - Unfortunately they don't work very well, because only the deflate ostream - supports flushing ostream before closing it. - -M src/doveadm/doveadm-zlib.c - -2021-01-27 19:50:38 +0200 Timo Sirainen (0871db37b3) - - doveadm zlibconnect: Support automatically starting compression on COMPRESS - command - - The previous method of using ctrl-d wasn't really suitable for scripting. - -M src/doveadm/doveadm-zlib.c - -2021-01-27 20:29:11 +0200 Timo Sirainen (9a1eba3f41) - - lib-compression: Fix potential hangs with non-blocking istreams - - -M src/lib-compression/istream-lz4.c -M src/lib-compression/istream-lzma.c -M src/lib-compression/istream-zlib.c -M src/lib-compression/istream-zstd.c - -2021-01-27 20:34:29 +0200 Timo Sirainen (14ab7acd03) - - lib: i_stream_read() - Fix assert with DEBUG enabled - - It doesn't matter if the data buffer changes for <=0 return value if the - buffer was previously empty. - -M src/lib/istream.c - -2021-02-04 02:15:22 +0200 Timo Sirainen (e6d8ac87a2) - - lib-storage: mailbox_list_init_fs() - Add event_parent - - -M src/lib-storage/index/dbox-common/dbox-storage.c -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-list.h - -2021-02-04 02:00:28 +0200 Timo Sirainen (040ec09363) - - lib-storage: Rename mail_storage_service_input.parent_event to event_parent - - This makes it more consistent with other settings. - -M src/imap/main.c -M src/lda/main.c -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage-service.h -M src/lmtp/lmtp-local.c -M src/plugins/quota/quota-status.c - -2021-02-04 01:58:25 +0200 Timo Sirainen (dd0049bf67) - - lib-fs: Rename fs_settings.event to event_parent - - This makes it more consistent with other settings. - -M src/lib-fs/fs-api.c -M src/lib-fs/fs-api.h -M src/lib-fs/fs-dict.c -M src/lib-storage/mail-user.c - -2021-02-04 01:36:52 +0200 Timo Sirainen (84da97fd4e) - - lib-dict: Set connections' event_parent correctly - - dict->dict.event is NULL at this point. - -M src/lib-dict/dict-client.c -M src/lib-dict/dict-memcached-ascii.c -M src/lib-dict/dict-memcached.c - -2021-02-04 01:27:34 +0200 Timo Sirainen (afbc5c30e4) - - auth: db-sql - Fill sql_settings.event_parent - - -M src/auth/db-sql.c - -2021-02-04 01:16:12 +0200 Timo Sirainen (ef3f457051) - - global: Set http_client_settings.event_parent when possible - - -M src/auth/db-oauth2.c -M src/plugins/fts-solr/solr-connection.c -M src/plugins/fts/fts-parser-tika.c - -2021-02-04 01:13:40 +0200 Timo Sirainen (0b1beeccb0) - - fts-solr: solr-connection - Add parent event - - -M src/plugins/fts-solr/fts-backend-solr-old.c -M src/plugins/fts-solr/fts-backend-solr.c -M src/plugins/fts-solr/solr-connection.c -M src/plugins/fts-solr/solr-connection.h - -2021-02-04 01:10:57 +0200 Timo Sirainen (91be621311) - - global: Set dns_lookup_settings.event_parent - - -M src/auth/auth-request.c -M src/lib-http/http-client-host.c -M src/lib-imap-client/imapc-connection.c -M src/lib-program-client/program-client-remote.c -M src/lib-smtp/smtp-client-connection.c -M src/lib-storage/index/pop3c/pop3c-client.c - -2021-02-04 01:09:57 +0200 Timo Sirainen (27c92f1d02) - - imapc: Add parent event - - -M src/auth/passdb-imap.c -M src/lib-imap-client/imapc-client-private.h -M src/lib-imap-client/imapc-client.c -M src/lib-imap-client/imapc-client.h -M src/lib-imap-client/test-imapc-client.c -M src/lib-storage/index/imapc/imapc-storage.c - -2021-02-04 01:07:38 +0200 Timo Sirainen (132e9b08d6) - - pop3c: Add parent event - - -M src/lib-storage/index/pop3c/pop3c-client.c -M src/lib-storage/index/pop3c/pop3c-client.h -M src/lib-storage/index/pop3c/pop3c-storage.c - -2021-02-04 01:01:42 +0200 Timo Sirainen (3d7cd9a60e) - - global: Set dict_settings.event_parent when possible - - -M src/auth/db-dict.c -M src/auth/db-oauth2.c -M src/lib-fs/fs-dict.c -M src/lib-storage/index/index-attribute.c -M src/plugins/acl/acl-lookup-dict.c -M src/plugins/last-login/last-login-plugin.c -M src/plugins/notify-status/notify-status-plugin.c -M src/plugins/quota-clone/quota-clone-plugin.c -M src/plugins/quota/quota-dict.c -M src/plugins/quota/quota.c - -2021-03-22 16:24:20 +0200 Aki Tuomi (26bfe7b6a7) - - lib-lua: dlua-threads - pop thread table after manipulation - - Forgot on a84bfdaf6df8fd6a4cbbf0845c18b09e6ceada36 - -M src/lib-lua/dlua-thread.c - -2021-02-22 15:29:45 +0200 Aki Tuomi (80156c4f7b) - - auth: Fix Makefile variables for Lua - - Otherwise automake complains about touching the variables in many places. - -M src/auth/Makefile.am - -2021-02-05 15:40:49 +0200 Aki Tuomi (8276f856d6) - - dovecot-config: Include used Lua details - - -M Makefile.am -M configure.ac -M dovecot-config.in.in -M m4/dovecot.m4 - -2021-02-05 15:21:46 +0200 Aki Tuomi (20660943f8) - - push-notification-driver-lua: Use dlua_pcall - - -M src/plugins/push-notification/push-notification-driver-lua.c - -2021-02-05 15:17:44 +0200 Aki Tuomi (96bd734b7a) - - mail-lua: Pop return values after use - - -M src/plugins/mail-lua/mail-lua-plugin.c - -2021-02-05 15:17:37 +0200 Aki Tuomi (bcf502353d) - - mail-lua: Use dlua_pcall - - -M src/plugins/mail-lua/mail-lua-plugin.c - -2021-02-05 15:13:26 +0200 Aki Tuomi (1265f55524) - - auth: db-lua - Use dlua_pcall - - -M src/auth/db-lua.c - -2021-02-16 09:21:58 +0200 Aki Tuomi (fcf86bb7b2) - - lib-lua: Fix script loading - - Handle error cases correctly. - -M src/lib-lua/dlua-script.c - -2021-02-05 13:34:27 +0200 Aki Tuomi (fe1c3e670f) - - lib-lua: Use dlua_pcall - - -M src/lib-lua/dlua-script.c -M src/lib-lua/test-lua.c - -2021-02-05 13:33:47 +0200 Aki Tuomi (b78bc8f862) - - lib-lua: Add dlua_pcall - - -M src/lib-lua/dlua-script-private.h -M src/lib-lua/dlua-script.c - -2021-02-05 13:41:24 +0200 Aki Tuomi (95e6c3974e) - - lib-lua: dlua-dovecot - Ensure script is not NULL - - -M src/lib-lua/dlua-dovecot.c - -2021-02-16 12:47:17 +0200 Aki Tuomi (22d54c6e25) - - lib-lua: Define LUA_OK if missing - - It's defined since lua 5.2, and we support lua 5.1. - -M src/lib-lua/dlua-compat.h - -2021-02-19 15:20:07 +0200 Aki Tuomi (5c3ec087bf) - - lib-lua: Reformat macros in dlua-script-private.h - - -M src/lib-lua/dlua-script-private.h - -2021-03-22 10:36:24 +0200 Aki Tuomi (12f0271e17) - - lib-lua: Add callback typecheck for dlua_pcall_yieldable - - -M src/lib-lua/dlua-resume.c -M src/lib-lua/dlua-script-private.h - -2021-02-25 10:22:28 -0500 Josef 'Jeff' Sipek (1e67b93cc9) - - lib-dict: Expose dict and dict transactions to lua scripts - - -M src/lib-dict/Makefile.am -A src/lib-dict/dict-iter-lua.c -A src/lib-dict/dict-lua-private.h -A src/lib-dict/dict-lua.c -A src/lib-dict/dict-lua.h -A src/lib-dict/dict-txn-lua.c -M src/lib-lua/Makefile.am - -2021-02-25 15:35:26 -0500 Josef 'Jeff' Sipek (77cb890b16) - - lib-lua: Implement lua_seti() fallback for pre-5.3 support - - -M m4/want_lua.m4 -M src/lib-lua/dlua-compat.c -M src/lib-lua/dlua-compat.h - -2021-02-25 10:22:24 -0500 Josef 'Jeff' Sipek (21a2bddaeb) - - lib-lua: Add DLUA_WRAP_C_DATA macro to more easily expose C structures to - lua - - -M src/lib-lua/Makefile.am -A src/lib-lua/dlua-wrapper.h - -2021-02-24 13:57:10 -0500 Josef 'Jeff' Sipek (1dab5661cf) - - lib-lua: Add dlua_pcall_yieldable - - -M configure.ac -M m4/want_lua.m4 -M src/lib-lua/Makefile.am -A src/lib-lua/dlua-resume.c -M src/lib-lua/dlua-script-private.h - -2021-02-25 15:49:18 -0500 Josef 'Jeff' Sipek (2c4ebe2cc7) - - m4: want_lua - Check for lua_{resume,yieldk} - - -M m4/want_lua.m4 - -2021-02-24 14:53:59 -0500 Josef 'Jeff' Sipek (c5478e9d2b) - - lib-lua: Add thread local storage API - - -M src/lib-lua/dlua-script-private.h -M src/lib-lua/dlua-thread.c -M src/lib-lua/test-lua.c - -2021-02-05 16:47:53 +0200 Aki Tuomi (a84bfdaf6d) - - lib-lua: Add new thread/close thread dlua wrappers - - Code rewritten to use lua registry, warn about unclosed threads, and moved - to a separate file by Josef 'Jeff' Sipek - -M src/lib-lua/Makefile.am -M src/lib-lua/dlua-script-private.h -M src/lib-lua/dlua-script.c -A src/lib-lua/dlua-thread.c - -2021-03-12 02:58:37 +0200 Timo Sirainen (b2948c33c6) - - global: Avoid casting away const - - -M src/auth/test-mech.c -M src/doveadm/doveadm-dump-log.c -M src/doveadm/dsync/dsync-ibc-pipe.c -M src/imap-hibernate/imap-hibernate-client.c -M src/imap/imap-master-client.c -M src/lib-http/http-response-parser.c -M src/lib-http/test-http-client.c -M src/lib-ldap/ldap-search.c -M src/lib-mail/test-message-address.c -M src/lib-smtp/smtp-parser.c -M src/lib-test/test-ostream.c -M src/lib/test-array.c -M src/lib/uri-util.c - -2021-03-12 14:53:38 +0200 Timo Sirainen (8c153a6417) - - lib: iostreams - Use container_of() - - -M src/lib/iostream-temp.c -M src/lib/istream-base64-decoder.c -M src/lib/istream-base64-encoder.c -M src/lib/istream-callback.c -M src/lib/istream-chain.c -M src/lib/istream-concat.c -M src/lib/istream-crlf.c -M src/lib/istream-failure-at.c -M src/lib/istream-file.c -M src/lib/istream-hash.c -M src/lib/istream-jsonstr.c -M src/lib/istream-limit.c -M src/lib/istream-multiplex.c -M src/lib/istream-rawlog.c -M src/lib/istream-seekable.c -M src/lib/istream-sized.c -M src/lib/istream-tee.c -M src/lib/istream-timeout.c -M src/lib/istream-try.c -M src/lib/istream-unix.c -M src/lib/istream.c -M src/lib/ostream-buffer.c -M src/lib/ostream-failure-at.c -M src/lib/ostream-file.c -M src/lib/ostream-hash.c -M src/lib/ostream-multiplex.c -M src/lib/ostream-rawlog.c -M src/lib/ostream-unix.c -M src/lib/ostream-wrapper.c -M src/lib/ostream.c - -2021-03-12 02:56:20 +0200 Timo Sirainen (2ca94e7ac9) - - lib: stats_dist_get_median(), stats_dist_get_percentile() - Remove const - parameter - - They weren't really const, because they required modifying the stats to sort - them. - -M src/lib/stats-dist.c -M src/lib/stats-dist.h -M src/lib/test-stats-dist.c - -2021-02-27 00:04:54 +0100 Stephan Bosch (52d11b4eaf) - - login-common: sasl-server - Remove data transfered to post-login service - from input stream. - - This prevents duplicating input when SSL is involved, causing commands - pipelined after authenticate commands from being duplicated. This issue - emerged when login proxy was changed to use the iostream pump/proxy. This - means that the proxy uses streams rather than raw FDs, which means that data - buffered in input stream before proxy is inherently forwarded to the - post-login service... a second time. - -M src/login-common/sasl-server.c - -2021-03-18 11:17:07 +0100 Timo Sirainen (cf768ecaf4) - - lib: test-cpu-limit - Test upper CPU limit only for user CPU, not for system - CPU - - The system CPU check kept randomly failing with larger and larger limits, so - there doesn't seem to be any point trying to test it at all. - -M src/lib/test-cpu-limit.c - -2021-03-12 02:26:32 +0200 Timo Sirainen (c6ad2aea84) - - lib-index: Fix crash when cache record size is larger than file size - - This shouldn't happen unless the dovecot.index.cache file was corrupted. - -M src/lib-index/mail-cache.c -M src/lib-index/test-mail-cache.c - -2020-08-08 12:11:54 +0300 Timo Sirainen (219c619d8f) - - lib-index: mail_cache_map() - Fix handling huge size values correctly - - offset+size could have wrapped in 32bit systems. - -M src/lib-index/mail-cache.c - -2021-03-15 12:53:19 +0200 Timo Sirainen (718e9c9fb1) - - auth: test-auth-cache - Fix auth_request_var_expand_static_tab[] - - Its size is explicitly set in .h file, so it should be in .c file as well. - -M src/auth/test-auth-cache.c - -2021-03-15 12:02:32 +0000 Siavash Tavakoli (f29449c5c4) - - auth: userdb-passwd: Close the password database in iteration deinit - - Otherwise, next "getpwent()" will continue to return next entries in passwd - database which results in unwanted skipping of entries. - -M src/auth/userdb-passwd.c - -2021-03-09 21:35:15 +0200 Timo Sirainen (3382a7c0f4) - - doveconf: Don't print an error if $rundir/dovecot.conf symlink doesn't exist - - -M src/config/doveconf.c - -2020-04-15 17:57:43 +0300 Timo Sirainen (37089190bc) - - lib-storage: Set mail_index_* and mail_cache_* settings hidden - - It's not recommended to change these settings outside testing. - -M src/lib-storage/mail-storage-settings.c - -2021-03-09 19:10:01 +0200 Timo Sirainen (df7fec2087) - - doveconf: Add -s parameter to show also hidden settings - - -M src/config/doveconf.c - -2020-04-15 17:50:42 +0300 Timo Sirainen (e4c710dd0a) - - doveconf: Don't show hidden settings unless they've been explicitly set - - -M src/config/config-request.c -M src/config/config-request.h -M src/config/doveconf.c - -2020-04-15 17:44:56 +0300 Timo Sirainen (a1339fbfe9) - - lib-settings: Add SET_FLAG_HIDDEN setting flag - - -M src/lib-settings/settings-parser.h - -2020-04-15 17:35:14 +0300 Timo Sirainen (0ce3e66e7b) - - global: Initialize struct setting_define fields with explicit names - - This allows changing the struct contents without breaking compiling. - -M src/auth/auth-settings.c -M src/dict/dict-settings.c -M src/doveadm/doveadm-settings.c -M src/imap/imap-settings.c -M src/lib-lda/lda-settings.c -M src/lib-settings/test-settings-parser.c -M src/lib-smtp/smtp-submit-settings.c -M src/lib-storage/mail-storage-settings.c -M src/master/master-settings.c -M src/plugins/mail-crypt/fs-crypt-settings.c -M src/pop3/pop3-settings.c -M src/stats/stats-settings.c - -2020-04-15 17:21:03 +0300 Timo Sirainen (44a37d2390) - - global: Use SETTING_DEFINE_STRUCT_*() macros when defining settings - - This adds type checking to them. - -M src/auth/auth-settings.c -M src/dict/dict-settings.c -M src/director/director-settings.c -M src/doveadm/doveadm-settings.c -M src/imap-login/imap-login-settings.c -M src/imap-urlauth/imap-urlauth-settings.c -M src/imap-urlauth/imap-urlauth-worker-settings.c -M src/imap/imap-settings.c -M src/lib-lda/lda-settings.c -M src/lib-master/master-service-settings.c -M src/lib-master/master-service-ssl-settings.c -M src/lib-master/test-master-service-settings-cache.c -M src/lib-smtp/smtp-submit-settings.c -M src/lib-storage/index/dbox-multi/mdbox-settings.c -M src/lib-storage/index/imapc/imapc-settings.c -M src/lib-storage/index/maildir/maildir-settings.c -M src/lib-storage/index/mbox/mbox-settings.c -M src/lib-storage/index/pop3c/pop3c-settings.c -M src/lib-storage/mail-storage-settings.c -M src/lmtp/lmtp-settings.c -M src/login-common/login-settings.c -M src/master/master-settings.c -M src/old-stats/stats-settings.c -M src/plugins/quota/quota-status-settings.c -M src/pop3/pop3-settings.c -M src/replication/aggregator/aggregator-settings.c -M src/replication/replicator/replicator-settings.c -M src/stats/stats-settings.c -M src/submission-login/submission-login-settings.c -M src/submission/submission-settings.c - -2020-04-15 17:20:20 +0300 Timo Sirainen (8d5c63c0e5) - - quota-status: Fix quota_status_settings.recipient_delimiter to be const - - -M src/plugins/quota/quota-status-settings.h - -2020-04-15 17:18:42 +0300 Timo Sirainen (f54fff4552) - - mail-crypt, master: Remove unused DEF & DEFLIST macros - - -M src/master/master-settings.c -M src/plugins/mail-crypt/fs-crypt-settings.c - -2020-04-15 16:53:26 +0300 Timo Sirainen (e6c5b2c0cb) - - lib-settings: Rewrite and add missing SETTING_DEFINE_STRUCT_* macros - - These hadn't been used anywhere. - -M src/config/test-config-parser.c -M src/lib-settings/settings-parser.h -M src/lib-settings/test-settings-parser.c - -2021-03-13 14:23:46 +0200 Timo Sirainen (6986a435e3) - - lib-smtp: fuzz-smtp-server - Fix compiling due to lib-smtp API change - - Forgotten from 2cdab962670df394c28fb7858cb0d4f90f70f71c - -M src/lib-smtp/fuzz-smtp-server.c - -2021-03-16 17:09:11 +0200 Timo Sirainen (e0d7153999) - - submission: Remove dead assignment - - -M src/submission/submission-client.c - -2020-01-15 20:22:00 +0200 Timo Sirainen (b099d5eac6) - - login-common: Fix client_destroy_oldest() return value to be more exact - - Only return TRUE if a client connection is immediately destroyed. - -M src/login-common/client-common.c - -2020-01-15 18:09:14 +0200 Timo Sirainen (56328e4da4) - - lib-master: Add a delay to calling avail_overflow_callback with - client_limit=1 - - Without the delay all (or many/most) processes will call the callback, - because the OS notifies all of the processes of the incoming connection. - This results in all of the connections being killed instead of only a few of - them. - -M src/lib-master/master-service-private.h -M src/lib-master/master-service.c - -2020-01-15 19:10:43 +0200 Timo Sirainen (3b43c181d8) - - lib-master: Change master_service_set_avail_overflow_callback() API - - Needed by the following changes. - -M src/lib-master/master-service-private.h -M src/lib-master/master-service.c -M src/lib-master/master-service.h -M src/login-common/client-common.c -M src/login-common/client-common.h - -2020-01-15 19:06:32 +0200 Timo Sirainen (10746c5b85) - - login-common: Change struct client.created to timeval - - -M src/login-common/client-common-auth.c -M src/login-common/client-common.c -M src/login-common/client-common.h - -2020-01-15 17:49:52 +0200 Timo Sirainen (d905a4e96d) - - lib-master: Code cleanup to refreshing login state - - Unexpected seek offsets are now handled better. - -M src/lib-master/master-service.c - -2020-01-15 16:30:34 +0200 Timo Sirainen (c39854c1fb) - - lib-master: Fix calling avail_overflow_callback with service_count=1 - - This is used by login processes to kill the oldest connection when all of - the clients and processes for the service are taken. This wasn't working - when service_count=1 because the listeners were closed already. - - It's not really useful anymore to even do this kind of a listener closing. - It was originally added in 9217d2426b4f8ece47441357f35d8bb34d97c4eb to - prevent restart problems with long-running login processes. However, - nowadays listeners can be closed via SIGQUIT so this isn't necessary. - -M src/lib-master/master-service.c - -2021-02-26 12:28:03 +0000 Siavash Tavakoli (5dd81d83d8) - - lib-storage: Correct escaping for list index lookups - - - Escape storage name when listing mailbox from index and unescape mailbox - name when looking for sibling nodes. - - Unescape when adding node to list index. - - List index iteration is performed with storage name where separators must - be escaped with storage_name_escape_char. Index lookup is done with - storage_name which is escaped with storage_name_escape_char but node names - are unescaped. - -M src/lib-storage/list/mailbox-list-index-iter.c -M src/lib-storage/list/mailbox-list-index-sync.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-index.h - -2021-02-22 15:37:19 +0000 Siavash Tavakoli (1feae5169f) - - lib-storage: Expose mailbox_list_name_{escape,unescape} functions in header - - To be used in mailbox-list-index. - -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-list.h - -2021-03-11 17:55:08 +0000 Siavash Tavakoli (b603f3284e) - - lib-storage: test-mail-storage: Separate test cases for "LAYOUT=INDEX" - - With default escaping for "INDEX" layout, more mailbox name are accepted. - -M src/lib-storage/test-mail-storage.c - -2021-02-22 15:29:30 +0000 Siavash Tavakoli (d4e4892461) - - lib-storage: mailbox-list: Add default storage name escaping for index - layout - - Add a default value for "storage_name_escape_char" when "LAYOUT=index". - Needed for situations where mailbox name contains separator char (e.g. after - migration to new separator) and listescape plugin is not active. - -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/mailbox-list.c - -2021-02-26 16:03:50 +0000 Siavash Tavakoli (2f2e20739a) - - lib-storage: Rename mailbox_list_index_node.name to raw_name - - To make it clear that the string is unescaped raw value, rename from generic - "name" to "raw_name". - -M src/lib-storage/list/mailbox-list-index-iter.c -M src/lib-storage/list/mailbox-list-index-sync.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-index.h -M src/lib-storage/list/mailbox-list-notify-tree.c - -2021-03-11 12:31:52 +0000 Siavash Tavakoli (42ae314198) - - lib-storage: Add mailbox list index alt separator - - To avoid collision with storage name escape character, use an alternative - char ('^') if hierarchy separator for list index is the same char. - -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/list/mailbox-list-index.h - -2021-03-16 14:37:54 +0200 Timo Sirainen (e1dd685f1a) - - login-common: Finish freeing the client when anvil lookup is pending at - destroy - - Broken by f32daf5ac9eaa886e28659965fc0156b52b60bda - -M src/login-common/client-common.c -M src/login-common/sasl-server.c - -2021-03-16 14:37:38 +0200 Timo Sirainen (be3cd60a1b) - - login-common: Assert-crash at deinit if there are still referenced clients - - -M src/login-common/client-common.c - -2021-03-16 14:36:35 +0200 Timo Sirainen (1c622cdbe0) - - login-common: Track referenced but destroyed clients in a linked list - - This helps debugging. - -M src/login-common/client-common.c - -2021-03-11 13:00:56 +0200 Timo Sirainen (0e0519cd25) - - lib: test-cpu-limit - Increase ALLOW_MSECS_ABOVE further - - 1500 was still not enough to prevent random failures. - -M src/lib/test-cpu-limit.c - -2021-03-15 18:18:07 +0200 Timo Sirainen (2133e37cfc) - - lib: cpu-limit - Redesign the API - - The new API no longer has a signal callback, just a cpu_limit_exceeded() - function that needs to be periodically called to check if the limit has - exceeded. The callback could be added back if really necessary, but it's - just too easy to use signal handlers unsafely. - - The new API also supports separating limits for user and system CPU usage. - It also attempts to guard against any unexpected kernel behavior resulting - from unclear behavior on how exactly the getrlimit(), setrlimit() and XCPU - signals interact. - -M src/lib/cpu-limit.c -M src/lib/cpu-limit.h -M src/lib/test-cpu-limit.c - -2021-03-15 17:22:00 +0200 Timo Sirainen (db70cd7091) - - lib: cpu-limit - Split off cpu_limit_get_usage_msecs_with() - - -M src/lib/cpu-limit.c - -2021-03-15 17:21:03 +0200 Timo Sirainen (e83d620cb6) - - lib: cpu-limit - Move cpu_limit_get_usage_msecs() - - -M src/lib/cpu-limit.c - -2021-03-15 16:50:25 +0200 Timo Sirainen (66fb224ce9) - - lib: cpu-limit - Update comments related to nesting - - -M src/lib/cpu-limit.h - -2021-03-15 15:42:56 +0200 Timo Sirainen (337e29dee5) - - lib: cpu_limit_get_usage_[m]secs() - Add type parameter - - It can now return user CPU, system CPU or both usages. - -M src/lib/cpu-limit.c -M src/lib/cpu-limit.h - -2021-03-15 15:37:55 +0200 Timo Sirainen (fde5380485) - - lib: cpu-time - Use the original struct rusage as the initial_usage - - This will allow separation of user and system CPU usage tracking. They could - have been tracked with two separate struct timevals, but the extra memory - usage is small and it might be nice to have all the available data for - debugging. - -M src/lib/cpu-limit.c - -2021-03-15 18:00:55 +0200 Timo Sirainen (387bbf0bae) - - lib: test-cpu-limit - Fix nested limit asserts - - -M src/lib/test-cpu-limit.c - -2021-03-10 17:56:12 +0200 Timo Sirainen (586cca5769) - - lib-imap: Handle empty lists in IMAP BODYSTRUCTURE parsing as invalid - - They should be NIL instead of () if they're empty. - -M src/lib-imap/imap-bodystructure.c -M src/lib-imap/test-imap-bodystructure.c - -2021-03-10 17:40:47 +0200 Timo Sirainen (dd51ae09a8) - - lib-imap: Fix assert-crash if parsing invalid BODYSTRUCTURE with empty - Content-Language list - - If there's no Content-Language, it should be NIL in the bodystructure. So if - the value is (), it is invalid. - - This could in theory have happened when parsing corrupted - dovecot.index.cache or receiving it from a broken remote IMAP server with - imapc. The bug was found by fuzzing though. - - Fixes: Panic: file imap-bodystructure.c: line 98 - (part_write_bodystructure_common): assertion failed: (*lang != NULL) - -M src/lib-imap/imap-bodystructure.c -M src/lib-imap/test-imap-bodystructure.c - -2021-03-10 17:39:48 +0200 Timo Sirainen (2e5ef7cd2c) - - lib-imap: test-imap-bodystructure - imap_bodystructure_parse() - Test - returned error - - -M src/lib-imap/test-imap-bodystructure.c - -2021-03-11 13:13:24 -0500 Josef 'Jeff' Sipek (6960b0130c) - - lib-lua: Error out the build if using Lua 5.2 - - -M src/lib-lua/dlua-compat.c - -2021-03-11 13:13:03 -0500 Josef 'Jeff' Sipek (508a7f7566) - - Global: Remove support for Lua 5.2 - - It took far too much effort to keep compatible with it. Since every distro - out there provides either Lua 5.1 or 5.3, it makes sense to give up on 5.2. - -M m4/want_lua.m4 -M src/lib-lua/test-lua.c - -2021-03-09 10:53:50 -0500 Josef 'Jeff' Sipek (62a94d2270) - - m4: Allow explict override of lua version - - It is possible that the system has several different versions of Lua - installed. This change allows one to force a specific version of Lua during - ./configure. For example: - - LUA_CFLAGS="`pkg-config lua51 --cflags`" \ - LUA_LIBS="`pkg-config lua51 --libs`" \ - ./configure \ - --with-lua - -M m4/want_lua.m4 - -2021-03-09 18:40:32 +0200 Timo Sirainen (37fa8a945b) - - lib-storage: Preserve last-rename-stamp when rebuilding index - - -M src/lib-storage/index/index-rebuild.c - -2021-03-09 18:42:38 +0200 Timo Sirainen (4484e357fe) - - lib-storage: Don't trust last-rename-stamp that is too far into the future - - If the timestamp is in the future, autoexpunging stops working until the - future time is passed. If this happened due to corruption, it could take a - long time before the timestamp is reached. - -M src/lib-storage/mail-autoexpunge.c - -2021-03-09 18:37:51 +0200 Timo Sirainen (e773308cb1) - - lib-storage: Preserve hdr-pop3-uidl when rebuilding index - - This prevents potentially expensive metadata lookups afterwards when trying - to find out which mails have the POP3 UIDLs in their metadata. - -M src/lib-storage/index/index-rebuild.c - -2021-03-09 18:36:35 +0200 Timo Sirainen (54eb5a9661) - - lib-storage: Convert index_rebuild_box_name_header() into generic - index_rebuild_box_preserve_header() - - -M src/lib-storage/index/index-rebuild.c - -2020-05-11 17:41:24 +0300 Timo Sirainen (2c9d83a640) - - doveadm dump: Support hdr-pop3-uidl index header extension - - -M src/doveadm/doveadm-dump-index.c - -2020-05-11 17:40:29 +0300 Timo Sirainen (f879618dd8) - - doveadm dump: Include mail-storage-private.h to get easier access to some - structs - - Avoids having to duplicate the structs. - -M src/doveadm/doveadm-dump-index.c - -2021-03-10 22:08:24 +0200 Timo Sirainen (b0f498b692) - - auth: userdb_parse_[ug]id() - Fix error logging to use events properly - - If request is missing, use the global auth_event instead of hiding the - error. - -M src/auth/userdb.c - -2019-10-31 16:39:26 +0200 Timo Sirainen (fdc10a6c9c) - - auth: Use auth_request.event for logging whenever possible - - -M src/auth/auth-cache.c -M src/auth/auth-penalty.c -M src/auth/auth-request.c -M src/auth/db-checkpassword.c -M src/auth/mech-winbind.c -M src/auth/userdb-blocking.c -M src/auth/userdb-ldap.c -M src/auth/userdb-passwd.c -M src/auth/userdb.c - -2019-10-31 16:31:55 +0200 Timo Sirainen (66ddc39ad7) - - auth: auth-client-connection: Log all errors via events - - -M src/auth/auth-client-connection.c - -2019-10-31 16:29:22 +0200 Timo Sirainen (19a40f34d7) - - auth: auth-worker-server: Log errors via events - - -M src/auth/auth-worker-server.c - -2019-10-31 16:21:15 +0200 Timo Sirainen (0e06d67755) - - auth: auth-request-handler: Log errors via events - - -M src/auth/auth-request-handler.c - -2019-10-31 16:18:15 +0200 Timo Sirainen (5cd4850716) - - auth: authdb_event() - Use const pointer - - -M src/auth/auth-request.h - -2019-10-31 16:14:09 +0200 Timo Sirainen (6e004bf327) - - auth: Replace auth_master_log_error() with e_error() - - -M src/auth/auth-master-connection.c -M src/auth/auth-master-connection.h -M src/auth/auth-request-handler.c - -2019-10-31 16:21:35 +0200 Timo Sirainen (fc151df907) - - auth: auth-worker-client: Log errors via events - - -M src/auth/auth-worker-client.c - -2019-10-31 15:36:02 +0200 Timo Sirainen (82918227d8) - - auth: auth-worker-client: Fix setting process title to [idling] - - The existing code was completely wrong. It was set only when LIST command - started running. For other commands it wasn't set at all. - -M src/auth/auth-worker-client.c - -2019-10-31 15:34:06 +0200 Timo Sirainen (543ef9a5cc) - - auth: auth-worker-client: Move common code to auth_worker_request_finished() - - -M src/auth/auth-worker-client.c - -2019-10-31 15:31:57 +0200 Timo Sirainen (09de553954) - - auth: auth-worker-client: Move auth_worker_request_finished*() - - -M src/auth/auth-worker-client.c - -2019-10-31 15:27:49 +0200 Timo Sirainen (8077977b38) - - auth: auth-worker-client: Set "error" for all auth worker request failures - - Previously the error was set only for protocol errors. Now it's set for - everything, including password mismatches. However, only the protocol errors - are logged with error level, others are debug level. - -M src/auth/auth-worker-client.c - -2019-10-31 15:23:01 +0200 Timo Sirainen (9e5c44af66) - - auth: auth-worker-client: Rename auth_worker_log_finished() to - auth_worker_request_finished() - - -M src/auth/auth-worker-client.c - -2019-10-31 14:48:11 +0200 Timo Sirainen (0fbd856f28) - - auth: userdb iteration - Use event based logging - - -M src/auth/userdb-dict.c -M src/auth/userdb-passwd-file.c -M src/auth/userdb-passwd.c -M src/auth/userdb-sql.c - -2019-10-31 14:41:56 +0200 Timo Sirainen (88d2e192fd) - - auth: db-passwd-file - Use event based logging - - -M src/auth/db-passwd-file.c -M src/auth/db-passwd-file.h - -2019-10-31 14:34:48 +0200 Timo Sirainen (76c5f00362) - - auth: db-ldap - Use event based logging - - -M src/auth/db-ldap.c -M src/auth/db-ldap.h - -2021-02-25 21:58:17 +0200 Timo Sirainen (f32daf5ac9) - - login-common: Fix assert-crash if client is destroyed during anvil lookup - - This could happen if the client gets disconnected due to - "Connection queue full". - - Fixes: Panic: file client-common.c: line 323 (client_destroy): assertion - failed: (!client->authenticating) - -M src/login-common/client-common.c -M src/login-common/client-common.h -M src/login-common/sasl-server.c - -2021-03-10 13:50:00 +0200 Timo Sirainen (3a6ec2997a) - - lib: event_logv() - Make sure errno is preserved - - It already should have been, but this change makes it clearer and more - future-safe. - -M src/lib/event-log.c -M src/lib/test-event-log.c - -2021-03-02 19:30:23 +0200 Timo Sirainen (e980325475) - - imap: Use internal error for logging FETCH failed disconnection message - - -M src/imap/cmd-fetch.c - -2021-03-02 18:58:54 +0200 Timo Sirainen (69069554be) - - submission-login: Fix logging "no auth attempts" at disconnection - - client.banner_sent wasn't set, which prevented this from being logged. - -M src/submission-login/client.c - -2021-03-02 17:51:54 +0200 Timo Sirainen (1f926dd5d0) - - lib-smtp: smtp_server_connection_ssl_init() - Don't start SSL handshake - - If SSL handshaking fails, it shouldn't be logged as an error similarly to - actual SSL initialization errors. - -M src/lib-smtp/smtp-server-connection.c - -2021-03-02 17:44:37 +0200 Timo Sirainen (eee5cd271a) - - lib-smtp: Remove smtp_server_connection.disconnect_reason - - This isn't used anywhere and its purpose is a bit unclear. - -M src/lib-smtp/smtp-server-connection.c -M src/lib-smtp/smtp-server-private.h - -2021-03-02 17:33:30 +0200 Timo Sirainen (7a91266647) - - imap-urlauth: Change event_category_urlauth to be static - - -M src/imap-urlauth/imap-urlauth-client.c - -2021-03-02 17:30:52 +0200 Timo Sirainen (de3d7f4d0e) - - imap-urlauth: Replace i_info() and i_error() calls with e_info() and - e_error() - - -M src/imap-urlauth/imap-urlauth-client.c -M src/imap-urlauth/imap-urlauth-login.c - -2021-03-02 17:26:50 +0200 Timo Sirainen (e069e121fa) - - imap-urlauth: Don't change log prefix just before disconnection line - - It shouldn't be necessary. (And if it was, it should be done in init.) - -M src/imap-urlauth/imap-urlauth-client.c - -2021-03-02 17:25:31 +0200 Timo Sirainen (33d03c7aa8) - - imap-urlauth: client_destroy() - Allow NULL reason only if client is - disconnected - - -M src/imap-urlauth/imap-urlauth-client.c - -2021-03-02 17:24:14 +0200 Timo Sirainen (9354759519) - - imap-urlauth: Remove duplicate "Disconnected: " prefix - - It's already logged by client_destroy() - -M src/imap-urlauth/imap-urlauth-login.c - -2021-03-02 17:19:13 +0200 Timo Sirainen (e0116a1bec) - - imap-urlauth: Add Username to log prefix - - -M src/imap-urlauth/imap-urlauth-client.c - -2021-03-02 17:15:45 +0200 Timo Sirainen (34543d8893) - - imap-urlauth: Fix event leak if worker can't be connected to - - -M src/imap-urlauth/imap-urlauth-client.c - -2021-03-02 15:15:09 +0200 Timo Sirainen (5e34090a35) - - lib-smtp: Standardize iostream error handling - - Use [io]_stream_get_disconnect_reason() for logging all errors. None of the - iostream errors are logged as error level anymore. This way for example TLS - connection problems caused by broken clients aren't logged as errors. - -M src/lib-smtp/smtp-command-parser.c -M src/lib-smtp/smtp-server-cmd-auth.c -M src/lib-smtp/smtp-server-cmd-data.c -M src/lib-smtp/smtp-server-connection.c - -2021-03-02 15:07:56 +0200 Timo Sirainen (a0a04a86fc) - - lib: Add o_stream_get_disconnect_reason() - - -M src/lib/ostream.c -M src/lib/ostream.h - -2021-03-02 15:06:50 +0200 Timo Sirainen (170505ce06) - - lib: Clarify i[o]_stream_get_disconnect_reason() comment - - -M src/lib/iostream.h -M src/lib/istream.h - -2021-03-02 14:51:48 +0200 Timo Sirainen (6ece37a1ca) - - lib-smtp: Remove EIO-specific error handling - - No such error should be seen by lib-smtp. - -M src/lib-smtp/smtp-command-parser.c - -2021-03-02 13:15:56 +0200 Timo Sirainen (206d350e75) - - submission: Standardize "Disconnected:" log line - - Remote IP is no longer logged. If it's wanted, it can be added to - mail_log_prefix just like with other protocols. - -M src/submission/submission-client.c - -2021-03-02 13:13:52 +0200 Timo Sirainen (6d5e9dc47c) - - lib-smtp: Standardize QUIT logging - - Similar to POP3, use "Logged out" or "Aborted login by logging out". - -M src/lib-smtp/smtp-server-command.c - -2021-03-01 16:47:54 +0200 Timo Sirainen (5fb3a030d7) - - pop3: Improve "inactivity" disconnection reason log messages - - -M src/pop3/pop3-client.c - -2021-03-01 16:46:16 +0200 Timo Sirainen (a5a8dad1f2) - - pop3: Add "Disconnected: " prefix to all disconnection log lines - - -M src/pop3/pop3-client.c - -2021-02-03 22:15:51 +0200 Timo Sirainen (7bce44b6af) - - login-common: Add and use client_destroy_iostream_error() - - This standardizes the disconnection log message. - -M src/login-common/client-common-auth.c -M src/login-common/client-common.c -M src/login-common/client-common.h - -2021-02-03 21:59:55 +0200 Timo Sirainen (de71b89e54) - - *-login: Replace "Aborted login" with "Disconnected: Aborted login by - logging out" - - -M src/imap-login/imap-login-client.c -M src/login-common/client-common.h -M src/pop3-login/client.c - -2021-02-03 21:58:15 +0200 Timo Sirainen (04440c6364) - - *-login: Add "Disconnected: " prefix to most disconnection log lines - - All except "Disconnected by proxy" disconnections. - -M src/imap-login/imap-login-client.c -M src/login-common/client-common.c -M src/login-common/client-common.h -M src/login-common/login-proxy.c -M src/login-common/main.c -M src/submission-login/client.c - -2021-02-03 21:18:41 +0200 Timo Sirainen (e72f10af89) - - imap-hibernate: Add "Disconnected: " prefix to all disconnection log lines - - -M src/imap-hibernate/imap-client.c - -2021-03-01 16:40:57 +0200 Timo Sirainen (28ac5a03c9) - - imap: Improve "inactivity" disconnection reason log messages - - -M src/imap/imap-client.c - -2021-02-03 21:13:13 +0200 Timo Sirainen (e81273bac4) - - imap: Improve client disconnection log line in APPEND - - -M src/imap/cmd-append.c - -2021-02-03 17:47:13 +0200 Timo Sirainen (7ca5d9e76d) - - imap: Add "Disconnected: " prefix to all disconnection log lines - - It's currently not very clear that all these different log lines are about - the disconnection event. - -M src/imap/imap-client.c - -2021-03-02 16:40:48 +0200 Timo Sirainen (e898f7bba9) - - lmtp: Simplify client_destroy() handling - - This is similar to the earlier submission commit. - -M src/lmtp/lmtp-client.c -M src/lmtp/lmtp-client.h - -2021-03-02 16:37:30 +0200 Timo Sirainen (578708f67d) - - lmtp: Simplify/clarify disconnection code flow - - This is similar to the earlier submission commit. - -M src/lmtp/lmtp-client.c -M src/lmtp/lmtp-client.h - -2021-03-02 16:09:38 +0200 Timo Sirainen (0244a63021) - - submission: Remove client.stats - - client.conn is no longer ever NULL, so this isn't needed. - -M src/submission/submission-client.c -M src/submission/submission-client.h - -2021-03-02 16:00:24 +0200 Timo Sirainen (d013b6fd8b) - - submission: Simplify client_destroy() handling - - Now it simply calls smtp_server_connection_terminate() and the conn_free() - callback does the actual destroying. - -M src/submission/submission-backend.c -M src/submission/submission-client.c -M src/submission/submission-client.h - -2021-03-02 15:46:11 +0200 Timo Sirainen (8d8676f61b) - - submission: Simplify/clarify disconnection code flow - - client_disconnect() is now removed. Instead, client_destroy() now calls - smtp_server_connection_terminate() directly to cause a disconnection and - smtp_server_callbacks.conn_disconnect() handles the disconnection directly. - This same behavior happened earlier also, but it wasn't as clear. - -M src/submission/submission-client.c -M src/submission/submission-client.h - -2021-03-02 15:41:15 +0200 Timo Sirainen (453fd9e00e) - - submission: Move client_connection_disconnect|free() - - -M src/submission/submission-client.c - -2021-03-05 17:03:11 +0200 Timo Sirainen (c05c419c69) - - lib-smtp, lmtp, submission: Move adding "(state=%s)" in disconnection reason - to lib-smtp - - The following changes will break this in submission and lmtp. The state will - be reset before conn_disconnect() is called, so they would always log - state=READY. - -M src/lib-smtp/smtp-server-connection.c -M src/lib-smtp/smtp-server.c -M src/lib-smtp/smtp-server.h -M src/lmtp/lmtp-client.c -M src/submission-login/client.c -M src/submission/submission-client.c - -2021-03-02 14:17:29 +0200 Timo Sirainen (691d92feb9) - - lib-smtp: Add "unfinished %s command" if client disconnected during command - processing - - This also removes the need for special code path to differentiate between - logging "Remote closed connection" and "Remote closed connection - unexpectedly". - -M src/lib-smtp/smtp-server-connection.c - -2021-03-02 15:23:46 +0200 Timo Sirainen (2cdab96267) - - lib-smtp: Rename conn_destroy() callback to conn_free() - - It's called when the final reference to connection is dropped, so this - describes it better. - -M src/lib-smtp/smtp-server-connection.c -M src/lib-smtp/smtp-server.h -M src/lib-smtp/test-smtp-payload.c -M src/lib-smtp/test-smtp-server-errors.c -M src/lmtp/lmtp-client.c -M src/submission-login/client.c -M src/submission/submission-client.c - -2021-03-02 10:57:08 +0000 Siavash Tavakoli (ae50fc29a4) - - indexer: Convert indexer-worker log info to event - - Emit an event named "indexer_worker_indexing_finished", with following extra - fields: - - message_count: Number of messages indexed - - first_uid: First uid of the message indexed - - last_uid: Last uid of the message indexed - - user_cpu_usecs: Total user mode cpu time spent on indexing - - On successful indexing and on MAIL_ERROR_NOTFOUND error event is emitted - with "e_debug()", in other error situations event is emitted with - "e_error()". - -M src/indexer/master-connection.c - -2021-03-04 23:26:52 +0000 Siavash Tavakoli (6b32c8b25a) - - lib: lib-event: Add event_enable_user_cpu_usecs - - - Add an internal rusage struct to events to keep track of resource usage. - - "event_enable_user_cpu_usecs()" enables "user_cpu_usecs" field for the - event - - If "user_cpu_usecs" field is enabled, user CPU time will be calculated at - the time of sending the event and will be added to event fields. - -M src/lib/lib-event-private.h -M src/lib/lib-event.c -M src/lib/lib-event.h - -2021-03-11 09:28:58 +0200 Aki Tuomi (b99dea5b81) - - m4: want_lua - Fix Lua function checks - - One has to use $LIBS variable to ensure libraries come after conftest.c in - configure. - - Broken in af819cd2f43b8896d949a33f8099234ac57df6e5 - -M m4/want_lua.m4 - -2021-03-03 17:08:07 -0500 Josef 'Jeff' Sipek (61789ad382) - - lib-lua: Add table get helpers - - -M src/lib-lua/Makefile.am -M src/lib-lua/dlua-compat.c -M src/lib-lua/dlua-script-private.h -A src/lib-lua/dlua-table.c -M src/lib-lua/test-lua.c - -2021-03-04 17:05:45 -0500 Josef 'Jeff' Sipek (ea26d657e0) - - lib-lua: Check for function presence instead of Lua version in compat code - - -M m4/want_lua.m4 -M src/lib-lua/dlua-compat.c -M src/lib-lua/dlua-compat.h - -2021-03-04 17:03:03 -0500 Josef 'Jeff' Sipek (991e3c8cec) - - lib-lua: Reorder compat luaL_{setfuncs,setmetatable} - - Switch their order to keep them alphabetical. This will make the header - changes in the next commit a little more consistent. - - Additionally, fix up the coding style. - -M src/lib-lua/dlua-compat.c - -2021-03-04 16:51:46 -0500 Josef 'Jeff' Sipek (2354db8607) - - lib-lua: Move compat macros and prototypes to dlua-compat.h - - Additionally, fix -Wstrict-bool issue in luaL_newmetatable() compatibility - wrapper. - -M src/lib-lua/dlua-compat.h -M src/lib-lua/dlua-script-private.h - -2021-03-04 16:38:50 -0500 Josef 'Jeff' Sipek (1bcc5f4a73) - - lib-lua: Remove unused compatibility macros - - These are never used since all supported Lua versions define - LUA_VERSION_NUM. - -M src/lib-lua/dlua-script-private.h - -2021-03-04 16:21:07 -0500 Josef 'Jeff' Sipek (32e963965c) - - lib-lua: Implement a Lua 5.1 & 5.2 compatibility wrapper for lua_isinteger - - -M src/lib-lua/dlua-compat.c -M src/lib-lua/dlua-compat.h -M src/lib-lua/test-lua.c - -2021-03-04 16:16:53 -0500 Josef 'Jeff' Sipek (af819cd2f4) - - m4: want_lua - Check for lua_isinteger - - -M m4/want_lua.m4 - -2021-03-04 15:35:37 -0500 Josef 'Jeff' Sipek (cdf6260258) - - lib-lua: Implement a Lua 5.1 compatibility wrapper for lua_tointegerx - - -M src/lib-lua/Makefile.am -M src/lib-lua/dlua-compat.c -A src/lib-lua/dlua-compat.h -M src/lib-lua/dlua-script-private.h -M src/lib-lua/test-lua.c - -2021-03-04 15:31:29 -0500 Josef 'Jeff' Sipek (f86a94015f) - - m4: want_lua - Check for lua_tointegerx - - -M m4/want_lua.m4 - -2021-02-12 13:11:53 +0100 Stephan Bosch (cd7e0ae51b) - - lib-smtp: test-smtp-client-errors - Amend early data reply test to verify - that connection is still viable. - - Some problems only surface when the connection is reused for the next - command. Before, the connection was terminated immediately after the - transaction, which hides such issues. - -M src/lib-smtp/test-smtp-client-errors.c - -2021-02-09 23:35:53 +0100 Stephan Bosch (e305a608bf) - - lib-smtp: smtp-client-connection - Hold reference to command that is sending - a stream. - - This fixes a panic: - - Panic: file smtp-client-command.c: line 715 - (smtp_client_command_do_send_more): assertion failed: (cmd->stream != NULL) - -M src/lib-smtp/smtp-client-command.c -M src/lib-smtp/smtp-client-connection.c - -2021-02-09 23:35:42 +0100 Stephan Bosch (4d03a50a50) - - lib-smtp: smtp-client-command - Make smtp_client_command_unref() return TRUE - when the object persists. - - -M src/lib-smtp/smtp-client-command.c -M src/lib-smtp/smtp-client-command.h - -2021-02-09 23:44:42 +0100 Stephan Bosch (09cd268754) - - lib-smtp: smtp-client-command - Make smtp_client_command_unref(NULL) a - no-op. - - -M src/lib-smtp/smtp-client-command.c - -2021-03-06 17:58:53 +0200 Timo Sirainen (63bebe6103) - - imap: Fix logging garbage if imap-hibernate sends invalid VERSION - - -M src/imap/imap-client-hibernate.c - -2021-03-05 15:26:24 +0200 Timo Sirainen (d386b616c0) - - lib-mail: mail-html2text - Fix character signedness type mismatch - - Fixes ubsan complaints: mail-html2text.c:186:12: runtime error: implicit - conversion from type 'unsigned char' of value 226 (8-bit, unsigned) to type - 'char' changed the value to -30 (8-bit, signed) - -M src/lib-mail/mail-html2text.c - -2021-03-05 12:44:42 +0200 Timo Sirainen (070f586350) - - fts-tika: Don't fail indexing if Tika returns 5xx error - - Broken by 8e1eaf849ce4668c0941338e3e3671db159da575, which changed 5xx to be - retried once before it was ignored. However, it accidentally changed the - second 5xx to return failure instead of being ignored. - -M src/plugins/fts/fts-build-mail.c - -2021-03-02 17:10:03 +0200 Timo Sirainen (52d3c54afd) - - pop3: Change IO context earlier while shutting down - - This didn't practically cause any issues currently, but the new behavior is - more correct and future-proof. - -M src/pop3/pop3-client.c - -2021-03-02 17:08:53 +0200 Timo Sirainen (055a98fa40) - - imap: Fix using mail_log_prefix is used when client disconnects during - server shutdown - - -M src/imap/imap-client.c -M src/imap/main.c - -2021-03-02 17:02:32 +0200 Timo Sirainen (5f948f4079) - - submission: Fix using mail_log_prefix when client is disconnected due to - server shutdown - - -M src/submission/submission-client.c - -2021-02-26 16:10:18 +0200 Timo Sirainen (47097c6d27) - - dict-sql: Add more comments - - -M src/lib-dict-backend/dict-sql.c - -2021-02-26 16:05:47 +0200 Timo Sirainen (27f28a1fde) - - dict-sql: Rename [extra_]values to pattern_values - - -M src/lib-dict-backend/dict-sql.c - -2021-02-26 16:03:35 +0200 Timo Sirainen (98dd0628a7) - - dict-sql: Rename dict_sql_map.max_field_count to max_pattern_fields_count - - -M src/lib-dict-backend/dict-sql-settings.c -M src/lib-dict-backend/dict-sql-settings.h -M src/lib-dict-backend/dict-sql.c - -2021-02-26 16:02:05 +0200 Timo Sirainen (94fbb67e34) - - dict-sql: Rename dict_sql_map.sql_fields to pattern_fields - - -M src/lib-dict-backend/dict-sql-settings.c -M src/lib-dict-backend/dict-sql-settings.h -M src/lib-dict-backend/dict-sql.c - -2021-02-26 15:40:41 +0200 Timo Sirainen (8abff720eb) - - dict-sql: Change char key1 to bool add_username - - -M src/lib-dict-backend/dict-sql.c - -2021-02-26 15:32:48 +0200 Timo Sirainen (00b313513f) - - dict-sql: Simplify sql_dict_maps_are_mergeable() and add comments - - -M src/lib-dict-backend/dict-sql.c - -2021-02-26 15:29:02 +0200 Timo Sirainen (70f6f640cc) - - lib: test-array - Use i_strcmp_p() instead of reimplementing it - - -M src/lib/test-array.c - -2021-02-26 15:02:02 +0200 Timo Sirainen (4810970ea6) - - dict-sql: Simplify set/inc flushing - - Especially the *_real() function names were confusing. - -M src/lib-dict-backend/dict-sql.c - -2021-02-25 17:54:26 +0200 Timo Sirainen (3b46f12e9b) - - dict-sql: Support merging multiple atomic_inc fields - - -M src/lib-dict-backend/dict-sql.c -M src/lib-dict-backend/test-dict-sql.c - -2021-02-25 17:40:22 +0200 Timo Sirainen (f6a4383d65) - - dict-sql: Support merging multiple set fields - - -M src/lib-dict-backend/dict-sql.c -M src/lib-dict-backend/dict.conf -M src/lib-dict-backend/test-dict-sql.c - -2021-02-25 17:19:49 +0200 Timo Sirainen (69a1c091d3) - - dict-sql: Keep trying to merge INSERT/UPDATE always to the previous key - - Previously if the first two couldn't be merged, it would flush both. Now it - flushes only the first and attempts to merge the 2nd and 3rd. - -M src/lib-dict-backend/dict-sql.c - -2021-02-25 17:10:01 +0200 Timo Sirainen (977346e1bf) - - dict-sql: Move prev_set_* and prev_inc_* to struct sql_dict_prev - - -M src/lib-dict-backend/dict-sql.c - -2021-02-25 15:50:45 +0200 Timo Sirainen (4d66f8f75b) - - lib-sql: driver-test - Use test_assert_strcmp() - - -M src/lib-sql/driver-test.c - -2021-02-25 15:49:47 +0200 Timo Sirainen (9a1ee0e316) - - lib-dict-backend: test-dict-sql - Use test_assert_strcmp*() - - -M src/lib-dict-backend/test-dict-sql.c - -2021-02-23 22:49:57 +0200 Timo Sirainen (6c92f46723) - - lib-fs: Add type safety to fs_file/iter_set_async_callback() callback - context - - -M src/lib-fs/fs-api.c -M src/lib-fs/fs-api.h -M src/lib-fs/fs-wrapper.c - -2021-02-23 11:11:47 +0200 Timo Sirainen (2a79971244) - - lib-dict, global: Add type safety to dict_transaction_commit_async() - callback context - - -M src/dict/dict-commands.c -M src/lib-dict/dict.c -M src/lib-dict/dict.h -M src/plugins/last-login/last-login-plugin.c -M src/plugins/quota-clone/quota-clone-plugin.c -M src/plugins/quota/quota-dict.c - -2021-02-23 11:16:50 +0200 Timo Sirainen (02c3916fa3) - - lib-dict, quota: Add and use dict_transaction_commit_async_nocallback() - - -M src/lib-dict/dict.c -M src/lib-dict/dict.h -M src/plugins/quota/quota-dict.c - -2021-02-23 11:09:36 +0200 Timo Sirainen (2397fa2a40) - - lib-dict, global: Add type safety to dict_iterate_set_async_callback() - callback context - - -M src/dict/dict-commands.c -M src/lib-dict/dict.c -M src/lib-dict/dict.h - -2021-02-23 11:08:03 +0200 Timo Sirainen (46cc92aa6c) - - lib-dict, global: Add type safety to dict_lookup_async() callback context - - -M src/dict/dict-commands.c -M src/doveadm/doveadm-dict.c -M src/lib-dict/dict-client.c -M src/lib-dict/dict.c -M src/lib-dict/dict.h - -2021-03-02 09:51:59 -0500 Josef 'Jeff' Sipek (1314743ca9) - - configure: Remove useless checks for luajit - - At one point, we considered supporting LuaJIT. While it turned out to be - not worth it, the prototype removal accidentally left checks in the - configure file. - -M configure.ac - -2021-02-22 17:44:03 -0500 Josef 'Jeff' Sipek (16bc5913a0) - - global: dict_iterate_deinit(NULL) is a no-op - - -A coccinelle/null-nop-dict_iterate_deinit.cocci -M src/auth/userdb-dict.c -M src/dict/dict-commands.c - -2021-02-22 17:43:49 -0500 Josef 'Jeff' Sipek (d7446176ef) - - lib-dict: Make dict_iterate_deinit(NULL) a no-op - - -M src/lib-dict/dict.c - -2021-02-22 17:43:05 -0500 Josef 'Jeff' Sipek (dace16f540) - - global: dict_transaction_rollback(NULL) is a no-op - - -A coccinelle/null-nop-dict_transaction_rollback.cocci -M src/dict/dict-connection.c -M src/lib-storage/index/index-transaction.c - -2021-02-22 17:41:23 -0500 Josef 'Jeff' Sipek (955ba101dc) - - lib-dict: Make dict_transaction_rollback(NULL) a no-op - - -M src/lib-dict/dict.c - -2021-02-04 18:25:13 +0200 Timo Sirainen (ac9e117021) - - fts: Replace generic "transaction context" error with more specific ones - - -M src/plugins/fts/fts-storage.c - -2021-02-03 19:42:17 +0200 Timo Sirainen (33cc04ebb7) - - fts: Fix mail_precache() and related error handling - - The mail_precache() caller is now expected to stop on error, so there's no - need for fts to stop the search internally anymore. And similarly the caller - will log the mail_precache() error so the search or transaction don't need - to fail. - - ft->failed is now used only for failures that are more specific to the - transaction. - -M src/plugins/fts/fts-storage.c - -2021-02-03 19:30:35 +0200 Timo Sirainen (2e19383b9f) - - fts: Use storage error logging when possible - - Use mail_storage_set_internal_error() only when it's required, because it - loses the internal error string in storage. - -M src/plugins/fts/fts-build-mail.c -M src/plugins/fts/fts-build-mail.h -M src/plugins/fts/fts-storage.c - -2021-02-03 19:27:08 +0200 Timo Sirainen (dc78357452) - - lib-fts, fts: fts_language_detect() - Return error string instead of logging - it - - -M src/lib-fts/fts-language.c -M src/lib-fts/fts-language.h -M src/lib-fts/test-fts-language.c -M src/plugins/fts/doveadm-fts.c -M src/plugins/fts/fts-build-mail.c - -2021-02-03 21:00:22 +0200 Timo Sirainen (3c37ef3730) - - indexer: Include "attempted to index ... messages" also in all error - messages - - After the following changes search or transaction won't always fail anymore. - -M src/indexer/master-connection.c - -2021-02-04 18:07:45 +0200 Timo Sirainen (3f328ac9f5) - - global: Handle mail_precache() errors - - -M src/doveadm/doveadm-mail-index.c -M src/indexer/master-connection.c -M src/plugins/fts/fts-storage.c - -2021-02-04 18:05:39 +0200 Timo Sirainen (921fe06624) - - lib-storage: Change mail_precache() API to allow returning an error - - -M src/lib-storage/fail-mail.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h -M src/lib-storage/mail-storage-private.h -M src/lib-storage/mail-storage.h -M src/lib-storage/mail.c -M src/plugins/fts/fts-storage.c -M src/plugins/virtual/virtual-mail.c - -2021-02-23 16:32:39 +0200 Aki Tuomi (576d40df2c) - - Makefile: Always include dovecot.socket and dovecot.service - - -M Makefile.am - -2021-02-23 12:52:29 +0200 Aki Tuomi (21ca65f26d) - - lib-master: Always import systemd related variables with systemd - - Otherwise it is too easy to break systemd integration by forgetting these - from import_environment. - -M src/lib-master/master-service.c - -2021-02-22 16:14:14 +0200 Aki Tuomi (6e811f1aec) - - master: Improve systemd integration - - -M src/master/main.c - -2021-02-22 15:29:48 +0200 Aki Tuomi (a42bb363b4) - - master: Use libsystemd instead of local source - - -M Makefile.am -M configure.ac -M src/lib-master/master-service-settings.c -M src/master/Makefile.am -M src/master/main.c -D src/master/sd-daemon.c -D src/master/sd-daemon.h -M src/master/service-listen.c - -2021-02-23 16:08:28 +0200 Aki Tuomi (19e05adc36) - - master: service-listen - Use dovecot coding standard for systemd code - - -M src/master/service-listen.c - -2021-02-22 16:01:49 +0200 Timo Sirainen (92f7801e67) - - lib-imap-client: Add asserts to make sure running commands always have a - timeout - - -M src/lib-imap-client/imapc-connection.c - -2021-02-22 15:41:42 +0200 Timo Sirainen (e8da1037b9) - - lib-imap-client: Don't remove global command timeouts when mailbox is - unselected - - -M src/lib-imap-client/imapc-connection.c - -2021-02-22 13:15:18 +0200 Timo Sirainen (ae48fa6fac) - - lib-imap-client: Fix busy-loop if server disconnects too early when trying - to logout - - This can happen if: - * imapc sends NOOP to break idle - * remote server sends BYE, but doesn't immediately disconnect - * session is stopped, which causes imapc to attempt to send LOGOUT - * imapc waits for NOOP response first - * remote server disconnects - * imapc notices the disconnection, but does nothing with it, because it - thinks it's already handled. This keeps busy-looping. - * If there was a mailbox selected, this results in infinite busy-loop. If a - mailbox wasn't selected, imapc_cmd_timeout aborts the NOOP command. - -M src/lib-imap-client/imapc-connection.c - -2021-02-24 17:51:19 +0200 Timo Sirainen (eea988f038) - - lib-mail: message-parser - Always properly finish parsed input - - If the caller hadn't called message_parser_parse_next_block() after seeing - EOF in the istream, the deinit could have crashed with: - - Panic: file message-parser.c: line 802 (message_parser_deinit_from_parts): - assertion failed: (ctx->nested_parts_count == 0 || - i_stream_have_bytes_left(ctx->input)) - -M src/lib-mail/message-parser.c - -2021-03-01 12:03:45 +0200 Timo Sirainen (96626062da) - - lib: io_loop_context_new() - Fix memory leak - - Broken by fea09a415cf89223d8b17c5982257c9b3c357cbc - -M src/lib/ioloop.c - -2021-02-18 14:43:06 +0200 Timo Sirainen (6b28234f3d) - - login-common: Fix implicit integer conversions when connect timeout is - reached - - -M src/login-common/login-proxy.c - -2021-02-03 20:48:51 +0200 Timo Sirainen (e73be660c5) - - lmtp: Fix log prefix when autoexpunge is running - - The username was missing from the log prefix. - -M src/lmtp/lmtp-local.c - -2021-02-03 20:42:50 +0200 Timo Sirainen (fea09a415c) - - lib: io_loop_context_new() no longer implicitly activates the context - - The new behavior requires explicitly activating the context. This change was - needed, because an implicit creation activated the context but didn't call - any of the callbacks. If ioloop wasn't run, the activation callbacks were - never called. This meant that when context was deactivated, the deactivation - callbacks weren't run either. - -M src/imap-hibernate/imap-client.c -M src/lib-storage/mail-storage-service.c -M src/lib/ioloop.c -M src/lib/ioloop.h - -2021-02-17 19:33:03 +0200 Timo Sirainen (b32b3f989d) - - lib-storage: Replace i_error() and i_warning() with e_error() and - e_warning() - - This changes only the generic code. The driver-specific code still needs - changing. - -M src/lib-storage/list/mailbox-list-fs-iter.c -M src/lib-storage/list/mailbox-list-index-notify.c -M src/lib-storage/list/mailbox-list-maildir-iter.c -M src/lib-storage/list/mailbox-list-subscriptions.c -M src/lib-storage/mail-autoexpunge.c -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage.c -M src/lib-storage/mail-user.c -M src/lib-storage/mailbox-guid-cache.c -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-uidvalidity.c - -2021-02-18 12:20:20 +0200 Timo Sirainen (26bf371412) - - lib-storage: test-mailbox-list - Initialize namespace, user and event - - Required by the following change. - -M src/lib-storage/test-mailbox-list.c - -2021-02-17 19:28:03 +0200 Timo Sirainen (e9912fbbff) - - lib-storage: mail-duplicate - Replace i_error() with e_error() - - -M src/lib-storage/mail-duplicate.c - -2021-02-17 19:16:58 +0200 Timo Sirainen (ad13ab0702) - - lib-storage: Add functions to get log prefixes - - This changes the log prefixes to be stored even when - MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT is used. - -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage-service.h - -2021-02-03 20:37:49 +0200 Timo Sirainen (d46404a323) - - lib-storage: Initialize service_user's logging before creating ioloop - context - - Needed by the next change. - -M src/lib-storage/mail-storage-service.c - -2021-02-03 20:35:02 +0200 Timo Sirainen (e5caac3a90) - - lib-storage: Add PID to the default log prefix - - -M src/lib-storage/mail-storage-service.c - -2021-02-16 13:39:02 +0200 Aki Tuomi (120f30fbd4) - - doc/example: 10-metrics.conf - Add metrics related settings - - -A doc/example-config/conf.d/10-metrics.conf -M doc/example-config/conf.d/Makefile.am - -2021-02-16 13:25:40 +0200 Aki Tuomi (4bc2e75557) - - doc/eaxmple: 10-logging.conf - Update syntax example to point to online - documentation - - -M doc/example-config/conf.d/10-logging.conf - -2021-02-18 18:58:29 +0200 Timo Sirainen (9d269602cb) - - lib: event_get_last_duration() - Change it to return uintmax_t - - It can't be negative, so unsigned return value makes more sense. Also - clarify the function comment and parameter name. - -M src/lib/lib-event.c -M src/lib/lib-event.h -M src/lib/test-event-log.c -M src/stats/stats-metrics.c - -2021-02-18 16:25:50 +0000 Siavash Tavakoli (b811181069) - - stats: openmetrics: Do microsecond to seconds conversion only for duration - values - - Other metrics should be exported with their values unchanged. - -M src/stats/stats-service-openmetrics.c - -2021-02-16 21:06:50 +0100 Martin Michaelis (9efdef3083) - - stats: openmentrics: Change histogram bucket unit to seconds - - In ae678116a79fff609cdf4fb1eb7eb3db2975bf1c the unit of durations was - changed from microseconds to seconds, but the `le` field in histograms is - still in microseconds. - -M src/stats/stats-service-openmetrics.c - -2021-02-18 21:39:09 +0000 Siavash Tavakoli (e73615a40f) - - stats: refactor duration field name into a macro - - -M src/stats/stats-metrics.c -M src/stats/stats-metrics.h - -2021-02-16 15:39:24 +0200 Timo Sirainen (a48bab26c6) - - lib-master: If config reading via doveconf exec fails, show details in the - error - - -M src/lib-master/master-service-settings.c - -2021-02-16 15:38:36 +0200 Timo Sirainen (d199f1369b) - - lib-master: Reset master_service.config_path_from_master if -c parameter is - used - - This doesn't fix anything currently, but clarifies the behavior and is - needed by the following commit. - -M src/lib-master/master-service.c - -2019-01-04 09:57:37 +0100 Stephan Bosch (cd17ae1d77) - - plugins: fts-solr: Use a private HTTP client. - - This is a workaround for problems with the - http_client_request_send_payload() API that occur when several shared HTTP - clients use this API at the same time and payload sending gets interleaved. - -M src/plugins/fts-solr/solr-connection.c - -2019-01-04 09:55:20 +0100 Stephan Bosch (0d24830967) - - plugins: fts: tika: Use a private HTTP client. - - This is a workaround for problems with the - http_client_request_send_payload() API that occur when several shared HTTP - clients use this API at the same time and payload sending gets interleaved. - -M src/plugins/fts/fts-parser-tika.c - -2021-02-17 13:18:55 +0200 Timo Sirainen (dc5e992d33) - - lib: test-cpu-limit - Increase ALLOW_MSECS_BELOW to 500ms - - The test still randomly failed with 100ms. Maybe 500ms is enough? - -M src/lib/test-cpu-limit.c - -2021-02-17 13:18:38 +0200 Timo Sirainen (3178728945) - - lib: test-cpu-limit - Use test_assert_cmp() - - -M src/lib/test-cpu-limit.c - -2021-02-18 14:23:50 +0200 Timo Sirainen (09cb1a7d08) - - lib-test: Add test_assert_ucmp[_idx]() - - These are the unsigned versions of test_assert_cmp*() - -M src/lib-test/test-common.c -M src/lib-test/test-common.h - -2021-02-17 13:17:43 +0200 Timo Sirainen (1bb6d7189b) - - lib-test: Add test_assert_cmp[_idx]() - - Similar to test_assert_strcmp() but for numbers: If the comparison fails, - print the values and the used operator. - -M src/lib-test/test-common.c -M src/lib-test/test-common.h - -2021-02-17 11:49:44 +0100 Markus Valentin (02bec0cfeb) - - acl: acl_lookup_dict_rebuild_update() - - Initialize dict_transaction_context *dt with NULL. Due to the changes done - in bfa7433bfcf538af7c4fdafe37a88bde6508c751 dt could be used uninitialized. - -M src/plugins/acl/acl-lookup-dict.c - -2021-02-17 01:02:34 +0200 Timo Sirainen (bf86675d35) - - Makefile.am: Don't delete dovecot.socket in make clean - - Broken by 0650928f3e3728911d6bcea4daf743df02ec1b3d - -M Makefile.am - -2020-12-21 21:02:23 -0700 Michael M Slusarz (d275fba32b) - - imap: Fix PREVIEW behavior to support RFC 8970 - - -M README.md -M configure.ac -M src/imap/imap-fetch-body.c -M src/imap/imap-fetch.h - -2021-02-17 14:40:06 +0200 Timo Sirainen (1227b34da9) - - mbox: Fix potentially logging read error when there was no error - - Broken by 959385969388b2d4f6d3d0218fa175481cb46c8a - -M src/lib-storage/index/mbox/istream-raw-mbox.c - -2021-02-10 13:13:34 +0200 Timo Sirainen (c4f4058d16) - - imap: NOTIFY - Fix crash if client disconnects while sending FETCH - notification - - Fixes: Panic: Trying to close mailbox INBOX with open transactions - -M src/imap/imap-notify.c -M src/imap/imap-sync.c - -2021-02-03 17:38:08 +0200 Timo Sirainen (c09b7032c1) - - doveadm: Avoid duplicate error logging with doveadm_print_istream() - - -M src/doveadm/doveadm-print.c -M src/doveadm/doveadm-print.h - -2021-02-03 17:34:01 +0200 Timo Sirainen (da7208fb96) - - lib-compression, global: Remove support for implicit error logging - - -M src/doveadm/doveadm-zlib.c -M src/lib-compression/bench-compression.c -M src/lib-compression/compression.h -M src/lib-compression/istream-bzlib.c -M src/lib-compression/istream-decompress.c -M src/lib-compression/istream-lz4.c -M src/lib-compression/istream-lzma.c -M src/lib-compression/istream-zlib.c -M src/lib-compression/istream-zlib.h -M src/lib-compression/istream-zstd.c -M src/lib-compression/ostream-zstd.c -M src/lib-compression/test-compression.c -M src/plugins/imap-zlib/imap-zlib-plugin.c -M src/plugins/zlib/zlib-plugin.c - -2021-02-03 17:04:49 +0200 Timo Sirainen (1a388627f1) - - doveadm zlibconnect: Avoid duplicate error logging - - The istream errors are already logged with i_fatal(). There's no need for a - duplicate error. - -M src/doveadm/doveadm-zlib.c - -2021-02-03 17:04:16 +0200 Timo Sirainen (e58e57cb7e) - - doveadm dump -t imapzlib: Explicitly log compress istream errors - - -M src/doveadm/doveadm-zlib.c - -2021-02-03 16:57:30 +0200 Timo Sirainen (fb92b79819) - - zlib: Remove extra error logging for istream failures - - The error will nowadays be logged as the istream error anyway. - -M src/plugins/zlib/zlib-plugin.c - -2021-02-03 17:32:11 +0200 Timo Sirainen (9593859693) - - mbox: istream-raw-mbox - Log parent istream read errors - - -M src/lib-storage/index/mbox/istream-raw-mbox.c - -2021-02-03 17:18:18 +0200 Timo Sirainen (1ae18869a5) - - mbox: Use mbox_ostream_set_syscall_error() - - -M src/lib-storage/index/mbox/mbox-save.c -M src/lib-storage/index/mbox/mbox-sync-rewrite.c - -2021-02-03 17:24:14 +0200 Timo Sirainen (e884af64a7) - - mbox: Use mbox_istream_set_syscall_error() - - -M src/lib-storage/index/mbox/mbox-sync.c - -2021-02-03 17:18:09 +0200 Timo Sirainen (b00e7d5660) - - mbox: Add mbox_[io]stream_set_syscall_error() - - This allows logging the iostream-specific error rather than the more generic - errno. - -M src/lib-storage/index/mbox/mbox-storage.c -M src/lib-storage/index/mbox/mbox-storage.h - -2020-04-23 15:26:22 +0300 Alex/AT (f753ea9b31) - - lib-master: Fix haproxy PROXY protocol LOCAL type connection behavior when - header includes address information or TLVs - - PROXY protocol LOCAL type headers can actually include supplementary - information (addresses, TLVs) which need to be skipped to correctly handle - the header. Fixes Invalid TLV bug with haproxy 2.0.14 service checks. - - More info here: https://github.com/haproxy/haproxy/issues/511 And here: - https://www.mail-archive.com/haproxy@formilux.org/msg36890.html - -M src/lib-master/master-service-haproxy.c - -2021-02-16 16:40:35 +0200 Timo Sirainen (ded811b345) - - lib: cpu-limit - Don't round current CPU usage up when checking if rlim_max - is reached - - The fatal error could trigger half a second too early. - - Also always increase the provided cpu_limit_sec by 1 second to make sure it - won't trigger too early. Although even with this change it can still trigger - a few milliseconds too early for some reason. - -M src/lib/cpu-limit.c - -2021-02-16 16:42:54 +0200 Timo Sirainen (5b87dcaf94) - - lib: cpu-limit - Allow time comparisons to be more relaxed - - This should fix random failures. - -M src/lib/test-cpu-limit.c - -2020-11-10 16:33:41 +0200 Timo Sirainen (7db69420cf) - - lib-storage: Fix assert-crash when parsing binary attachments - - EOF may not have been detected in the cur_block istream early enough, - causing the calculation to go wrong. This happened at least with empty - base64 bodies, but could have possibly happened in other situations also. - - Fixes: Panic: file index-mail-binary.c: line 357 (blocks_count_lines): - assertion failed: (block_count == 0 || block_idx+1 == block_count) - -M src/lib-storage/index/index-mail-binary.c - -2021-02-12 14:45:39 +0200 Aki Tuomi (1f135ee6d2) - - config: test-config-parser - Change filename to match .gitignore pattern - - -M src/config/test-config-parser.c - -2021-02-12 14:32:01 +0200 Aki Tuomi (412d9554e9) - - config: test-config-parser - Cleanup input file after test - - -M src/config/test-config-parser.c - -2021-02-01 15:38:49 +0100 Markus Valentin (bfa7433bfc) - - acl: acl_lookup_dict_rebuild_update() - Commit transaction after each - [un]set - - When used with Cassandra an error can occur if multiple changes are included - into one transaction: "Multiple changes in transaction not supported". - Prevent these errors by committing every change on it's own. - -M src/plugins/acl/acl-lookup-dict.c - -2020-12-16 00:13:19 +0200 Timo Sirainen (5d3d8e5dac) - - lib-storage: Fix assert-crash in shared namespace if storage has no - directories - - This allows using imapc with shared namespaces. - - Fixes: Panic: file mailbox-list.c: line 1419: unreached - -M src/lib-storage/index/shared/shared-storage.c - -2020-12-16 00:09:32 +0200 Timo Sirainen (32da598980) - - acl: Add acl_ignore_namespace* settings - - Ignore ACLs entirely for the listed namespaces. For example: - - plugin { - acl_ignore_namespace = virtual/ - acl_ignore_namespace2 = shared/* - } - -M src/plugins/acl/acl-mailbox-list.c - -2021-02-07 09:23:03 +0100 Simon Rupf (da1dad0097) - - util: health-check - Timeout the read via trap for POSIX shell compatibility - - -M src/util/health-check.sh - -2021-01-23 11:29:22 +0100 Simon Rupf (5510fd8854) - - util: health-check - Consistent variable style - - -M src/util/health-check.sh - -2021-01-23 11:07:36 +0100 Simon Rupf (ce3a0fdd36) - - util: health-check - Made bash script compatible with dash shell - - -M src/util/health-check.sh - -2020-05-24 23:15:53 +0200 Nis Martensen (0650928f3e) - - Makefile.am: fix typo and broken variable assignment - - -M Makefile.am - -2020-05-24 22:05:42 +0200 Nis Martensen (daee059866) - - systemd integration: notify service manager when ready - - With Type=simple or Type=forking, systemd does not really know when the - service is ready to accept connections and might start depending services - too early. Use Type=notify to explicitly tell the service manager when the - service is ready. - - For a real problem caused by assuming readiness too early, please see - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=951722 - - For the meaning of the service type and details of the readiness protocol, - see also the following links: - https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type= - https://www.freedesktop.org/software/systemd/man/sd_notify.html - - As discussed in the last link, more elaborate state notifications are - possible. This patch only implements the most basic part. - - Original patch prepared by Michael Biebl, with slight modification. - -M dovecot.service.in -M src/lib-master/master-service-settings.c -M src/master/main.c - -2020-10-29 01:04:26 +0100 Stephan Bosch (ea851d0745) - - lib: Add API for limiting CPU usage of subroutines. - - -M src/lib/Makefile.am -A src/lib/cpu-limit.c -A src/lib/cpu-limit.h -A src/lib/test-cpu-limit.c -M src/lib/test-lib.inc - -2020-10-29 01:09:17 +0100 Stephan Bosch (3ce88c8669) - - lib: time-util - Add support for rounding off timeval to a time_t value. - - -M src/lib/time-util.h - -2020-10-29 01:06:57 +0100 Stephan Bosch (f3fff8e029) - - lib: time-util - Add support for calculating the sum of two timeval values. - - -M src/lib/time-util.h - -2021-02-01 12:33:02 +0000 Siavash Tavakoli (4341feba66) - - run-test-valgrind.supp: Add more suppressions - - -M run-test-valgrind.supp - -2021-01-28 23:09:00 +0000 Siavash Tavakoli (6e13107de7) - - dsync: Add namespace prefixes to mailbox tree - - Adds syncing selectable namespace prefixes, especially shared INBOXes with - "mail_shared_explicit_inbox=yes". - -M src/doveadm/dsync/dsync-mailbox-tree-fill.c - -2021-01-07 09:40:51 +0000 Siavash Tavakoli (6832759cf5) - - dsync: Check namespace prefix when syncing shared namespaces - - When iterating over namespaces, comparing namespace pointers doesn't work - for shared namespaces. Instead, check the prefix and include all the - mailboxes in the namespace for syncing. - -M src/doveadm/dsync/dsync-brain.c - -2021-01-19 10:33:17 +0000 Siavash Tavakoli (cd0a0a4240) - - dsync: Don't send out of tree namespace parents for syncing - - For namespaces prefixes with multiple hierarchical names, we shouldn't send - parents (i.e. first part/parts of the prefix) that are outside of syncing. - -M src/doveadm/dsync/dsync-brain-mailbox-tree.c - -2021-02-04 20:54:14 +0000 Siavash Tavakoli (c452b7177e) - - lib-storage: Cache mailbox's namespace prefix if selectable - - If namespace prefix is a selectable mailbox, mailbox_guid_cache_refresh - should add it to cache. - -M src/lib-storage/mailbox-guid-cache.c - -2021-02-04 15:57:09 +0000 Siavash Tavakoli (fd350bc887) - - lib-storage: Add mailbox_guid_cache_add_mailbox() - - Refactored caching logic in mailbox_guid_cache_refresh to this new function. - -M src/lib-storage/mailbox-guid-cache.c - -2021-02-04 20:52:19 +0000 Siavash Tavakoli (74005f66c0) - - lib-storage: Add mail_namespace_prefix_is_inbox() - - -M src/lib-storage/mail-namespace.h - -2021-02-04 01:42:52 +0000 Siavash Tavakoli (be9a813f05) - - lib-storage: Skip private server attributes for shared inboxes - - Private server attributes should be iterated only for user's own inbox. - -M src/lib-storage/mailbox-attribute.c - -2021-02-01 17:53:59 +0000 Siavash Tavakoli (27b25d6942) - - lib-storage: mailbox-list-iter: Send delayed inbox after actually seeing the - inbox - - Control delayed inbox listing with a flag in ns_list_iterate_context. Send - only when the inbox is actually seen. - -M src/lib-storage/list/mailbox-list-iter.c - -2021-02-02 12:43:50 +0000 Siavash Tavakoli (f137dce5b6) - - lib-index: Fix implicit integer truncation found by ubsan - - -M src/lib-index/mail-index-transaction-view.c - -2021-02-03 15:55:14 +0200 Timo Sirainen (9accb79b48) - - lib-index: Avoid a duplicate "missing middle file seq" warning. - - The previous changes fixed repeating warning, but it was still possible that - the warning was logged twice. Now it's logged only once. - -M src/lib-index/mail-index-view-sync.c - -2021-02-01 17:49:18 +0200 Timo Sirainen (f47f204636) - - lib-index: Change "missing middle file seq" error into warning - - It's not really an error, but it has been useful in finding performance - problems. Possibly it should be changed into a named event at some point. - -M src/lib-index/mail-index-view-sync.c - -2021-02-01 17:02:24 +0200 Timo Sirainen (c118345086) - - lib-index: view_sync_set_log_view_range() - Move error logging to parent - - -M src/lib-index/mail-index-view-sync.c - -2021-02-01 16:53:18 +0200 Timo Sirainen (c038c664ea) - - lib-index: Fix repetitive "missing middle file seq" error. - - If a view keeps being synced with MAIL_INDEX_VIEW_SYNC_FLAG_NOEXPUNGES, - every sync regenerated the missing log files and logged this error. This - could have resulted in lots of errors being logged about it, as well as - unnecessary CPU usage. - - The view syncing was always syncing from the last "expunge log position", - even when expunges weren't being synced. The new behavior is to do that only - when expunges are synced, but otherwise use the "head log position" to sync - only the new changes since the last view sync. - - The error is now logged once when the log is first noticed being lost. - Another error is logged when pending expunges are synced. - -M src/lib-index/mail-index-view-sync.c - -2021-01-26 09:30:42 +0200 Aki Tuomi (93014e52f8) - - m4: dovecot.m4 - Execute tests with libtool - - This allows libtool to do all the necessary preparations before test harness - is used. - -M m4/dovecot.m4 - -2021-01-26 09:29:44 +0200 Aki Tuomi (c0b98d9284) - - m4: dovecot.m4 - Find out and use absolute path to valgrind - - -M m4/dovecot.m4 - -2021-02-08 10:05:47 +0200 Aki Tuomi (a25fa78789) - - lib-settings: test-settings-parser - Use ULL suffix - - Some of the sizes do not fit to UL in 32 bit systems. - -M src/lib-settings/test-settings-parser.c - -2021-01-22 14:00:21 -0500 Josef 'Jeff' Sipek (6e5ae5ef0f) - - lib-compression: Remove xz/lzma write support - - For now, we keep the read support to allow for a more gradual migration from - lzma/xz. - - The code has bugs. Additionally, there is no benefit in keeping it around. - bzip2 or zstd (at maximum compression level) are likely better choices for - archival. For non-archival usecases, a light compression algorithm like - zstd (at low to medium compression level) or lz4 are better choices. - -M configure.ac -M run-test-valgrind.supp -M src/lib-compression/Makefile.am -M src/lib-compression/compression.c -D src/lib-compression/ostream-lzma.c -M src/lib-compression/ostream-zlib.h -M src/lib-compression/test-compression.c - -2021-01-28 17:04:37 +0200 Aki Tuomi (4b1c694608) - - lib-mail: test-message-snippet - Add unit tests for multipart messages - - -M src/lib-mail/test-message-snippet.c - -2021-02-03 17:22:07 +0200 Aki Tuomi (c8c1e9d840) - - lib-mail: test-message-snippet - Use test_assert_strcmp - - Makes it easier to see what failed. - -M src/lib-mail/test-message-snippet.c - -2021-01-28 16:52:10 +0200 Aki Tuomi (5f9da73421) - - lib-mail: Reformat test-message-snippet.c - - -M src/lib-mail/test-message-snippet.c - -2021-01-28 17:01:38 +0200 Aki Tuomi (c276029aed) - - lib-mail: message-snippet - Stop building snippet on first non-empty part - - When we have gotten some snippet out of first eligible part, we can stop. - -M src/lib-mail/message-snippet.c - -2021-01-28 16:48:05 +0200 Aki Tuomi (964e60417a) - - lib-mail: message-snippet - Do not stop on first non-text part - - Some mail structures would break snippet generation because the code would - stop on multipart. - -M src/lib-mail/message-snippet.c - -2021-01-28 11:07:32 +0200 Aki Tuomi (c5842d9cfe) - - lib-mail: message-snippet - Free html parser before making new - - If html parser has already been initialized, free it before restarting the - parser. - - Fixes memory leak introduced by 7f7be2cbf68f8a202a688d5bc50f82483d461643 - -M src/lib-mail/message-snippet.c - -2021-02-04 08:59:29 +0200 Aki Tuomi (bf8286ac5b) - - stats: stats-service-openmetrics - Use PRIdTIME_T for startup time - - -M src/stats/stats-service-openmetrics.c - -2021-02-04 08:57:24 +0200 Aki Tuomi (b97fa96434) - - login: login-proxy - Fix type conflict - - -M src/login-common/login-proxy.c - -2021-02-04 08:54:59 +0200 Aki Tuomi (77de43799e) - - lib-mail: test-message-header-decode - Use ptrdiff_t for rep_char_len - - The length is compared to a pointer difference, so using ptrdiff_t squashes - a warning. - -M src/lib-mail/test-message-header-decode.c - -2021-02-04 08:46:51 +0200 Aki Tuomi (e38c52558e) - - lib-settings: test-setting-parser - Use correct type in test - - SIZE uses uoff_t. - -M src/lib-settings/test-settings-parser.c - -2021-02-04 08:45:37 +0200 Aki Tuomi (8aa7f840c6) - - lib: backtrace - Use correct format modifier - - Matches size_t correctly. - -M src/lib/backtrace-string.c - -2021-02-04 08:44:46 +0200 Aki Tuomi (01366bd18e) - - lib: test-time-util - Use correct types for test case - - Fixes type mismatch on 32-bit systems. - -M src/lib/test-time-util.c - -2021-01-19 19:11:47 +0100 Timo Sirainen (0ac71cbbc9) - - master: Fix reopening log files on SIGUSR1 - - -M src/master/main.c - -2021-01-19 19:11:20 +0100 Timo Sirainen (34f7b38b50) - - man: Clarify how doveadm log reopen works - - -M doc/man/doveadm-log.1.in - -2021-01-28 16:45:45 +0100 Timo Sirainen (260b49d7a3) - - dovecot.service.in: Update documentation URL - - -M dovecot.service.in - -2021-01-22 13:19:05 +0200 Timo Sirainen (264d67d6f0) - - lib-master: test-event-stats - Fix unit test when compiling using build - directory - - When using build directory __FILE__ expands to - "../../../src/lib-master/test-event-stats.c", which doesn't match - "test-event-stats.c" what is normally used. - -M src/lib-master/test-event-stats.c - -2021-01-18 18:14:47 +0200 Aki Tuomi (001d919b9d) - - lib-master: test-event-stats - Cast test value to uint64_t - - -M src/lib-master/test-event-stats.c - -2021-01-04 16:31:03 +0000 Paul Howarth (2cc1feca90) - - lib: Fix timeval_cmp_margin for 32-bit systems - - The test suite compares times with seconds values of -INT_MAX and INT_MAX. - The result of this comparison does not fit in a value of type int and so the - test suite fails on 32-bit systems where time_t is an int. To fix this, - calculations on seconds values are done using long long integers. - - Broken by 16ab5542 - -M src/lib/time-util.c - -2021-01-26 17:44:46 +0200 Timo Sirainen (195f6742c3) - - dsync: Use a better default vname escape character - - A control character was a bit unreadable in strings. - -M src/doveadm/doveadm-dsync.c - -2021-01-26 18:55:22 +0200 Timo Sirainen (00c7664505) - - dsync: Replace escape characters in outgoing mailbox names with alt_char - - Especially when dsync is used for migration, we don't want to end up having - invalid mUTF7 mailbox names locally. Also, remote might not even be - configured to use the same escape character. - -M src/doveadm/dsync/dsync-brain-mailbox-tree.c - -2021-01-26 18:54:53 +0200 Timo Sirainen (11b549e552) - - dsync: Send alt_char also to slave brain - - -M src/doveadm/doveadm-dsync.c -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-brain.h -M src/doveadm/dsync/dsync-ibc-stream.c -M src/doveadm/dsync/dsync-ibc.h -M src/doveadm/dsync/dsync-mailbox-tree.c - -2021-01-18 23:53:50 +0200 Timo Sirainen (ae3de56ed9) - - lib-storage: mailbox_list_escape_name_params() - Assert that escape_char - isn't NUL - - -M src/lib-storage/mailbox-list.c - -2021-01-15 19:27:00 +0200 Timo Sirainen (d02d59d343) - - imapc: Add comment explaining various mailbox names - - -M src/lib-storage/index/imapc/imapc-list.c - -2021-01-18 23:31:28 +0200 Timo Sirainen (b4ae3a5fac) - - imapc: fs mailbox_list - Remove vname_escape_char - - This isn't necessary. - -M src/lib-storage/index/imapc/imapc-list.c - -2021-01-18 23:30:28 +0200 Timo Sirainen (1535a2ddbb) - - imapc: Add IMAPC_LIST_FS_NAME_ESCAPE_CHAR - - This clarifies how the escape characters are used. - -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-storage.h - -2021-01-18 23:23:37 +0200 Timo Sirainen (2a42647297) - - imapc: Add a default vname_escape_char - - Having vname_escape_char guarantees that all the remote mailbox names are - accessible by escaping them as necessary. - -M src/lib-storage/index/imapc/imapc-storage.c - -2021-01-18 23:19:01 +0200 Timo Sirainen (6abcea7e0a) - - imapc: Fix local filesystem directory name escaping - - Use the remote mailbox name as the base. Convert the hierarchy separator and - add escaping as necessary. - - The old method was based on storage_name, and it's a bit unclear if it - worked correctly in all situations. - -M src/lib-storage/index/imapc/imapc-list.c - -2021-01-16 17:20:46 +0200 Timo Sirainen (fc0be41d1d) - - imapc: Add imapc_list_remote_to_storage_name() - - -M src/lib-storage/index/imapc/imapc-list.c - -2021-01-16 15:03:59 +0200 Timo Sirainen (d8d1e4db34) - - imapc: Fix remote/storage mailbox name mismatches - - -M src/lib-storage/index/imapc/imapc-storage.c - -2021-01-16 15:00:06 +0200 Timo Sirainen (0e2c465f45) - - imapc: Use more explicit mailbox name variable names - - Clearly specify which type of a mailbox name it is to avoid - misunderstandings. - -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-storage.c - -2021-01-16 14:44:00 +0200 Timo Sirainen (ec9ad14e8a) - - imapc: Rename imapc_list_get_fs_name() to imapc_list_storage_to_fs_name() - - -M src/lib-storage/index/imapc/imapc-list.c - -2021-01-16 14:41:24 +0200 Timo Sirainen (caa30d512b) - - imapc: Rename imapc_list_to_vname() to imapc_list_remote_to_vname() - - -M src/lib-storage/index/imapc/imapc-list.c - -2021-01-16 14:40:54 +0200 Timo Sirainen (b840f1fc1e) - - imapc: Rename imapc_list_to_remote() to imapc_list_storage_to_remote_name() - - -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-list.h -M src/lib-storage/index/imapc/imapc-storage.c - -2021-01-14 17:45:07 +0200 Timo Sirainen (bd8839f99c) - - lib-storage: mailbox_list_default_get_storage_name() - Escape - ns_prefix/INBOX if possible - - If storage_name_escape_char is set, escape the "I" letter in the - storage_name if the namespace also has inbox=yes. This way it's possible to - distinguish between the actual INBOX and ns_prefix/INBOX. - -M src/lib-storage/mailbox-list.c -M src/lib-storage/test-mailbox-list.c - -2021-01-14 17:33:13 +0200 Timo Sirainen (a243cdb748) - - lib-storage: Update mailbox_list_settings.{vname|storage_name}_escape_char - comments - - Also add the examples in the comments to unit tests to make sure they really - work. - -M src/lib-storage/mailbox-list.h -M src/lib-storage/test-mailbox-list.c - -2021-01-14 17:27:03 +0200 Timo Sirainen (73364f0f2b) - - lib-storage: Fix mailbox name escape/unescape ordering - - This fixes some cases like not properly escaping '/' in storage_name if it - was also the namespace separator. This also allows using the same character - for both vname_escape_char and storage_name_escape_char. - -M src/lib-storage/mailbox-list.c -M src/lib-storage/test-mailbox-list.c - -2021-01-14 17:07:34 +0200 Timo Sirainen (6adcea35e5) - - lib-storage: mailbox_list_default_get_vname() - Fix escaping namespace - separator in storage_name - - For example if { storage_name="foo/bar", storage_sep=".", ns_sep="/" } the - "/" in the name shouldn't be treated as a namespace separator. If - vname_escape_char is set, it should be returned escaped instead. - -M src/lib-storage/mailbox-list.c -M src/lib-storage/test-mailbox-list.c - -2021-01-14 16:38:04 +0200 Timo Sirainen (e3be8553d3) - - lib-storage: Use imap_escaped_utf8_to_utf7() - - -M src/lib-storage/mailbox-list.c - -2021-01-14 16:32:25 +0200 Timo Sirainen (c50fd4ddf1) - - lib-storage: Use imap_escaped_utf8_hex_to_char() - - -M src/lib-storage/mailbox-list.c - -2021-01-14 16:23:24 +0200 Timo Sirainen (9d41e00eda) - - lib-storage: Use mailbox_list_settings.vname_escape_char also with utf8 - storage names - - mailbox_list_default_get_storage_name() was already unescaping with utf8, so - mailbox_list_default_get_vname() should also be escaping with utf8. - -M src/lib-storage/mailbox-list.c -M src/lib-storage/test-mailbox-list.c - -2021-01-14 15:40:44 +0200 Timo Sirainen (6da08d8c61) - - lib-storage: mailbox_list_default_get_vname() - Use - imap_utf7_to_utf8_escaped() - - This changes the output a bit for broken mUTF7 names. Previously if any part - of the string had broken mUTF7 input, none of it was converted. Now it's - instead trying to convert as much as it can. - -M src/lib-storage/mailbox-list.c -M src/lib-storage/test-mailbox-list.c - -2021-01-14 15:09:34 +0200 Timo Sirainen (5f858f84b9) - - lib-storage: mailbox_list_default_get_vname() - Escape each hierarchical - name separately - - Same reasoning as for the similar change for - mailbox_list_default_get_storage_name(). - -M src/lib-storage/mailbox-list.c - -2021-01-14 12:47:55 +0200 Timo Sirainen (af18e441c9) - - lib-storage: Split off mailbox_list_storage_name_prepare() - - -M src/lib-storage/mailbox-list.c - -2021-01-14 12:34:48 +0200 Timo Sirainen (8f139ccc9f) - - lib-storage: mailbox_list_default_get_storage_name() - Escape each - hierarchical name separately - - This makes it possible in the following commits to allow unescaping to write - namespace hierarchy separator character without converting it into the - mailbox_list separator. - -M src/lib-storage/mailbox-list.c - -2021-01-14 12:30:54 +0200 Timo Sirainen (5fd5ad3a2b) - - lib-storage: mailbox_list_default_get_storage_name() - Cleanup shared - namespace root handling - - -M src/lib-storage/mailbox-list.c - -2021-01-14 12:03:58 +0200 Timo Sirainen (0dc071a974) - - lib-storage: Split off mailbox_list_vname_prepare() - - This also slightly changes the code logic. mailbox_list_escape_name() is now - called also for INBOX, but that doesn't actually matter. - -M src/lib-storage/mailbox-list.c - -2021-01-14 15:22:20 +0200 Timo Sirainen (4224bb8302) - - lib-storage: Remove mailbox_list_unescape_name() by moving its code inline - - There was only a single caller for this function. It doesn't need to exist. - -M src/lib-storage/mailbox-list-private.h -M src/lib-storage/mailbox-list.c - -2021-01-14 15:20:13 +0200 Timo Sirainen (20e26b52d5) - - lib-storage: Remove mailbox_list_escape_name() by moving its code inline - - There was only a single caller for this function. It doesn't need to exist. - -M src/lib-storage/mailbox-list-private.h -M src/lib-storage/mailbox-list.c - -2021-01-13 20:55:43 +0200 Timo Sirainen (71877ef5e4) - - lib-storage: Add unit tests for - mailbox_list_default_get_{storage_name|vname}() - - -M src/lib-storage/test-mailbox-list.c - -2021-01-13 18:50:38 +0200 Timo Sirainen (7b794d3070) - - lib-storage: Rename mailbox_list_settings.broken_char to vname_escape_char - - This clarifies that it's only used in vnames. - -M src/doveadm/doveadm-dsync.c -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-storage.h -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-list.h - -2021-01-13 18:47:11 +0200 Timo Sirainen (5cfd6cec1d) - - lib-storage: Rename mailbox_list_settings.escape_char to - storage_name_escape_char - - This clarifies that it's only used in storage_names. - -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/imapc/imapc-storage.h -M src/lib-storage/mail-storage.c -M src/lib-storage/mailbox-list.c -M src/lib-storage/mailbox-list.h -M src/plugins/listescape/listescape-plugin.c - -2021-01-13 19:50:50 +0200 Timo Sirainen (bffa6a9c0c) - - lib-imap: Add imap_utf7_to_utf8_escaped() and imap_escaped_utf8_to_utf7() - - These can be used to convert invalid mUTF-7 to escaped UTF-8 and back to the - original invalid input. - -M src/lib-imap/imap-utf7.c -M src/lib-imap/imap-utf7.h -M src/lib-imap/test-imap-utf7.c - -2021-01-13 19:48:15 +0200 Timo Sirainen (db7054d86a) - - lib-imap: test-imap-utf7 - Simplify test_imap_utf7_non_utf16() - - -M src/lib-imap/test-imap-utf7.c - -2021-01-13 19:19:37 +0200 Timo Sirainen (40070778c0) - - lib-imap: Move unnecessary shift check to mbase64_decode_to_utf8() - - -M src/lib-imap/imap-utf7.c - -2021-01-13 19:17:18 +0200 Timo Sirainen (02f35f281e) - - lib-imap: test-imap-utf7 - Improve/clarify testing '&' - - & is never base64-encoded. - -M src/lib-imap/test-imap-utf7.c - -2021-01-25 13:32:18 +0200 Aki Tuomi (aeea2ce10e) - - config: Add unit test for config parser - - -M src/config/Makefile.am -A src/config/test-config-parser.c - -2021-01-20 10:07:56 +0200 Aki Tuomi (686c1f22a0) - - config: Extract sources to libconfig.la - - Makes unit testing possible - -M src/config/Makefile.am - -2021-01-19 11:54:15 +0200 Aki Tuomi (8ab5ea3dd6) - - lib-settings: test-settings - Add tests for settings file - - -M configure.ac -M src/lib-settings/Makefile.am -A src/lib-settings/test-settings.c - -2021-01-18 15:43:06 +0200 Aki Tuomi (dc5600c988) - - test-settings-parser: Add test for size - - -M src/lib-settings/test-settings-parser.c - -2021-01-18 15:32:51 +0200 Aki Tuomi (c064eea80e) - - lib-settings: test-settings-parser - Add test for settings parser - - -M src/lib-settings/test-settings-parser.c - -2021-01-18 14:11:28 +0200 Aki Tuomi (4b0ffe1630) - - lib-settings: Add support for $ENV:name - - Expands into given environment variable - -M src/lib-settings/settings.c - -2020-01-22 14:34:15 +0200 Aki Tuomi (479223dc56) - - config: Add support for $ENV:name - - Expands into given environment variable - -M src/config/config-parser.c - -2020-01-22 14:33:38 +0200 Aki Tuomi (2edc5200f8) - - config: Expand multiple variables per line - - Needed to properly support environment variables. - -M src/config/config-parser.c - -2021-01-20 10:49:23 +0200 Aki Tuomi (9c6bc94d9d) - - config: config-parser - Add config_write_keyvariable - - Move code handling key variable expansion to separate function. Simplifies - next commit. - -M src/config/config-parser.c - -2021-01-12 13:53:19 -0500 Josef 'Jeff' Sipek (18ddfa4eda) - - lib-storage: Make lua methods and functions use the passed in lua_State * - directly - - -M src/lib-storage/mail-user-lua.c -M src/lib-storage/mailbox-lua.c - -2021-01-12 14:27:31 -0500 Josef 'Jeff' Sipek (fd03e3c9a2) - - lib-storage: Make dlua_push_mail() take lua_State * directly - - -M src/lib-storage/mail-lua.c -M src/lib-storage/mail-storage-lua.h - -2021-01-12 14:26:07 -0500 Josef 'Jeff' Sipek (fba66539f2) - - lib-storage: Make dlua_push_mail_user() take lua_State * directly - - -M src/lib-storage/mail-storage-lua.h -M src/lib-storage/mail-user-lua.c -M src/plugins/mail-lua/mail-lua-plugin.c -M src/plugins/push-notification/push-notification-driver-lua.c - -2021-01-12 13:30:45 -0500 Josef 'Jeff' Sipek (8c77a11e89) - - lib-storage: Make lua_storage_cmp() take lua_State * directly - - -M src/lib-storage/mail-storage-lua-private.h -M src/lib-storage/mail-user-lua.c -M src/lib-storage/mailbox-lua.c - -2021-01-12 12:59:39 -0500 Josef 'Jeff' Sipek (9e2ceb472e) - - lib-storage: Make lua_check_storage_mailbox() take lua_State * directly - - -M src/lib-storage/mailbox-lua.c - -2021-01-12 12:02:05 -0500 Josef 'Jeff' Sipek (f15ca44e54) - - lib-storage: Make dlua_push_mailbox() take lua_State * directly - - -M src/lib-storage/mail-lua.c -M src/lib-storage/mail-storage-lua.h -M src/lib-storage/mail-user-lua.c -M src/lib-storage/mailbox-lua.c - -2021-01-07 18:12:27 +0200 Timo Sirainen (7e98d506b0) - - master: Send instance_name setting to log process - - This way log process can use it for syslog ident - -M src/lib-master/master-service-settings.h -M src/master/service-process.c - -2020-12-07 15:58:00 +0200 Timo Sirainen (f1a97bdc3d) - - cassandra: Fix logging messages with LFs - - At least some trace level messages had them. - -M src/lib-sql/driver-cassandra.c - -2020-04-18 12:56:14 +0200 Stephan Bosch (4a7f625eed) - - m4: Fix configuration of libunwind on i386 (and probably other systems). - - Use the standard libunwind-coredump instead of the system-dependent library. - This way, all can be configured using pkg-config, without relying on a - failed attempt to use the $build_cpu variable to find the system-dependent - library. This fails on i386 and probably other systems as well. - -M m4/want_unwind.m4 -M run-test-valgrind.supp - -2020-03-25 16:20:08 +0200 Timo Sirainen (7036a7bfe1) - - lib-imap: imap_bodystructure_write() - Add asserts to check unexpected NULLs - inside lists - - This just changes the assert that already triggers into a bit clearer - assert. - -M src/lib-imap/imap-bodystructure.c - -2020-03-25 15:52:29 +0200 Timo Sirainen (8818482ba6) - - lib-imap: Add unit test for invalid BODYSTRUCTUREs - - -M src/lib-imap/test-imap-bodystructure.c - -2020-03-25 15:52:02 +0200 Timo Sirainen (d749c280bf) - - lib-imap: imap_arg_get/as_nstring() - fail if input is an atom - - Atoms were wrongly allowed in these places. - - These have been used in very few places, so this change should be pretty - safe to do. The only affected places are: - - * SETMETADATA - Backwards compatibility preserved by earlier commit - * ID - It's not expected that any clients use atoms here - * imapc - Server replies are parsed more strictly now - -M src/lib-imap/imap-arg.c -M src/lib-imap/imap-bodystructure.c - -2020-03-25 15:49:37 +0200 Timo Sirainen (dd43103e2a) - - lib-imap: Don't wrongly accept NILs or atoms when parsing BODYSTRUCTURE - - Especially NILs could cause crashes later on when some internal field is - NULL when it's not expectedly to be. - - Fixes a crash when parsing BODYSTRUCTURE and writing it out with - imap_bodystructure_write() when some of the parameter lists contained NILs. - -M src/lib-imap/imap-bodystructure.c - -2020-03-25 15:47:51 +0200 Timo Sirainen (69be6e9a89) - - lib-imap: imap_body_parse_from_bodystructure() - Write size field as atom - - Following changes will break writing it as nstring. - -M src/lib-imap/imap-bodystructure.c - -2020-03-25 16:00:08 +0200 Timo Sirainen (923362d27d) - - imap: SETMETADATA - Explicitly support using atoms for values - - Required to keep atoms working (and especially not assert-crashing) after - the following imap_arg_get_nstring() change. - -M src/imap/cmd-setmetadata.c - -2021-01-20 11:15:18 -0500 Josef 'Jeff' Sipek (429a12a38b) - - lib: event-filter - Implement event_filter_merge() unit test - - -M src/lib/Makefile.am -A src/lib/test-event-filter-merge.c -M src/lib/test-lib.inc - -2021-01-12 11:15:44 -0500 Josef 'Jeff' Sipek (ebb4a80f8e) - - lib: event-filter - Use p_strdup() instead of p_strdup_empty() to avoid - NULLs - - The code used p_strdup_empty() in an (incorrect) attempt to avoid NULLs - turning into empty strings (""). None of the strdup variants do this. - However, p_strdup_empty() converts empty strings to NULLs. This caused a - NULL pointer dereference later on. - -M src/lib/event-filter-parser.y -M src/lib/event-filter.c - -2021-01-21 09:15:10 +0200 Aki Tuomi (9577b94d55) - - lib: test-lib - Free event filters - - Fixes memory leak - - Forgotten from 01ccf687d660331ca3e483c90582156757cebb7f - -M src/lib/test-event-filter-expr.c - -2021-01-19 13:46:13 -0500 Josef 'Jeff' Sipek (01ccf687d6) - - lib: event-filter - Implement filter boolean expression unit tests - - This is a exhaustive test of the boolean operators using field equality - comparisons. This test code focuses on the boolean operators (AND, OR, NOT) - and not on the comparison operators (=, <, >, <=, and >=) and their - arguments (event names, source locations, categories). - -M src/lib/Makefile.am -A src/lib/test-event-filter-expr.c -M src/lib/test-lib.inc - -2021-01-19 13:42:17 -0500 Josef 'Jeff' Sipek (7843020071) - - lib: event-filter - Correct a comment referring to old filter syntax - - -M src/lib/event-filter.c - -2021-01-19 13:41:45 -0500 Josef 'Jeff' Sipek (ae60143ac7) - - lib: event-filter - Add a helper function to get at the filter's boolean - expression - - This is necessary for the soon-to-be-implemented unit tests. - -M src/lib/event-filter-private.h -M src/lib/event-filter.c - -2021-01-19 13:40:17 -0500 Josef 'Jeff' Sipek (586b2386e4) - - lib: event-filter - Expose internal functions to allow for unit testing - - We'll need these to avoid code duplication when unit testing the boolean - expression evaluation logic. - -M src/lib/event-filter-private.h -M src/lib/event-filter.c - -2021-01-04 12:01:28 -0500 Josef 'Jeff' Sipek (abe9c7585d) - - lib: event-filter - Make NOT operator right associative and higher - precedence - - For example, consider the filter: - - event=* AND - NOT event=foo AND - NOT event=bar AND - NOT event=baz - - The "NOT" operator is supposed to be bound to the comparisons to the - immediate right. That is, it supposed to be equivalent to: - - event=* AND - (NOT event=foo) AND - (NOT event=bar) AND - (NOT event=baz) - - Both of these should produce the following parse tree: - - AND - AND - AND - EQ EVENT '*' - NOT - EQ EVENT 'foo' - NOT - EQ EVENT 'bar' - NOT - EQ EVENT 'baz' - - Instead, before this commit, the NOTs were getting bound to the entire - sub-expression to the right. Therefore, the original filter expression was - being parsed as if it were: - - event=* AND - NOT (event=foo AND - NOT (event=bar AND - NOT event=baz)) - - Which produced the following parse tree: - - AND - EQ EVENT '*' - NOT - AND - EQ EVENT 'foo' - NOT - AND - EQ EVENT 'bar' - NOT - EQ EVENT 'baz' - -M src/lib/event-filter-parser.y - -2021-01-14 20:31:18 +0100 Philippe Antoine (709727324b) - - lib-test: fuzzer - Don't crash in targets without ioloop - - -M src/lib-test/fuzzer.c - -2021-01-18 17:53:36 +0100 Timo Sirainen (93652abc5f) - - auth: Makefile.am - Use $(LIBDOVECOT_LUA) instead of redefining it - - -M src/auth/Makefile.am - -2021-01-18 17:53:07 +0100 Timo Sirainen (4d610d1664) - - auth: Fix building built-in lua - - It was working only when building as plugin. - -M src/auth/Makefile.am - -2021-01-18 13:46:55 +0100 Timo Sirainen (77702eda2b) - - lib: test-buffer - Fix memory leak errors in fatal buffer tests - - -M src/lib/test-buffer.c - -2021-01-18 13:46:46 +0100 Timo Sirainen (45c915ec94) - - lib-test: Add test_fatal_set_callback() - - -M src/lib-test/test-common.c -M src/lib-test/test-common.h - -2021-01-18 11:38:04 +0200 Aki Tuomi (2c84623c0a) - - lib-master: test-event-stats - Add test for large event id - - Ensure UPDATE command syntax is correct when event id is over 1 million - -M src/lib-master/test-event-stats.c - -2020-12-21 10:45:32 +0000 Siavash Tavakoli (141766b24f) - - indexer: Remove worker-specific request queue - - - Each request is done in a single connection and indexer master disconnects - from worker after indexing job is complete. - - No need to keep a worker queue since it always have length of 1. Instead, - keep a pointer to indexer_request for each worker connection. - - If indexing is in progress for a user, don't try to use the same - connection when a new request arrives for the same user. Instead, move the - request to the back of the queue and wait for the in progress request to - finish then create a new connection and submit request to worker. - -M src/indexer/indexer-queue.c -M src/indexer/indexer-queue.h -M src/indexer/indexer.c -M src/indexer/worker-connection.c -M src/indexer/worker-connection.h - -2020-12-20 19:45:09 +0000 Siavash Tavakoli (9466769ab6) - - indexer: Cleanup idle_list from worker pool - - - Indexer always disconnects from worker process, no need to keep a list of - idle processes. - - The callback already calls worker_pool_release_connection every time - worker updated percentage. Defer disconnecting from working to the callback. - It checks if the request is completed and destroys connection. - -M src/indexer/worker-connection.c -M src/indexer/worker-pool.c - -2020-12-14 21:39:39 +0000 Siavash Tavakoli (1e8fc75ecf) - - indexer: Disconnect from indexer-worker after each request - - This allows indexer-worker to properly handle service configurations such as - service_count and idle_kill time. - -M src/indexer/indexer-worker.c -M src/indexer/master-connection.c -M src/indexer/master-connection.h -M src/indexer/worker-connection.c - -2020-05-20 11:18:48 +0300 Timo Sirainen (0732cea98a) - - lib: array - Make sure it assert-crashes if trying to add more than UINT_MAX - elements - - This is required, because array_count() returns unsigned int. - -M src/lib/array.h -M src/lib/test-array.c - -2020-05-20 11:16:29 +0300 Timo Sirainen (024d6f96b8) - - lib: Add buffer_create_dynamic_max() - - -M src/lib/buffer.c -M src/lib/buffer.h -M src/lib/test-buffer.c -M src/lib/test-lib.inc - -2020-05-20 13:42:22 +0300 Timo Sirainen (d4ceac0f2a) - - lib: hash - Add assert to make sure hash table doesn't grow beyond UINT_MAX - nodes - - hash_table_count() returns unsigned int, so the node count can't be larger. - It's internally also tracked as unsigned int currently. It should be large - enough for all practical use cases. - -M src/lib/hash.c - -2020-12-17 17:48:37 -0500 Josef 'Jeff' Sipek (0da82cff36) - - auth: db-lua - Deref script in auth_lua_call_userdb_iterate_init() only once - - -M src/auth/db-lua.c - -2020-12-17 17:47:57 -0500 Josef 'Jeff' Sipek (650edc28f3) - - auth: db-lua - Deref script in auth_lua_call_userdb_lookup() only once - - -M src/auth/db-lua.c - -2020-12-17 17:47:03 -0500 Josef 'Jeff' Sipek (05a9dab949) - - auth: db-lua - Deref script in auth_lua_call_passdb_lookup() only once - - -M src/auth/db-lua.c - -2020-12-17 17:46:20 -0500 Josef 'Jeff' Sipek (724a9e18b1) - - auth: db-lua - Deref script in auth_lua_call_password_verify() only once - - -M src/auth/db-lua.c - -2020-12-17 17:44:16 -0500 Josef 'Jeff' Sipek (d556f2f4fe) - - auth: db-lua - Make auth_lua_dovecot_auth_register() take lua_State * - directly - - -M src/auth/db-lua.c - -2020-12-17 17:43:36 -0500 Josef 'Jeff' Sipek (1e85955b59) - - auth: db-lua - Make auth_lua_auth_request_register() take lua_State * - directly - - -M src/auth/db-lua.c - -2020-12-17 17:39:24 -0500 Josef 'Jeff' Sipek (4ea5c4ab95) - - auth: db-lua - Make auth_lua_call_lookup_finish() take lua_State * directly - - -M src/auth/db-lua.c - -2020-12-17 17:37:10 -0500 Josef 'Jeff' Sipek (5b48410b0f) - - auth: db-lua - Make auth_lua_export_passdb_table() take lua_State * directly - - -M src/auth/db-lua.c - -2020-12-17 17:35:21 -0500 Josef 'Jeff' Sipek (cf40467e30) - - auth: db-lua - Make auth_lua_call_lookup() take lua_State * directly - - -M src/auth/db-lua.c - -2020-12-17 17:32:50 -0500 Josef 'Jeff' Sipek (38fcb7885e) - - auth: db-lua - Make auth_lua_export_userdb_table() take lua_State * directly - - -M src/auth/db-lua.c - -2020-12-17 17:31:59 -0500 Josef 'Jeff' Sipek (86c185ed0c) - - auth: db-lua - Make auth_lua_export_table() take lua_State * directly - - -M src/auth/db-lua.c - -2020-12-17 17:30:38 -0500 Josef 'Jeff' Sipek (74a77410f1) - - auth: db-lua - Make auth_lua_push_auth_request() take lua_State * directly - - -M src/auth/db-lua.c - -2020-12-17 16:53:08 -0500 Josef 'Jeff' Sipek (4114a88fc2) - - auth: db-lua - Make lua methods and functions use the passed in lua_State * - directly - - -M src/auth/db-lua.c - -2020-12-17 16:50:50 -0500 Josef 'Jeff' Sipek (e2e7790dd5) - - auth: db-lua - Make auth_lua_check_auth_request() take lua_State * directly - - -M src/auth/db-lua.c - -2020-12-17 16:43:19 -0500 Josef 'Jeff' Sipek (4a1e9db35e) - - lib-lua: Use dlua_register() - - -M src/lib-lua/test-lua.c - -2020-12-17 16:41:21 -0500 Josef 'Jeff' Sipek (31570c8b44) - - lib-lua: Add dlua_register() - - -M src/lib-lua/dlua-script-private.h -M src/lib-lua/dlua-script.c - -2020-12-16 19:54:10 -0500 Josef 'Jeff' Sipek (d62387e4d2) - - lib-storage: Make lua methods and functions use the passed in lua_State * - directly - - -M src/lib-storage/mail-lua.c -M src/lib-storage/mail-user-lua.c - -2020-12-16 20:01:30 -0500 Josef 'Jeff' Sipek (56c07b8e2d) - - lib-storage: Make lua_storage_mail_user_set_metadata_unset() take lua_State - * directly - - -M src/lib-storage/mail-user-lua.c - -2020-12-16 19:59:13 -0500 Josef 'Jeff' Sipek (bee28ca65e) - - lib-storage: Make lua_check_storage_mail_user() take lua_State * directly - - -M src/lib-storage/mail-user-lua.c - -2020-12-16 19:51:57 -0500 Josef 'Jeff' Sipek (57bfc584f6) - - lib-storage: Make lua_check_storage_mail() take lua_State * directly - - -M src/lib-storage/mail-lua.c - -2020-12-17 13:07:52 -0500 Josef 'Jeff' Sipek (451be24cb2) - - lib-lua: Make dlua_dump_stack() take lua_State * directly - - -M src/lib-lua/dlua-script-private.h -M src/lib-lua/dlua-script.c - -2020-12-17 13:06:57 -0500 Josef 'Jeff' Sipek (8ec0595125) - - lib-lua: Move dlua_dump_stack() prototype to private header - - -M src/lib-lua/dlua-script-private.h -M src/lib-lua/dlua-script.h - -2020-12-17 13:00:10 -0500 Josef 'Jeff' Sipek (b693164bc7) - - lib-lua: Make dlua_check_event() take lua_State * directly - - -M src/lib-lua/dlua-dovecot.c -M src/lib-lua/dlua-script-private.h - -2020-12-17 13:00:00 -0500 Josef 'Jeff' Sipek (072e385983) - - lib-lua: Make dlua_push_event() take lua_State * directly - - -M src/auth/db-lua.c -M src/lib-lua/dlua-dovecot.c -M src/lib-lua/dlua-script-private.h - -2020-12-17 12:57:26 -0500 Josef 'Jeff' Sipek (5999db7250) - - lib-lua: Move dlua_{check,push}_event() prototypes to private header - - -M src/lib-lua/dlua-script-private.h -M src/lib-lua/dlua-script.h - -2020-12-17 12:55:25 -0500 Josef 'Jeff' Sipek (79e5cb9496) - - lib-lua: Make dlua_getdovecot() take lua_State * directly - - -M src/auth/db-lua.c -M src/lib-lua/dlua-dovecot.c -M src/lib-lua/dlua-script-private.h -M src/lib-storage/mail-storage-lua.c - -2020-12-17 12:53:44 -0500 Josef 'Jeff' Sipek (c753146df2) - - lib-lua: Make dlua_setmembers() take lua_State * directly - - -M src/auth/db-lua.c -M src/lib-lua/dlua-script-private.h -M src/lib-lua/dlua-script.c -M src/lib-storage/mail-storage-lua.c - -2020-12-16 19:23:13 -0500 Josef 'Jeff' Sipek (b093dd2ba1) - - lib-lua: Make lua methods and functions use the passed in lua_State * - directly - - -M src/lib-lua/dlua-dovecot.c - -2020-12-16 19:33:55 -0500 Josef 'Jeff' Sipek (baf231eb0e) - - lib-lua: Make dlua_push_event_passthrough() take lua_State * directly - - -M src/lib-lua/dlua-dovecot.c - -2020-12-16 19:32:19 -0500 Josef 'Jeff' Sipek (33aac3bd10) - - lib-lua: Make dlua_check_event_passthrough() take lua_State * directly - - -M src/lib-lua/dlua-dovecot.c - -2020-12-16 19:18:33 -0500 Josef 'Jeff' Sipek (fca6435452) - - lib-lua: Make dlua_event_log() take lua_State * directly - - -M src/lib-lua/dlua-dovecot.c - -2020-12-16 19:16:44 -0500 Josef 'Jeff' Sipek (f41f7aa669) - - lib-lua: Make dlua_get_file_line() take lua_State * directly - - -M src/lib-lua/dlua-dovecot.c - -2020-12-16 19:05:04 -0500 Josef 'Jeff' Sipek (2e60aba389) - - lib-lua: Make DLUA_REQUIRE_ARGS*() take the lua_State * directly - - This is the first in a series of commits that convert a number of functions - to pass around the lua_State pointer directly and to use it instead of using - the lua_State pointed to by the struct dlua_script. - - This change is needed to eventually support the 'yield' functionality and - "sequential looking, but async behind the scenes" lua scripts. To support - this, the C code needs to instantiate multiple lua_States and then operate - on the correct one - whichever one is passed back by the lua runtime. This - lays the ground work for that. - -M src/lib-lua/dlua-dovecot.c -M src/lib-lua/dlua-script-private.h -M src/lib-storage/mail-lua.c -M src/lib-storage/mail-user-lua.c -M src/lib-storage/mailbox-lua.c - -2021-01-13 12:54:09 +0200 Timo Sirainen (dbcd7610b5) - - imap: test-imap-client-hibernate - Remove dead assignment - - -M src/imap/test-imap-client-hibernate.c - -2020-10-09 21:07:40 +0200 Geert Hendrickx (f8ac63a3f2) - - util: dovecot-sysreport: Use "uname -n" instead of "hostname" for - portability - - hostname is not defined by POSIX, so not guaranteed to work. - -M src/util/dovecot-sysreport - -2020-12-23 12:50:33 +0000 Siavash Tavakoli (cf887a3250) - - lib-mail: mail-html2text: HTML entity lookup must be case-sensitive - - HTML entities are case-sensitive. - -M src/lib-mail/mail-html2text.c - -2020-01-30 13:50:30 +0200 Timo Sirainen (15fd25955e) - - lib-storage: Add unit test for mailbox-list error handling - - This is exactly the same test as what mail-storage has for its error - handling. - -M src/lib-storage/Makefile.am -M src/lib-storage/test-mail-storage.c -A src/lib-storage/test-mailbox-list.c - -2020-02-22 12:01:45 +0200 Timo Sirainen (369be49d06) - - lib-storage: test-mail-storage - Split overlong lines - - -M src/lib-storage/test-mail-storage.c - -2020-01-30 13:48:26 +0200 Timo Sirainen (6e0031ebf4) - - lib-storage: Change mailbox_list_set_error/critical() to work the same as - storage's - - The storage ones had various fixes to different situations. Just make the - mailbox list ones exactly the same to get the same fixes. - -M src/lib-storage/mailbox-list.c - -2020-01-24 13:50:50 +0200 Timo Sirainen (dde65e0ec9) - - lib-storage: mailbox_list_get_last_error() - Handle unexpected situations - better - - Change the logic to be similar as in mail_storage_get_last_error() if the - mail_error or error_string unexpectedly isn't set. - -M src/lib-storage/mailbox-list.c - -2020-10-22 22:49:56 +0300 Timo Sirainen (4735c12bb1) - - lib-storage: Detect corrupted mail size when calculating body size - - When body size is calculated from message size - header size, make sure that - the message size is at least as large as the header size. Otherwise treat - the message size as corrupted. - -M src/lib-storage/index/index-mail.c - -2020-11-22 19:16:03 +0000 Siavash Tavakoli (6d9008af1d) - - stats: openmetrics: Do not duplicate counter and duration metrics for - histograms - - Histograms generate "_count" and "_sum" metrics either for each quantile or - for the whole distribution. This patch prevents creating a duplicate metric - with type counter which results in metric name collision. - -M src/stats/stats-service-openmetrics.c - -2020-11-23 18:22:22 +0000 Manuel Rüger (ae678116a7) - - stats: Make exported metrics compliant with OpenMetrics standards - - Commit based on github PR: https://github.com/dovecot/core/pull/136 - - Fix issues raised by promtool and prometheus client library parser. Cleanup - and code fixes by Siavash Tavakoli. - -M src/stats/stats-service-openmetrics.c - -2020-12-22 13:23:45 +0200 Timo Sirainen (c98cf39bac) - - indexer, auth: Set indexer-worker and auth-worker services' type=worker - - -M src/auth/auth-settings.c -M src/indexer/indexer-worker-settings.c - -2020-12-21 21:24:50 +0200 Timo Sirainen (58aa56e033) - - lib-master, master: Add "worker" service type - - The worker services are expected to reach their process_limit regularly. - There shouldn't be a warning logged about temporarily reaching the limit, - since it can happen due to race conditions. - -M src/lib-master/service-settings.h -M src/master/master-settings.c -M src/master/service-monitor.c -M src/master/service-process.c -M src/master/service.h - -2020-12-21 21:23:32 +0200 Timo Sirainen (0a2428d9b1) - - master: Split off service_log_drop_warning() - - -M src/master/service-monitor.c - -2020-01-16 15:03:28 +0200 Timo Sirainen (6a267b61a6) - - master: Update comment to service_process.total_count - - It's not an exact value. Making it exact would require changing the IPC - protocol to master, which isn't worth it just for this. - -M src/master/service-process.h - -2020-01-16 14:58:21 +0200 Timo Sirainen (b95a60b44e) - - lib-master: Notify master immediately when process can accept more clients - - Instead of delaying it for 1 second. Otherwise the master might be - complaining about process/client limit being reached or creating more - processes unnecessarily. - -M src/lib-master/master-service.c - -2020-12-28 10:26:07 +0000 Siavash Tavakoli (96cae05285) - - lib-mail: message-snippet: Fix expected number of leading non-whitespace - chars - - If message body starts with a single char + space (e.g. "I am"), the space - is wrongly removed (i.e. snippet would be "Iam") because at least two - non-whitespace characters are expected. Fix the minimum to 1 to fix this. - -M src/lib-mail/message-snippet.c -M src/lib-mail/test-message-snippet.c - -2021-01-07 14:57:23 +0200 Aki Tuomi (225e2e040c) - - auth: Log failure before freeing up request - - The request got free'd before logging, causing use-after-free access. - - Broken in cec5a9c92d094d639c49bb83eeb9383ebb231c6f - -M src/auth/auth-request.c - -2020-12-09 01:31:30 +0000 Siavash Tavakoli (58668e1611) - - imap: cmd-setmetadata: Do not open mailbox - - Set metadata without actually opening the mailbox. - - As a side-effect this changes SETMETADATA command response when ACL rules - are present and user only has lookup right. For non-existing mailboxes, - command fails with "Mailbox doesn't exist" message instead of - "Permission denied" error. - -M src/imap/cmd-setmetadata.c - -2020-12-01 17:21:03 +0000 Siavash Tavakoli (51b5b63b75) - - imap: cmd-getmetadata: Retrieve metadata values without opening the mailbox - - No need to actually opening the mailbox, only check for its existence. This - also makes GETMETADATA command behave more in line with RFC 5464 when acls - are preset. Changes to command results for different cases: - - - User with only "l" right: - - for non-existing mailbox command failure error changed from "Permission - denied" - to "Mailbox doesn't exist" - - User with "l" right and one of "s", "w", "i", and "p" rights: - - for INBOX, command result changed from "Permission denied" failure to - "OK" - - for existing mailboxes, command result changed from "Permission denied" - failure to "OK" - - for non-existing mailboxes, command failure error changed from - "Permission denied" - to "Mailbox doesn't exist" - - for autocreated mailboxes, command result changed from "Permission - denied" - failure to "OK" - - User with "l" right and one of "x", "c", "d", and "a" rights: - - for non-existing mailboxes, command failure error changed from - "Permission denied" - to "Mailbox doesn't exist" - - User with only "r" right: - - for INBOX, command result changed from "OK" to "Mailbox doesn't exist" - - for existing mailboxes, command result changed from "OK" to "Mailbox - doesn't exist" - - for autocreated mailboxes, command result changed from "OK" to "Mailbox - doesn't exist" - -M src/imap/cmd-getmetadata.c - -2020-12-09 01:08:30 +0000 Siavash Tavakoli (f096b20f6f) - - imap: cmd-getmetadata: Do not ignore NOTFOUND and PERM when handling errors - - Don't ignore MAIL_ERROR_NOTFOUND MAIL_ERROR_PERM in - cmd_getmetadata_handle_error and fail GETMETADATA command properly. This - code was added in the initial GETMETADATA implementation commit. It doesn't - seem like it has ever done anything useful. - -M src/imap/cmd-getmetadata.c - -2020-12-01 17:23:31 +0000 Siavash Tavakoli (466bf85d64) - - doveadm mailbox metadata: Don't open mailbox for get and list commands - - -M src/doveadm/doveadm-mail-mailbox-metadata.c - -2020-12-16 10:08:11 +0000 Siavash Tavakoli (9dc72c3091) - - lib-storage: Move checking autocreated boxes to storage backends - - This allows acl plugin to check ACLs for autocreated mailboxes as well. - -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/index-storage.c -M src/lib-storage/index/maildir/maildir-storage.c -M src/lib-storage/index/pop3c/pop3c-storage.c -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/mail-storage.c - -2020-12-09 00:58:17 +0000 Siavash Tavakoli (2eec12bb32) - - lib-storage: index-attribute: Fix typo - - -M src/lib-storage/index/index-attribute.c - -2020-12-01 10:11:40 +0000 Siavash Tavakoli (2cbc917523) - - doveadm: doveadm-mail-mailbox-metadata: Add flag for prefixes in metadata - list - - Add an optional "-p" flag for metadata list command. Keys should have been - listed with "/private" or "/shared" prefixes from the get-go but for the - sake of not breaking users' workflow put this behind a flag. - -M src/doveadm/doveadm-mail-mailbox-metadata.c - -2020-12-16 16:50:43 +0200 Timo Sirainen (0eb35dc578) - - lib-mail: test-message-search - Avoid static analyzer warnings about NULL - pointers - - -M src/lib-mail/test-message-search.c - -2020-12-16 16:47:38 +0200 Timo Sirainen (41056265f7) - - dsync: Add assert to help static analyzers - - -M src/doveadm/dsync/dsync-mailbox-import.c - -2020-12-16 16:21:40 +0200 Timo Sirainen (46df1de0ec) - - cassandra: Fix error handling on SSL initialization failure - - -M src/lib-sql/driver-cassandra.c - -2021-01-11 11:04:57 +0200 Aki Tuomi (daa7f7d285) - - lib: istream-file,ostream-file - Mark close failure as unlikely - - File descriptor close failure is unlikely to happen. - -M src/lib/istream-file.c -M src/lib/ostream-file.c - -2020-12-21 11:51:36 +0200 Aki Tuomi (09a41a815b) - - lib: istream-file,ostream-file - Ignore ECONNRESET - - This happens e.g. on FreeBSD when closing a socket that has not been fully - flushed to client. Since we can't do anything about that, we might as well - just ignore it. - -M src/lib/istream-file.c -M src/lib/ostream-file.c - -2020-12-21 11:50:51 +0200 Aki Tuomi (921bb0008a) - - lib: fd-util - Ignore ECONNRESET when closing fd - - This happens e.g. on FreeBSD when closing a socket that has not been fully - flushed to client. Since we can't do anything about that, we might as well - just ignore it. - -M src/lib/fd-util.c - -2020-12-17 09:21:38 -0500 Josef 'Jeff' Sipek (d14330716a) - - lib-lua: Log an error when lua deinit function failed - - -M src/lib-lua/dlua-script.c - -2020-12-11 14:43:17 -0500 Josef 'Jeff' Sipek (3ef9218202) - - lib-lua: Move init/deinit function invocation into helper functions - - This moves them out of the way and keeps them close to each other. - -M src/lib-lua/dlua-script.c - -2020-12-10 16:22:20 -0500 Josef 'Jeff' Sipek (b95b0f34f7) - - lib-lua: Warn if threading was detected - - -M src/lib-lua/dlua-script.c - -2020-09-24 09:22:38 +0300 Aki Tuomi (64cd461ab6) - - lib-lua: Store script pointer in LUA_REGISTRY - - This will allow us to translate any lua thread to a script pointer. This is - not meant to allow multi-threaded lua scripts, but it is necessary to allow - yields to work. - -M src/lib-lua/dlua-script.c - -2020-12-30 10:05:17 +0000 Siavash Tavakoli (3ad00b770a) - - imap-hibernate: Add variable aliases - - Accept new aliases "local_ip" (="lip") and "remote_ip" (="rip") when - expanding variables. - -M src/imap-hibernate/imap-client.c - -2020-12-30 10:02:56 +0000 Siavash Tavakoli (754d5017a2) - - login-storage: Add variable aliases - - Accept new aliases "local_ip" (="lip") and "remote_ip" (="rip") when - expanding variables. - -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-user.c - -2020-12-30 10:00:43 +0000 Siavash Tavakoli (ef0d9b1945) - - login-common: Add variable aliases - - Accept new aliases such as "local_ip" (="lip") and "original_user" - (="orig_user"), etc. - -M src/login-common/client-common.c -M src/login-common/login-settings.c - -2020-12-29 11:18:32 +0200 Aki Tuomi (daea0c1078) - - .gitignore: Ignore fuzzers - - -M .gitignore - -2020-12-29 11:19:38 +0200 Aki Tuomi (171f2af20e) - - lib-imap: Add fuzz-imap-bodystructure - - -M src/lib-imap/Makefile.am -A src/lib-imap/fuzz-imap-bodystructure.c - -2020-09-11 15:02:57 +0300 Aki Tuomi (ec11aedaef) - - lib-mail: Add fuzz-message-parser - - Fuzzer for message parser - -M src/lib-mail/Makefile.am -A src/lib-mail/fuzz-message-parser.c - -2020-09-11 15:02:17 +0300 Aki Tuomi (d1bfe5ff51) - - AUTHORS: Add catena cyber - - -M AUTHORS - -2020-03-20 16:00:21 +0100 Philippe Antoine (9622c5646a) - - lib-smtp: Add fuzz target for smtp server - - -M src/lib-smtp/Makefile.am -A src/lib-smtp/fuzz-smtp-server.c - -2020-03-23 18:33:18 +0200 Timo Sirainen (62a53d17e7) - - lib-imap: Add fuzz-imap-utf7 - - -M src/lib-imap/Makefile.am -A src/lib-imap/fuzz-imap-utf7.c - -2020-03-23 18:29:16 +0200 Timo Sirainen (48114f39d8) - - lib-test: Add fuzzing framework - - -M src/lib-test/Makefile.am -A src/lib-test/fuzzer.c -A src/lib-test/fuzzer.h - -2020-03-23 18:28:34 +0200 Timo Sirainen (715d3aca5a) - - configure: Add --with-fuzzer=clang to use clang fuzzer - - -M configure.ac -M m4/dovecot.m4 - -2020-11-18 21:22:45 +0200 Timo Sirainen (a912198bdc) - - lib-imap: Fix writing BODYSTRUCTURE for truncated multipart/digest part - - Fixes error while parsing BODYSTRUCTURE: message_part message/rfc822 flag - doesn't match lines in BODYSTRUCTURE - -M src/lib-imap/imap-bodystructure.c -M src/lib-imap/test-imap-bodystructure.c - -2020-11-18 20:48:11 +0200 Timo Sirainen (ec2c5ffde7) - - lib-imap: Fix writing BODYSTRUCTURE for truncated multipart/ part - - If the max nesting limit is reached, write the last part out as - application/octet-stream. The original content-type could be confusing IMAP - clients when they don't see any child parts. - -M src/lib-imap/imap-bodystructure.c -M src/lib-imap/test-imap-bodystructure.c - -2020-11-18 18:55:34 +0200 Timo Sirainen (530c1e950a) - - lib-imap: Fix writing BODYSTRUCTURE for truncated message/rfc822 part - - If the max nesting limit is reached, write the last part out as - application/octet-stream instead of dummy message/rfc822. - - Fixes error while parsing BODYSTRUCTURE: message_part message/rfc822 flag - doesn't match BODYSTRUCTURE - -M src/lib-imap/imap-bodystructure.c -M src/lib-imap/test-imap-bodystructure.c - -2020-12-12 17:39:54 +0200 Aki Tuomi (93ce6ac94e) - - NEWS: Add news for 2.3.13 - - -M NEWS - -2020-09-11 10:57:51 +0300 Timo Sirainen (266e54b7b8) - - lib-imap: Don't generate invalid BODYSTRUCTURE when reaching MIME part limit - - If the last MIME part was message/rfc822 and its child was truncated away, - BODYSTRUCTURE was missing the ENVELOPE and BODY[STRUCTURE] parts. Fixed by - writing empty dummy ones. - -M src/lib-imap/imap-bodystructure.c - -2020-09-11 09:53:03 +0300 Timo Sirainen (fb97a1cddb) - - lib-mail: message-parser - Fix assert-crash when enforcing MIME part limit - - The limit could have been exceeded with message/rfc822 parts. - -M src/lib-mail/message-parser.c -M src/lib-mail/test-message-parser.c - -2020-08-24 19:12:21 +0300 Timo Sirainen (f8114a20e4) - - imap: Add unit test for imap-client-hibernate - - -M src/imap/Makefile.am -A src/imap/test-imap-client-hibernate.c - -2020-08-24 19:10:43 +0300 Timo Sirainen (1a27cfa8e3) - - imap: imap_client_hibernate() - Return reason string on failure - - This helps writing a unit test for it. - -M src/imap/cmd-idle.c -M src/imap/imap-client-hibernate.c -M src/imap/imap-client.h - -2020-08-24 19:10:10 +0300 Timo Sirainen (c7d158681f) - - imap: Delay initializing client IO until client_create_finish() - - This helps writing unit tests. - -M src/imap/imap-client.c - -2020-08-24 16:58:16 +0300 Timo Sirainen (73937b5fe7) - - imap: Fix crash if imap-hibernate socket can't be connected to - - The error was supposed to be returned to caller, not logged directly. - -M src/imap/imap-client-hibernate.c - -2020-08-17 18:33:20 +0300 Timo Sirainen (68165c8acc) - - imap: Escape tag when sending it to imap-hibernate process - - -M src/imap/imap-client-hibernate.c - -2020-08-17 18:26:01 +0300 Timo Sirainen (7a70f01fe8) - - lib-imap: Add imap_parser_client_read_tag() - - -M src/lib-imap/imap-parser.c -M src/lib-imap/imap-parser.h - -2020-08-17 18:22:42 +0300 Timo Sirainen (9d3ecff3de) - - imap-login: Use imap_parser_read_tag() and _read_command_name() - - -M src/imap-login/imap-login-client.c - -2020-08-17 18:15:35 +0300 Timo Sirainen (62061e8cf6) - - imap-login: Split off client_invalid_command() - - -M src/imap-login/imap-login-client.c - -2020-08-17 18:11:36 +0300 Timo Sirainen (0386140f61) - - imap: Use imap_parser_read_tag() and _read_command_name() - - -M src/imap/imap-client.c - -2020-08-17 17:59:19 +0300 Timo Sirainen (eea57c8683) - - imap: Split off client_command_failed_early() - - -M src/imap/imap-client.c - -2020-08-17 17:32:11 +0300 Timo Sirainen (b9a2f18466) - - lib-imap: Add imap_parser_read_tag() and _read_command_name() - - -M src/lib-imap/imap-parser.c -M src/lib-imap/imap-parser.h -M src/lib-imap/test-imap-parser.c - -2020-03-11 14:36:10 +0200 Timo Sirainen (6862dfcab9) - - lib-master: Add 5 second timeout when waiting for stats-writer handshake - - Previously the wait was infinite and nothing was logged, making it difficult - to know that the problem is with a hanging stats process. - -M src/lib-master/stats-client.c - -2020-12-22 10:22:38 +0200 Timo Sirainen (941668f5a0) - - lib-master, stats: Fix sending and parsing UPDATE commands - - These commands were parsed completely wrong, resulting in errors like: - - Client sent invalid input for UPDATE: Invalid tv_created: Invalid timeval - microseconds parameter - -M src/lib-master/stats-client.c -M src/lib-master/test-event-stats.c -M src/stats/client-writer.c - -2020-12-03 10:21:47 -0500 Josef 'Jeff' Sipek (4a07b3622a) - - lib-lua: Install libdovecot-lua binaries - - This turns this into a full-fledged library. This addresses the issue where - libdovecot-lua is completely included in anything that uses it, which caused - unnecessarily bloat and could have caused linker problems with multiple - definitions of the same symbol. - -M src/auth/Makefile.am -M src/lib-lua/Makefile.am - -2020-12-01 12:16:04 -0500 Josef 'Jeff' Sipek (ba7b64712e) - - lib-storage: Split off the mail user lua code - - Move the code into a separate file to mirror the native C code layout. - -M src/lib-storage/Makefile.am -M src/lib-storage/mail-storage-lua-private.h -M src/lib-storage/mail-storage-lua.c -A src/lib-storage/mail-user-lua.c - -2020-12-01 12:13:31 -0500 Josef 'Jeff' Sipek (53e62982d3) - - lib-storage: Split off the mailbox attribute lua code - - Move the code into a separate file to mirror the native C code layout. - -M src/lib-storage/Makefile.am -M src/lib-storage/mail-storage-lua.c -A src/lib-storage/mailbox-attribute-lua.c - -2020-12-01 12:05:59 -0500 Josef 'Jeff' Sipek (fcbf6da47f) - - lib-storage: Split off the struct mailbox lua code - - Move the code into a separate file to mirror the native C code layout. - -M src/lib-storage/Makefile.am -M src/lib-storage/mail-storage-lua-private.h -M src/lib-storage/mail-storage-lua.c -A src/lib-storage/mailbox-lua.c - -2020-12-01 11:47:26 -0500 Josef 'Jeff' Sipek (bf42611743) - - lib-storage: Split off the struct mail lua code - - Move the code into a separate file to mirror the native C code layout. - -M src/lib-storage/Makefile.am -A src/lib-storage/mail-lua.c -A src/lib-storage/mail-storage-lua-private.h -M src/lib-storage/mail-storage-lua.c - -2020-12-01 11:14:02 -0500 Josef 'Jeff' Sipek (bf1c270fa3) - - lib-storage: Move storage related lua code into libdovecot-storage-lua.la - - This keeps all the storage code in one place. - -M src/lib-storage/Makefile.am -R100 src/plugins/mail-lua/mail-storage-lua.c src/lib-storage/mail-storage-lua.c -R100 src/plugins/mail-lua/mail-storage-lua.h src/lib-storage/mail-storage-lua.h -M src/plugins/mail-lua/Makefile.am - -2020-11-16 20:55:14 +0100 Marvin W (2c57a92661) - - auth: db-lua - Fix invalid stack empty check - - 3e11b97 introduced assertions to ensure the lua stack is empty after - execution. In auth_lua_call_password_verify() this check was inserted - *before* popping the error message from the stack, ultimately causing the - assertion to fail every time the lua script has a runtime error, leading to - process crashing. - -M src/auth/db-lua.c - -2020-03-06 15:45:47 +0200 Josef 'Jeff' Sipek (0113cf0012) - - lib-storage: Remove cydir storage format support - - -M configure.ac -M src/lib-storage/Makefile.am -M src/lib-storage/index/Makefile.am -D src/lib-storage/index/cydir/Makefile.am -D src/lib-storage/index/cydir/cydir-mail.c -D src/lib-storage/index/cydir/cydir-save.c -D src/lib-storage/index/cydir/cydir-storage.c -D src/lib-storage/index/cydir/cydir-storage.h -D src/lib-storage/index/cydir/cydir-sync.c -D src/lib-storage/index/cydir/cydir-sync.h -M src/lib-storage/mail-storage-register.c - -2019-10-11 14:53:26 +0300 Timo Sirainen (5dc69d900a) - - lib-storage: Fix potential assert-crash fetching BODY[STRUCTURE] when mail's - size is cached wrong - - This happened only after mail's size was detected to be different than the - mail's cached size. - - Fixes: Panic: file index-mail.c: line 1140 (index_mail_parse_body_finish): - assertion failed: (mail->data.parts != NULL) - -M src/lib-storage/index/index-mail.c - -2020-12-09 09:42:19 -0500 Josef 'Jeff' Sipek (727f9adc5c) - - plugins: Remove expire plugin - - The autoexpunge functionality should be used instead. - -M configure.ac -M doc/example-config/dovecot-dict-sql.conf.ext -M doc/example-config/dovecot.conf -M src/plugins/Makefile.am -D src/plugins/expire/Makefile.am -D src/plugins/expire/doveadm-expire.c -D src/plugins/expire/expire-plugin.c -D src/plugins/expire/expire-plugin.h -D src/plugins/expire/expire-set.c -D src/plugins/expire/expire-set.h - -2020-12-09 09:20:54 -0500 Josef 'Jeff' Sipek (26a6a90baf) - - plugins: Remove mail-filter plugin - - -M configure.ac -M src/plugins/Makefile.am -D src/plugins/mail-filter/Makefile.am -D src/plugins/mail-filter/istream-ext-filter.c -D src/plugins/mail-filter/istream-ext-filter.h -D src/plugins/mail-filter/mail-filter-plugin.c -D src/plugins/mail-filter/mail-filter-plugin.h -D src/plugins/mail-filter/ostream-ext-filter.c -D src/plugins/mail-filter/ostream-ext-filter.h - -2020-12-09 09:32:29 -0500 Josef 'Jeff' Sipek (a02076a2c0) - - plugins: Remove snarf plugin - - -M configure.ac -M src/plugins/Makefile.am -D src/plugins/snarf/Makefile.am -D src/plugins/snarf/snarf-plugin.c -D src/plugins/snarf/snarf-plugin.h - -2020-12-09 09:50:10 -0500 Josef 'Jeff' Sipek (9d48f0dd05) - - plugins: Remove autocreate plugin - - Automatic mailbox creation should be done via the autocreate namespace - option. - -M configure.ac -M src/plugins/Makefile.am -D src/plugins/autocreate/Makefile.am -D src/plugins/autocreate/autocreate-plugin.c -D src/plugins/autocreate/autocreate-plugin.h - -2020-12-11 11:05:50 -0500 Josef 'Jeff' Sipek (4d731ccc49) - - lib-lua: Stop sharing lua states based on the script file name - - Instead of all instances of the same lua script sharing the same stack and - globals, make them completely separate instances. Removing this - optimization will make support of yielding possible. - -M src/lib-lua/dlua-script.c - -2020-12-11 11:22:44 -0500 Josef 'Jeff' Sipek (c9f42ff404) - - lib-lua: Use lua_register() instead of open-coding it - - -M src/lib-lua/test-lua.c - -2020-07-29 11:28:50 +0300 Aki Tuomi (89179afd2e) - - NEWS: Add NEWS for 2.3.11.3 - - -M NEWS - -2020-07-28 11:02:06 +0300 Aki Tuomi (6d8f355105) - - NEWS: Add NEWS for 2.3.11.2 - - -M NEWS - -2020-06-30 11:50:26 +0300 Aki Tuomi (c837ead073) - - NEWS: Add news for 2.3.11 - - -M NEWS - -2020-12-10 19:31:28 +0100 Timo Sirainen (ad8c186cc0) - - man: doveadm-proxy - Minor fixes to doveadm proxy kick - - -M doc/man/doveadm-proxy.1.in - -2020-12-09 09:43:42 +0200 Aki Tuomi (078dfa8fbf) - - lib: test-file-cache - Assert map is not null before memcmp - - -M src/lib/test-file-cache.c - -2020-12-08 09:51:30 +0200 Aki Tuomi (f2c15393f9) - - lib-mail: test-message-search - Assert ret - - Found by static analysis - -M src/lib-mail/test-message-search.c - -2020-12-08 09:45:20 +0200 Aki Tuomi (73b307d6ff) - - lib-mail: test-message-search - Assert that found value is not NULL - - Satisfies static analysers - -M src/lib-mail/test-message-search.c - -2020-12-08 09:42:13 +0200 Aki Tuomi (6d454342a8) - - lib-mail: test-message-decoder - Assert ret - - Found by static analysis - -M src/lib-mail/test-message-decoder.c - -2020-11-30 22:10:28 +0200 Timo Sirainen (8b750e924e) - - lib-storage: Fix potential assert-crash when fetching body snippet - - This happened only in a rather special condition. Added unit test to - reproduce it. - - Fixes: Panic: file message-part-data.c: line 28 - (message_part_data_is_plain_7bit): assertion failed: (data != NULL) - -M src/lib-storage/index/index-mail-headers.c -M src/lib-storage/test-mail.c - -2020-11-30 20:37:46 +0200 Timo Sirainen (67b6027028) - - lib-storage: Fix potential assert-crash when adding missing attachment flags - - This happened only in a rather special condition. Added unit test to - reproduce it. - - Fixes: Panic: file index-mail-headers.c: line 298 (index_mail_parse_header): - assertion failed: (part != NULL) - -M src/lib-storage/index/index-mail.c -M src/lib-storage/test-mail.c - -2020-12-07 13:09:50 +0200 Timo Sirainen (8b40060bf3) - - lib-dcrypt: istream-decrypt - Assert that max_buffer_size > 0 - - Otherwise all reads return -2, which will just result in assert-crash in - i_stream_read(). - -M src/lib-dcrypt/istream-decrypt.c - -2020-12-07 13:07:35 +0200 Timo Sirainen (103cb028e3) - - lib: istream-error - Set max_buffer_size - - Although nothing is actually read from the stream, some filter istreams - don't behave properly with max_buffer_size=0. Currently at least - istream-decrypt returns -2 for reads instead of -1. - - Fixes: Panic: file istream.c: line 320 (i_stream_read_memarea): assertion - failed: (_stream->skip != _stream->pos) - -M src/lib/istream.c - -2020-12-07 12:40:22 +0200 Timo Sirainen (200eb973c2) - - lib-storage: test_mail_storage_deinit() - Don't try to clear freed memory - - ctx was already freed. Trying to memset() into it will just result in - writing to already freed memory. - -M src/lib-storage/test-mail-storage-common.c - -2020-12-03 16:37:55 +0200 Aki Tuomi (4ba0954ca0) - - lib-oauth2: test-oauth2-jwt - Add tests for HS384 and HS512 - - -M src/lib-oauth2/test-oauth2-jwt.c - -2020-12-02 13:37:05 +0200 Aki Tuomi (530eb2cee2) - - lib-oauth2: Fix whitespace in test-oauth2-jwt.c - - -M src/lib-oauth2/test-oauth2-jwt.c - -2020-12-02 14:54:05 +0200 Aki Tuomi (1c6c689c1b) - - lib: test-hmac - Add tests for hmac sha384 - - -M src/lib/test-hmac.c - -2020-12-02 14:53:55 +0200 Aki Tuomi (6ae5b035ff) - - lib: test-hash-method - Add tests for sha2 - - -M src/lib/test-hash-method.c - -2020-12-02 14:53:39 +0200 Aki Tuomi (79bc83dad7) - - lib: hash-method - Add sha384 support - - -M src/lib/hash-method.c -M src/lib/sha-common.h -M src/lib/sha2.c -M src/lib/sha2.h - -2020-12-02 14:37:02 +0200 Aki Tuomi (c424c9054e) - - lib: Fix whitespace in sha2.c - - -M src/lib/sha2.c - -2020-11-24 10:20:05 -0500 Downtown Allday (bcfd1071f3) - - lib: test-hmac - Add HMAC 512 test - - -M src/lib/test-hmac.c - -2020-12-03 16:33:06 +0200 Aki Tuomi (df5989562f) - - lib: hmac - Support different hash algorithms - - Code was hardcoded for MD4,MD5,SHA-1. - -M src/lib/hmac.c - -2020-11-24 10:19:43 -0500 Downtown Allday (0acf019110) - - lib: hmac - Adjust HMAC_MAX_CONTEXT_SIZE to accommodate HMAC512 - - -M src/lib/hmac.h - -2020-12-03 16:28:40 +0200 Aki Tuomi (7381c12be2) - - lib: hash-method - Add block size - - This is needed for HMAC - -M src/lib/hash-method.c -M src/lib/hash-method.h -M src/lib/md4.c -M src/lib/md5.c -M src/lib/sha1.c -M src/lib/sha2.c -M src/lib/sha3.c - -2020-12-03 16:24:52 +0200 Aki Tuomi (d111a18e6c) - - lib: hash-method - Use named initializers - - -M src/lib/hash-method.c -M src/lib/md4.c -M src/lib/md5.c -M src/lib/sha1.c -M src/lib/sha2.c -M src/lib/sha3.c - -2020-06-05 21:29:44 +0200 Stephan Bosch (512739f51f) - - lib-oauth2: Remove unused include from oauth2.c. - - -M src/lib-oauth2/oauth2.c - -2020-06-05 21:16:58 +0200 Stephan Bosch (905a944955) - - lib-oauth2: Make oauth2_request_set_headers() static. - - -M src/lib-oauth2/oauth2-private.h -M src/lib-oauth2/oauth2-request.c - -2020-06-05 21:13:39 +0200 Stephan Bosch (d33c15dcfe) - - lib-oauth2: Rename oauth2_request_free_internal() to oauth2_request_free(). - - And make it static. - -M src/lib-oauth2/oauth2-private.h -M src/lib-oauth2/oauth2-request.c - -2020-06-05 21:06:30 +0200 Stephan Bosch (6d0f74d0db) - - lib-oauth2: Rename oauth2_parse_json() to oauth2_request_parse_json(). - - -M src/lib-oauth2/oauth2-private.h -M src/lib-oauth2/oauth2-request.c -M src/lib-oauth2/test-oauth2-json.c - -2020-06-05 21:15:47 +0200 Stephan Bosch (cd3b73910f) - - lib-oauth2: Move oauth2_request_set_headers() to oauth2-request.c. - - -M src/lib-oauth2/oauth2-request.c -M src/lib-oauth2/oauth2.c - -2020-06-05 21:11:20 +0200 Stephan Bosch (febd427325) - - lib-oauth2: Move oauth2_request_abort() to oauth2-request.c. - - -M src/lib-oauth2/oauth2-request.c -M src/lib-oauth2/oauth2.c - -2020-06-05 21:09:39 +0200 Stephan Bosch (a08d19b449) - - lib-oauth2: Move oauth2_request_free_internal() to oauth2-request.c. - - -M src/lib-oauth2/oauth2-request.c -M src/lib-oauth2/oauth2.c - -2020-06-05 21:00:03 +0200 Stephan Bosch (72db70205f) - - lib-oauth2: Move oauth2_parse_json() to oauth2-request.c. - - -M src/lib-oauth2/oauth2-request.c -M src/lib-oauth2/oauth2.c - -2020-06-05 20:51:34 +0200 Stephan Bosch (d61b5dc49f) - - lib-oauth2: Reformat test-oauth2-jwt.c. - - -M src/auth/db-oauth2.c -M src/lib-oauth2/test-oauth2-jwt.c - -2020-06-05 20:51:19 +0200 Stephan Bosch (19dd872008) - - lib-oauth2: Reformat oauth2-jwt.c. - - -M src/lib-oauth2/oauth2-jwt.c - -2020-06-05 20:50:55 +0200 Stephan Bosch (0cd5624352) - - lib-oauth2: Reformat oauth2-key-cache.c. - - -M src/lib-oauth2/oauth2-key-cache.c - -2020-06-05 20:50:34 +0200 Stephan Bosch (ec0ed35e30) - - lib-oauth2: Reformat oauth2-request.c. - - -M src/lib-oauth2/oauth2-request.c - -2020-06-05 20:49:34 +0200 Stephan Bosch (e2e5d906dc) - - lib-oauth2: Reformat oauth2.c. - - -M src/lib-oauth2/oauth2.c - -2020-06-05 20:49:58 +0200 Stephan Bosch (eba983d328) - - lib-oauth2: Reformat oauth2-private.h. - - -M src/lib-oauth2/oauth2-private.h - -2020-06-05 20:49:09 +0200 Stephan Bosch (c599bd5cca) - - lib-oauth2: Reformat oauth2.h. - - -M src/lib-oauth2/oauth2.h - -2020-05-27 01:49:52 +0300 Timo Sirainen (f3ec003404) - - auth: db-oauth2 - Add consistent prefix for all error messages - - -M src/auth/db-oauth2.c - -2020-05-27 01:36:41 +0300 Timo Sirainen (cb327481b1) - - auth: db-oauth2 - Fix debug logging - - Don't log a debug message when the callback is going to be logging exactly - the same message as info/error. - -M src/auth/db-oauth2.c - -2020-05-27 01:25:41 +0300 Timo Sirainen (98988c187e) - - auth: db-oauth2 - Call db_oauth2_lookup_continue_valid() after valid grant - - No need to check for error/validity again in db_oauth2_lookup_continue(). - -M src/auth/db-oauth2.c - -2020-05-27 01:22:13 +0300 Timo Sirainen (8d07269115) - - auth: db-oauth2 - db_oauth2_lookup_continue() - Minor cleanup to avoid - variables - - -M src/auth/db-oauth2.c - -2020-05-27 01:20:36 +0300 Timo Sirainen (be894aaf8b) - - auth: db-oauth2 - Split off db_oauth2_lookup_continue_valid() - - -M src/auth/db-oauth2.c - -2020-05-27 01:03:44 +0300 Timo Sirainen (34f9f30799) - - auth: db-oauth2 - db_oauth2_lookup_passwd_grant() - Reorder error handling - code flow - - -M src/auth/db-oauth2.c - -2020-05-27 01:03:11 +0300 Timo Sirainen (c29ebbaf0f) - - auth: db-oauth2 - Improve "Internal error" message for grant lookups - - -M src/auth/db-oauth2.c - -2020-05-27 00:59:49 +0300 Timo Sirainen (e0895ff34c) - - auth: db-oauth2 - Add and use db_oauth2_field_find() - - -M src/auth/db-oauth2.c - -2020-05-27 00:57:24 +0300 Timo Sirainen (06157f5331) - - auth: db-oauth2 - Don't set db_oauth2_request.token for grant lookups - - The grant lookup sets the token. There's no need to set it before that. - -M src/auth/db-oauth2.c - -2020-05-27 00:50:07 +0300 Timo Sirainen (fd15e2e61f) - - auth: db-oauth2 - db_oauth2_lookup_passwd_grant() - Reorder code flow - - No behavioral changes. - -M src/auth/db-oauth2.c - -2020-05-27 00:44:16 +0300 Timo Sirainen (062b6fa34d) - - auth: db-oauth2 - Refactor "OAuth2 token missing from reply" code path - - It can be NULL only when coming from db_oauth2_lookup_passwd_grant(), so - handle it there. - -M src/auth/db-oauth2.c - -2020-05-27 00:36:44 +0300 Timo Sirainen (72e4a833ed) - - auth: db-oauth2 - db_oauth2_template_export() - Make var_expand() error - handling consistent - - Other var_expand() errors include the original string in the error message, - so this one should also. - -M src/auth/db-oauth2.c - -2020-05-27 00:30:45 +0300 Timo Sirainen (2cb1fde47e) - - lib-oauth2: Improve error message when server returns unexpected result - - If the result isn't 2xx or 4xx, use the HTTP response message as the error - message. - -M src/lib-oauth2/oauth2-request.c - -2020-05-27 00:27:15 +0300 Timo Sirainen (1455a6fa77) - - lib-oauth2: Don't fail if oauth response payload is NULL - - oauth2_parse_json() is happy with with empty payload (Content-Length: 0), so - it should be happy also when payload is NULL (Content-Length is missing). - -M src/lib-oauth2/oauth2-request.c - -2020-05-27 00:21:24 +0300 Timo Sirainen (a434131fea) - - lib-oauth2: Remove unused oauth2-passwd-grant.c - - -D src/lib-oauth2/oauth2-passwd-grant.c - -2020-05-27 00:19:42 +0300 Timo Sirainen (f2755d5188) - - lib-oauth2, auth: Remove redundant oauth2_request_result.success - - success is the same as (error == NULL) - -M src/auth/db-oauth2.c -M src/lib-oauth2/oauth2-request.c -M src/lib-oauth2/oauth2.h - -2020-05-27 00:12:49 +0300 Timo Sirainen (7db7eb3caa) - - lib-oauth2: json_parsed_cb() - Remove redundant success parameter - - success is the same as (error == NULL) - -M src/lib-oauth2/oauth2-private.h -M src/lib-oauth2/oauth2-request.c -M src/lib-oauth2/oauth2.c -M src/lib-oauth2/test-oauth2-json.c - -2020-10-01 16:02:26 +0300 Timo Sirainen (aad5e2d5ec) - - fs-compress: Use istream-decompress - - -M src/plugins/fs-compress/fs-compress.c - -2020-10-01 15:59:37 +0300 Timo Sirainen (fbe6a63b53) - - lib-compression: Fix detecting if input is bzip2 compressed - - The detection was broken at least for empty bzip2 input. - -M src/lib-compression/compression.c -M src/lib-compression/test-compression.c - -2020-10-01 15:36:08 +0300 Timo Sirainen (8b6142f9ba) - - lib-compression: Add istream-decompress - - This stream detects the compression format and creates the proper istream - afterwards. This is more efficient than creating each compression istream - and using istream-try. - -M src/lib-compression/Makefile.am -M src/lib-compression/compression.h -A src/lib-compression/istream-decompress.c -M src/lib-compression/test-compression.c - -2020-11-19 17:50:22 +0200 Timo Sirainen (d680014059) - - lib-storage: Add test-mail unit test - - Initially it just accesses the mail randomly. - -M src/lib-storage/Makefile.am -A src/lib-storage/test-mail.c - -2020-11-19 15:56:17 +0200 Timo Sirainen (b5c3c78594) - - mail-crypt: test-mail-crypt - Use test-mail-storage API - - -M src/plugins/mail-crypt/test-mail-key.c - -2020-11-19 15:37:54 +0200 Timo Sirainen (9d40291c59) - - lib-storage: Add a public test-mail-storage-common.h API - - Moved the public functions into test-mail-storage-common.c - -M src/lib-storage/Makefile.am -A src/lib-storage/test-mail-storage-common.c -A src/lib-storage/test-mail-storage-common.h -M src/lib-storage/test-mail-storage.c - -2020-11-19 16:13:53 +0200 Timo Sirainen (4c75927a47) - - lib-storage: test-mail-storage - Die on test_mail_init_user() failure - - This way the caller won't need to do error handling. The errors were being - handled inconsistently. - -M src/lib-storage/test-mail-storage.c - -2020-11-19 15:35:07 +0200 Timo Sirainen (c34c37f8de) - - lib-storage: test-mail-storage - Remove randomness from test home directory - - Also rename test_mail_storage_ctx.mail_home to home_root to better describe - it. - -M src/lib-storage/test-mail-storage.c - -2020-11-19 15:32:20 +0200 Timo Sirainen (8dd863cf2e) - - lib-storage: test-mail-storage - Change test_mail_init() to allocate the - struct - - -M src/lib-storage/test-mail-storage.c - -2020-11-19 15:29:01 +0200 Timo Sirainen (56845ea6a3) - - lib-storage: test-mail-storage - Use settings struct for - test_mail_init_user() - - -M src/lib-storage/test-mail-storage.c - -2020-10-22 12:22:40 +0300 Timo Sirainen (8299232acb) - - lib: i_stream_read() - Don't create empty snapshots - - This allows the read() implementation to read data into the existing - memarea. Otherwise a new memarea might have to be created because the old - one is referenced by the snapshot. - -M src/lib/istream.c - -2020-10-29 13:35:35 +0200 Timo Sirainen (bfb013491a) - - imap: Process title wrongly shows connections are "corked" - - The flush callback in ostream-file always corks the connection, so the - process title needs to be delayed until it's no longer in that callback. Add - a 0-timeout to update the process title. - -M src/imap/imap-client.c -M src/imap/imap-common.h -M src/imap/main.c - -2020-11-25 11:03:57 -0500 Josef 'Jeff' Sipek (dd8f5d776e) - - lib-lua: Rewrite arg checking macros to use STMT_{START,END} - - This makes it safer to use. Additionally, this commit adds some newlines to - the macro definition to make it more readable. - -M src/lib-lua/dlua-script-private.h - -2020-11-10 16:10:05 +0200 Timo Sirainen (30c453c8d9) - - login-proxy: Use persistent istream buffers - - Constantly freeing and allocating the memory is a bit slow, but because - Dovecot allocates all memory with calloc() the memory cleaing is especially - slow. With this change proxying lots of data in a plaintext connection takes - about 50% less CPU. The downside is that it uses about 4 kB more memory per - istream (8 kB total, for both client and server connections), but that - shouldn't be too bad for proxies since they don't use much memory otherwise. - -M src/login-common/login-proxy.c - -2020-12-02 06:06:59 +0200 Martti Rannanjärvi (e2f3a23190) - - lib-mail: test-istream-qp-decoder.c - Free input_data_limited - - -M src/lib-mail/test-istream-qp-decoder.c - -2020-12-01 10:25:09 +0100 Stephan Bosch (043d111cea) - - lib-http: http-client-request - Fix payload assertions in - http_client_request_send_more(). - - When the request payload is finished, both req->payload_input and - req->payload_output could be NULL, so the assertions on those being not NULL - need to happen after the check for req->payload_finished. - - This particularly causes problems with the blocking - http_client_request_send/finish_payload() API, which constantly modifies - req->payload_input and sets it to NULL to finish the output. - - This caused a panic: - - Panic: file http-client-request.c: line 1232 - (http_client_request_send_more): assertion failed: (req->payload_input != - NULL) - -M src/lib-http/http-client-request.c - -2018-04-04 15:18:51 +0200 Stephan Bosch (3d9e01ccb2) - - lib-http: test-http-payload - Add test for blocking client output payload. - - -M src/lib-http/test-http-payload.c - -2018-04-04 03:02:24 +0200 Stephan Bosch (e3b3155131) - - lib-http: test-http-payload - Implement reference counting for client - request. - - -M src/lib-http/test-http-payload.c - -2020-06-27 18:48:40 +0200 Stephan Bosch (7a853719d6) - - lib-http: Reformat http-client-request.c. - - -M src/lib-http/http-client-request.c - -2020-02-25 13:08:21 +0200 Martti Rannanjärvi (15a4c057eb) - - notify: Free notify_mail_txn when a plugin does not define - mail_transaction_commit - - -M src/plugins/notify/notify-plugin.c - -2020-11-06 11:47:18 +0100 Markus Valentin (362ebb22c1) - - lib-mail: Add tests for message-size functions - - Integrate testing of header and body size to existing tests and add new - tests specifically for message-size. - -M src/lib-mail/Makefile.am -M src/lib-mail/test-message-header-parser.c -M src/lib-mail/test-message-parser.c -A src/lib-mail/test-message-size.c - -2020-11-09 12:35:09 +0100 Markus Valentin (c06349db1c) - - lib-mail: Extend quoted-printable encoding tests - - -M src/lib-mail/test-istream-qp-encoder.c -M src/lib-mail/test-qp-encoder.c - -2020-11-04 14:38:10 +0100 Markus Valentin (e3b45a1e30) - - lib-mail: Extend quoted-printable decoding tests - - -M src/lib-mail/test-istream-qp-decoder.c -M src/lib-mail/test-qp-decoder.c -M src/lib-mail/test-quoted-printable.c - -2020-11-19 13:30:54 +0100 Markus Valentin (78b86e7859) - - lib-mail: qp-encoder: Ensure trailing white space is followed by printable - - In case a qp-encoded line ends with space or tab append a soft line break to - prevent white space being cut off by decoding instance. - -M src/lib-mail/qp-encoder.c - -2020-11-19 15:32:00 +0200 Aki Tuomi (12d3ac4d88) - - lib-mail: test-message-parser - Convert to signed when calculating variance - - Satisfies runtime analyser, broken in 6b60e5ed490 - -M src/lib-mail/test-message-parser.c - -2020-11-18 09:43:07 +0200 Aki Tuomi (2e100e4531) - - lib-mail: message-decoder - Fix CTE parser to accept only syntaxically valid - values - - -M src/lib-mail/message-decoder.c -M src/lib-mail/test-message-decoder.c - -2020-11-17 09:29:30 +0200 Aki Tuomi (0f3bbb5bf4) - - lib-mail: test-rfc822-parser - Add tests for content-type full parsing - - -M src/lib-mail/test-rfc822-parser.c - -2020-11-18 09:31:03 +0200 Aki Tuomi (49aab3624e) - - lib-mail: message-decoder - Constify message_decoder_parse_cte parameter - - -M src/lib-mail/message-decoder.c -M src/lib-mail/message-decoder.h - -2020-11-16 16:20:30 +0200 Aki Tuomi (e29c697e03) - - lib-mail: rfc822-parser - Fix content-type parser to accept only valid - values - - -M src/lib-mail/rfc822-parser.c -M src/lib-mail/test-rfc822-parser.c - -2020-10-29 12:55:21 +0200 Timo Sirainen (6fad5cd6fc) - - imap: Fix potential hang if client disconnects with pipelined ambiguous - commands - - For example if client pipelines FETCH+LOGOUT commands and disconnects during - a large FETCH output, the LOGOUT command is processed as waiting for - unambiguity. This code path however doesn't detect a client disconnection, - and input IO handler is removed so it can't detect it either. So the imap - process hangs. - -M src/imap/imap-client.c - -2020-10-29 12:52:16 +0200 Timo Sirainen (4eb35e2268) - - imap: Move disconnected-check inside client_continue_pending_input() - - This way all of its callers don't have to check if the client is - disconnected. - -M src/imap/cmd-append.c -M src/imap/cmd-idle.c -M src/imap/imap-client.c -M src/imap/imap-search.c -M src/imap/main.c - -2020-11-19 11:00:43 +0200 Timo Sirainen (e540d0dda6) - - lib-storage: Update comments about mail_search_args_init() and refcount - handling - - -M src/lib-storage/mail-search.h - -2020-11-23 12:17:52 +0000 Siavash Tavakoli (8582882204) - - doveadm: Add timestamp prefixes for debug output - - But still allow overriding from env by setting LOG_STDERR_TIMESTAMP. - -M src/doveadm/doveadm.c - -2020-11-23 18:15:57 +0200 Timo Sirainen (6b0a59f00c) - - lib-dict: dict_iterate() - Fix segfault with DICT_ITERATE_FLAG_NO_VALUE - - Broken by cf0d196c2b373a37bc1ab4e10fde89fb61089f3c - -M src/lib-dict/dict.c - -2020-11-23 16:49:49 +0200 Timo Sirainen (ca225869b1) - - dict-cdb: Fix to use new dict.iterate() API - - Forgot in 65b7f04f945781cd042f5ad2f6f104f532143ee7 - -M src/lib-dict-backend/dict-cdb.c - -2019-11-22 01:17:32 +0000 rofl0r (090feba9c3) - - m4: size_t_signed.m4 - use static assertion instead of run test - - a small step towards cross-compile-ability. - -M m4/size_t_signed.m4 - -2020-08-10 20:18:48 +0300 Timo Sirainen (26fe1e277c) - - lib-index: Improve debug logging - - -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-write.c -M src/lib-index/mail-transaction-log.c - -2020-08-10 20:16:30 +0300 Timo Sirainen (f2a0fe95ed) - - lib-index: Handle rapidly rotating transaction logs without unnecessary fsck - - -M src/lib-index/mail-index-map-read.c - -2020-08-10 18:00:09 +0300 Timo Sirainen (83a06c785f) - - lib-index: mail_index_reopen_if_changed() - Add reopened_r parameter - - -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index.c - -2020-08-10 17:53:08 +0300 Timo Sirainen (5c45509554) - - lib-index: mail_index_sync_map() - Move corruption handling to caller - - -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-sync-private.h -M src/lib-index/mail-index-sync-update.c - -2020-08-10 17:45:08 +0300 Timo Sirainen (264f583a46) - - lib-index: mail_index_map_latest_sync() - Minor refactoring - - -M src/lib-index/mail-index-map-read.c - -2020-08-10 17:43:50 +0300 Timo Sirainen (dd5ee8e233) - - lib-index: Split off mail_index_map_latest_sync() - - -M src/lib-index/mail-index-map-read.c - -2020-08-10 17:33:07 +0300 Timo Sirainen (32ab929a9d) - - lib-index: mail_index_sync_map() - Always return -1 on I/O failures - - Even though with force=FALSE in theory it would be possible to work around - it, but more likely it will just cause another I/O error. This simplifies - the code for the following changes. - -M src/lib-index/mail-index-sync-update.c - -2020-08-10 17:31:27 +0300 Timo Sirainen (050668ef37) - - lib-index: Move calling mail_index_sync_map_want_index_reopen() to - mail_index_map() - - -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-sync-private.h -M src/lib-index/mail-index-sync-update.c - -2020-08-10 17:29:44 +0300 Timo Sirainen (efc9c13e73) - - lib-index: Split off mail_index_sync_map_want_index_reopen() - - -M src/lib-index/mail-index-sync-update.c - -2020-08-10 20:02:22 +0300 Timo Sirainen (268de25bd4) - - lib-index: mail_transaction_log_indexid_changed() - Clarify refcount - handling - - Although the old code worked as well, it wasn't so obvious since the - behavior was slightly different when the log->head had extra references. - Clarify the behavior by always unreferencing after the new log file is - created. - -M src/lib-index/mail-transaction-log.c - -2020-08-10 20:09:41 +0300 Timo Sirainen (9f46e634c0) - - lib-index: mail_transaction_log_file_free() - Assert that refcount=0 - - -M src/lib-index/mail-transaction-log-file.c - -2020-08-10 19:59:36 +0300 Timo Sirainen (f388a47038) - - lib-index: mail_index_write() - Make sure index is rewritten after log - rotation - - Otherwise the index will point to .log.2 file, which could become deleted - before the index is rewritten again. - -M src/lib-index/Makefile.am -M src/lib-index/mail-index-write.c -A src/lib-index/test-mail-index-write.c - -2020-08-10 19:54:55 +0300 Timo Sirainen (8eea1e5c8c) - - lib-index: mail_transaction_log_view_set() - Make sure log files aren't - freed too early - - It's possible that mail_transaction_log_find_file() frees one of the files - that are already in the linked list. Avoid it by referencing the file - immediately when it's added to the list. - -M src/lib-index/mail-transaction-log-view.c -M src/lib-index/test-mail-transaction-log-view.c - -2020-11-12 18:01:18 +0200 Timo Sirainen (8e6fab92e6) - - lib-index: test-mail-transaction-log-view - Move - test_transaction_log_file_add() - - -M src/lib-index/test-mail-transaction-log-view.c - -2020-08-10 17:12:32 +0300 Timo Sirainen (327da2aa8a) - - lib-index: mail_transaction_log_view_set() - Return -1 only on I/O error - - The callers that care about the difference: - - * mail_index_sync_map() already assumes that -1 means I/O error - * mail_index_sync_set_log_view() handles 0 by logging an error and fscking - the index, which is likely better than just returning failure. - * view_sync_set_log_view_range()'s caller handles 0 by rebuilding the - missing changes in memory. So returning 0 makes it work better. - * dsync_log_set() and mailbox_get_expunges_init() have fallbacks for - handling 0, while -1 would just return an error. - -M src/lib-index/mail-transaction-log-view.c -M src/lib-index/mail-transaction-log.h -M src/lib-index/test-mail-transaction-log-view.c - -2020-08-10 17:06:05 +0300 Timo Sirainen (39e2477b7c) - - lib-index: mail_transaction_log_file_get_highest_modseq_at() - Separate I/O - errors from corruption - - -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log-view.c -M src/lib-index/test-mail-transaction-log-file.c -M src/lib-index/test-mail-transaction-log-view.c - -2020-11-13 19:30:29 +0200 Timo Sirainen (2aedf5afa7) - - lib: Add data_stack_get_used_size() - - Mainly for debugging purposes. - -M src/lib/data-stack.c -M src/lib/data-stack.h - -2020-11-17 17:26:28 +0200 Timo Sirainen (a13d1c6c23) - - doveadm dict iter: Support printing multiple values - - -M src/doveadm/doveadm-dict.c - -2020-11-17 14:41:31 +0200 Timo Sirainen (bd6caf4f54) - - dict-sql: Support dict_iterate_values() - - -M src/lib-dict-backend/dict-sql.c - -2020-11-17 14:24:57 +0200 Timo Sirainen (1c4cef0099) - - dict, dict-client: Support dict_iterate_values() - - This doesn't change the dict client protocol in an incompatible way, so it's - possible to mix old/new client/server. - -M src/dict/dict-commands.c -M src/lib-dict/dict-client.c - -2020-11-17 14:20:40 +0200 Timo Sirainen (cf0d196c2b) - - lib-dict: Add dict_iterate_values() - - -M src/lib-dict/dict.c -M src/lib-dict/dict.h - -2020-11-17 14:09:30 +0200 Timo Sirainen (65b7f04f94) - - lib-dict: Change dict.iterate() API to support returning multiple values - - This requires changes to all dict drivers. - -M src/lib-dict-backend/dict-sql.c -M src/lib-dict-extra/dict-fs.c -M src/lib-dict/dict-client.c -M src/lib-dict/dict-fail.c -M src/lib-dict/dict-file.c -M src/lib-dict/dict-private.h -M src/lib-dict/dict.c - -2020-11-17 14:30:27 +0200 Timo Sirainen (028f46875b) - - lib-dict: dict_iterate() - Always return NULL if DICT_ITERATE_FLAG_NO_VALUE - is used - - This way it behaves more consistently across backends. - -M src/lib-dict-backend/dict-sql.c -M src/lib-dict-extra/dict-fs.c -M src/lib-dict/dict-private.h -M src/lib-dict/dict.c - -2020-11-20 12:52:47 +0100 Markus Valentin (0d9e962605) - - doveadm: mail: doveadm_mail_failed_error() - Set specific exit code for - MAIL_ERROR_INUSE - - Set exit code DOVEADM_EX_NOTPOSSIBLE in case MAIL_ERROR_INUSE is set via - doveadm_mail_failed_error(). This exit code is used to indicate that a - operation cannot be done because another session prevents it. - -M src/doveadm/doveadm-mail.c - -2020-11-20 12:15:18 +0200 Timo Sirainen (4b93cff3d8) - - doveadm: When sending server logs to client, make sure ioloop isn't set to - NULL - - This could have happened if there was any logging done outside command - handling. For example a doveadm command used http-client, which has a - timeout that triggers logging only after the command is finished. - - Fixes segfault and: Panic: file http-client.c: line 642 - (http_client_context_close): assertion failed: (cctx->clients_list == NULL) - -M src/doveadm/client-connection-tcp.c - -2020-11-20 12:23:21 -0500 Josef 'Jeff' Sipek (2dac245580) - - lib-lua: Don't add system libs to libdovecot_lua_la_DEPENDENCIES - - This confuses the build system, causing it to think that it needs to build - those. This manifests itself as: - - make: *** No rule to make target '-L/usr/lib/x86_64-linux-gnu', needed by - 'libdovecot-lua.la'. Stop. - -M src/lib-lua/Makefile.am - -2020-11-19 22:07:37 +0200 sergey.kitov (4f4cb20134) - - imap: Fix memory leak in get_expunges_fallback() - - -M src/imap/imap-fetch.c - -2020-09-11 16:06:46 +0300 Aki Tuomi (8d52452a58) - - lib: test-file-cache - Use memcmp - - Data is not null-terminated, so use memcmp. - -M src/lib/test-file-cache.c - -2020-09-11 14:11:55 +0300 Aki Tuomi (5c49871511) - - lib: test-file-cache - Assert map value - - Satisfies static analyser - -M src/lib/test-file-cache.c - -2020-11-12 14:15:54 -0500 Josef 'Jeff' Sipek (2434131b41) - - lib: event-filter-parser - Test simple but invalid input - - -M src/lib/test-event-filter-parser.c - -2020-11-12 13:49:49 -0500 Josef 'Jeff' Sipek (a19514bbd3) - - lib: event-filter - Do not assert that there in no output on error - - When the input is a simple (but invalid) expression (e.g., a=b=c) the output - variable may be set. This is perfectly fine. - - The assertion (and the associated failure) come from when event filter - parsing was switched to the new filter syntax - (fcba1d530737813de11d9d730d5db6496e2e574b). - -M src/lib/event-filter.c - -2020-10-19 13:47:10 -0400 Josef 'Jeff' Sipek (bfe9533c2e) - - stats: openmetrics - Include submetric name only when present - - Otherwise we SIGSEGV. - -M src/stats/stats-service-openmetrics.c - -2020-11-11 00:11:35 +0200 Timo Sirainen (7a6f9517c5) - - dsync: Fix UID renumbering when GUIDs aren't used - - Mails that have local UIDs won't be in import_uids hash table, so they're - not otherwise being iterated at the end and checked if they need - renumbering. - -M src/doveadm/dsync/dsync-mailbox-import.c - -2020-11-10 19:57:26 +0200 Timo Sirainen (68685ba621) - - dsync: Incremental sync sometimes missed messages when GUIDs weren't - available - - GUIDs aren't available when using imapc, so this affected migrations. - -M src/doveadm/dsync/dsync-mailbox-import.c - -2020-11-09 09:04:36 +0200 Aki Tuomi (0725865f9c) - - .gitignore: Ignore coverage and temp files - - -M .gitignore - -2020-11-05 12:08:38 +0200 Aki Tuomi (6139812246) - - lib-mail: test-message-part-serialize - Add tests - - -M src/lib-mail/Makefile.am -A src/lib-mail/test-message-part-serialize.c - -2020-11-04 15:10:04 +0200 Aki Tuomi (9f94c71897) - - lib-mail: test-message-header-parser - Validate header value - - -M src/lib-mail/test-message-header-parser.c - -2020-11-04 15:09:45 +0200 Aki Tuomi (8ce92ceb22) - - lib-mail: test-message-header-parser - Test NUL bytes in header - - -M src/lib-mail/test-message-header-parser.c - -2020-11-04 12:35:16 +0200 Aki Tuomi (2b602c96e4) - - lib-mail: test-message-header-decode - Add more tests - - -M src/lib-mail/test-message-header-decode.c - -2020-11-04 12:34:57 +0200 Aki Tuomi (fcf197ebcc) - - lib-mail: test-message-header-decode - Use libcharset - - Otherwise we can only test utf-8 - -M src/lib-mail/Makefile.am -M src/lib-mail/test-message-header-decode.c - -2020-11-03 15:17:45 +0200 Aki Tuomi (b3713a072d) - - lib-mail: test-message-search - Add more message searching tests - - -M src/lib-mail/test-message-search.c - -2020-11-02 20:59:18 +0200 Aki Tuomi (3490e6b472) - - lib-mail: test-mail-user-hash - Add tests for mail_user_hash - - -M src/lib-mail/Makefile.am -A src/lib-mail/test-mail-user-hash.c - -2020-11-02 20:06:28 +0200 Aki Tuomi (f0ff6527a0) - - lib-mail: test-message-decoder - Add charset conversion test - - -M src/lib-mail/test-message-decoder.c - -2020-11-02 18:38:32 +0200 Aki Tuomi (233081353c) - - lib-mail: test-message-decoder - Test Content-Transfer-Encoding - - -M src/lib-mail/test-message-decoder.c - -2020-11-02 13:46:12 +0200 Aki Tuomi (6b60e5ed49) - - lib-mail: test-message-parser - Add tests for MIME-Version header - - -M src/lib-mail/test-message-parser.c - -2020-11-09 09:29:26 +0200 Aki Tuomi (3c137ff3ad) - - lib-mail: test-* - Add missing test_assert - - Need to ensure stream did not fail during parsing. - -M src/lib-mail/test-message-decoder.c -M src/lib-mail/test-message-parser.c -M src/lib-mail/test-message-part.c - -2020-11-09 09:22:28 +0200 Aki Tuomi (8f8558f6d0) - - lib-mail: test-message-parser - Use message_part_is_equal - - Replace msg_parts_cmp with message_part_is_equal. - -M src/lib-mail/test-message-parser.c - -2020-11-02 13:15:24 +0200 Aki Tuomi (fd7711d150) - - lib-mail: test-message-parser - Refactor message parsing to utility function - - Makes next changes easier. - -M src/lib-mail/test-message-parser.c - -2020-11-09 09:16:27 +0200 Aki Tuomi (34a2b76343) - - lib-mail: Add message_part_is_equal - - Returns TRUE if two parts are equal. - -M src/lib-mail/message-part.c -M src/lib-mail/message-part.h - -2020-11-11 11:09:02 +0200 Timo Sirainen (7c14211f94) - - configure.ac: Finish removing vpopmail support - - -M configure.ac - -2020-10-27 15:12:19 +0200 Timo Sirainen (12da020f5f) - - lib-storage: Add prefix to failed mailbox list index rebuild error messages - - This makes it clearer that the failure is happening because index was being - rebuilt. - -M src/lib-storage/list/mailbox-list-index.c - -2020-10-27 15:13:39 +0200 Timo Sirainen (152214f576) - - lib-storage: Fix error message when mailbox list index rebuild fails - - The error needs to be copied to mailbox_list, otherwise it's just - "Unknown internal list error". - -M src/lib-storage/list/mailbox-list-index.c - -2020-10-27 15:11:12 +0200 Timo Sirainen (80de9f5b66) - - lib-storage: Fix mailbox list iteration error handling for INBOX - - If INBOX isn't in the first namespace, the error wasn't correctly set for - it. - -M src/lib-storage/list/mailbox-list-iter.c - -2020-10-27 15:08:15 +0200 Timo Sirainen (2fbc6c3478) - - lib-storage: Use mailbox_get_last_mail_error() for mailbox_get_path_to() - errors - - mailbox_list_get_last_error() happens to work currently, but it's - accidental. - -M src/lib-storage/index/index-storage.c - -2020-11-02 18:55:16 +0200 Timo Sirainen (58f5d604b5) - - lib-index: Fix detecting if index is undeleted - - It was possible that mail_index_is_deleted() kept returning that the index - was deleted, even if it was marked as undeleted. This happened when the - deletion was in dovecot.index.log.2, undeletion in dovecot.index.log and - dovecot.index pointed to the .log.2 file. This caused the .log file to be - read first, which sees the undeletion. Later on the .log.2 was parsed and it - marked the index back as deleted. - -M src/lib-index/mail-index-private.h -M src/lib-index/mail-transaction-log-file.c - -2020-11-10 01:30:06 +0200 Timo Sirainen (1a96ec2fae) - - lib-fts: Avoid NULL pointer arithmetic - - Even though it was only doing +0. Fixes: runtime error: applying zero offset - to null pointer - -M src/lib-fts/fts-tokenizer-generic.c -M src/lib-fts/fts-tokenizer.c - -2020-11-09 18:10:21 +0200 Timo Sirainen (8e65d366a2) - - lib-smtp: smtp_address_init_from_msg() - Avoid implicit char to unsigned - char conversion - - Fixes calling smtp_char_is_qpair() with ubsan: runtime error: implicit - conversion from type 'char' of value -61 (8-bit, signed) to type 'unsigned - char' changed the value to 195 (8-bit, unsigned) - -M src/lib-smtp/smtp-address.c - -2020-11-09 17:52:51 +0200 Timo Sirainen (ddf77cf384) - - lib-index: Add explicit wrapping to 8bit variable increments - - Fixes ubsan errors: runtime error: implicit conversion from type 'int' of - value 256 (32-bit, signed) to type 'uint8_t' (aka 'unsigned char') changed - the value to 0 (8-bit, unsigned) - -M src/lib-index/mail-cache-lookup.c -M src/lib-index/mail-cache-purge.c - -2020-11-09 17:38:26 +0200 Timo Sirainen (e416d0c6f9) - - lib: istream-concat - Avoid NULL pointer arithmetic - - Even though it was only doing +0. Fixes: runtime error: applying zero offset - to null pointer - -M src/lib/istream-concat.c - -2020-11-09 17:35:15 +0200 Timo Sirainen (73ade3503a) - - lib: istream-chain - Avoid NULL pointer arithmetic - - Even though it was only doing +0. Fixes: runtime error: applying zero offset - to null pointer - -M src/lib/istream-chain.c - -2020-11-09 16:55:06 +0200 Timo Sirainen (ec07ca4262) - - lib: MODULE_CONTEXT_SET*() - Avoid NULL pointer arithmetic - - Even though it was only doing +0. Fixes: runtime error: applying zero offset - to null pointer - -M src/lib/module-context.h - -2020-11-09 16:09:05 +0200 Timo Sirainen (7068d53e8d) - - lib: Add and use TYPE_CHECKS() macro to standardize type checking for - functions - - This helps especially to avoid adding COMPILE_ERROR_*() macros to NULL - pointers, which results in ubsan errors: runtime error: applying zero offset - to null pointer - - These changes also remove the use of gcc-specific ({...}) code in the - macros, making them slightly more portable. - -M src/lib/array.h -M src/lib/buffer.h -M src/lib/hash.h -M src/lib/macros.h - -2020-11-09 15:39:57 +0200 Timo Sirainen (876a22a195) - - lib: COMPILE_ERROR_IF_TRUE() - Return FALSE instead of 0 - - This will be needed for the following changes to avoid warnings with - -Wstrict-bool. - -M src/lib/macros.h - -2020-11-09 13:04:43 +0200 Timo Sirainen (ce132c38c1) - - lib-fs: fs_file_init_parent() - Keep mode and flags parameters separated - - Internally cast them both to (int) before ORing them together for the - fs_file_init_with_event() call. - - This avoids compiler warnings with -Wenum-enum-conversion: warning: bitwise - operation between different enumeration types ('enum fs_open_mode' and 'enum - fs_open_flags') - -M src/lib-fs/fs-api-private.h -M src/lib-fs/fs-api.c -M src/lib-fs/fs-metawrap.c -M src/lib-fs/fs-randomfail.c -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c -M src/plugins/fs-compress/fs-compress.c -M src/plugins/mail-crypt/fs-crypt-common.c - -2020-10-23 16:24:09 -0400 Josef 'Jeff' Sipek (bf7952d33e) - - auth: Remove ntlm mechanism & the LANMAN and NTLM password schemes - - -M COPYING -M configure.ac -M src/Makefile.am -M src/auth/Makefile.am -D src/auth/mech-ntlm.c -M src/auth/mech.c -M src/auth/password-scheme.c -M src/auth/test-libpassword.c -M src/auth/test-mech.c -M src/doveadm/Makefile.am -D src/lib-ntlm/Makefile.am -D src/lib-ntlm/ntlm-des.c -D src/lib-ntlm/ntlm-des.h -D src/lib-ntlm/ntlm-encrypt.c -D src/lib-ntlm/ntlm-encrypt.h -D src/lib-ntlm/ntlm-flags.h -D src/lib-ntlm/ntlm-message.c -D src/lib-ntlm/ntlm-message.h -D src/lib-ntlm/ntlm-types.h -D src/lib-ntlm/ntlm.h - -2020-10-16 09:18:31 -0400 Josef 'Jeff' Sipek (d3d02fdd71) - - auth: Remove vpopmail user & pass db support - - -M configure.ac -M doc/example-config/conf.d/10-auth.conf -M doc/example-config/conf.d/Makefile.am -D doc/example-config/conf.d/auth-vpopmail.conf.ext -D m4/want_vpopmail.m4 -M src/auth/Makefile.am -M src/auth/db-checkpassword.c -D src/auth/passdb-vpopmail.c -M src/auth/passdb.c -D src/auth/userdb-vpopmail.c -D src/auth/userdb-vpopmail.h -M src/auth/userdb.c -M src/master/main.c - -2020-10-16 09:01:19 -0400 Josef 'Jeff' Sipek (8b5f5f78e2) - - auth: Remove S/Key mechanism & password scheme - - -M doc/example-config/conf.d/10-auth.conf -M src/auth/Makefile.am -M src/auth/main.c -R089 src/auth/mech-otp-skey-common.c src/auth/mech-otp-common.c -R074 src/auth/mech-otp-skey-common.h src/auth/mech-otp-common.h -M src/auth/mech-otp.c -D src/auth/mech-skey.c -M src/auth/mech.c -M src/auth/password-scheme.c -M src/auth/test-libpassword.c -M src/auth/test-mech.c - -2020-10-16 08:50:21 -0400 Josef 'Jeff' Sipek (01ad604b77) - - auth: Remove RPA mechanism & password scheme - - -M src/auth/Makefile.am -D src/auth/mech-rpa.c -M src/auth/mech.c -D src/auth/password-scheme-rpa.c -M src/auth/password-scheme.c -M src/auth/password-scheme.h -M src/auth/test-libpassword.c -M src/auth/test-mech.c - -2020-10-16 08:31:34 -0400 Josef 'Jeff' Sipek (37af563917) - - auth: Remove postmap socket type - - -M src/auth/main.c - -2020-10-16 08:28:12 -0400 Josef 'Jeff' Sipek (0cf4e1e13c) - - auth: Remove support for SIA passdb - - -M configure.ac -D m4/want_sia.m4 -M src/auth/Makefile.am -D src/auth/passdb-sia.c -M src/auth/passdb.c - -2020-10-23 10:56:08 -0400 Josef 'Jeff' Sipek (7eaf9b0c6d) - - lib: Be less verbose in event filter tests - - Only print the input string if the test failed. - -M src/lib/test-event-filter-parser.c - -2020-10-27 23:16:44 +0100 Stephan Bosch (184a9526e5) - - lib-smtp: smtp-server-connection - Make sure output stream errors are - handled. - - -M src/lib-smtp/smtp-server-connection.c - -2020-10-26 10:19:46 +0100 Stephan Bosch (75ab810591) - - lib-ssl-iosteam: ostream-openssl - Make sure error on plaintext streams is - propagated. - - -M src/lib-ssl-iostream/iostream-openssl.c -M src/lib-ssl-iostream/iostream-openssl.h -M src/lib-ssl-iostream/ostream-openssl.c - -2020-10-26 22:04:53 +0100 Stephan Bosch (5b4e8e9819) - - lib-ssl-iostrea: ostream-openssl - Add local variable for ssl_io in - o_stream_ssl_flush_buffer(). - - -M src/lib-ssl-iostream/ostream-openssl.c - -2020-11-05 13:25:19 +0200 Aki Tuomi (98798b85a1) - - auth: db-oauth2 - Do not allow empty active_value or active_attribute, when - other is set - - -M src/auth/db-oauth2.c - -2020-10-29 11:37:22 +0200 Aki Tuomi (0ce1f34957) - - auth: db-oauth2 - If active attribute is present in request, check it - - If the attribute is missing, do not assume it's false. - -M src/auth/db-oauth2.c - -2020-10-29 11:36:00 +0200 Aki Tuomi (3330dbe12b) - - auth: db-oauth2 - Check active attribute by default - - -M src/auth/db-oauth2.c - -2020-10-22 11:42:23 +0300 Aki Tuomi (fd8ae5027a) - - auth: db-oauth2 - Change active:false to mean invalid token - - Specifications say that invalid token, expired token and any other reason - why the token can be considered invalid should return - {"active":false} reply with no other fields. - - Thus, we need to consider this as invalid token. - -M src/auth/db-oauth2.c - -2020-10-22 11:41:16 +0300 Aki Tuomi (bec575990c) - - auth: db-oauth2 - Allow active:false without username - - -M src/auth/db-oauth2.c - -2020-10-13 17:34:12 +0300 sergey.kitov (17813e78b0) - - lib-storage: Skip setting log view in mailbox_get_expunges_init when - box->view is outdated. - - This fixes assert-crash when IMAP client uses QRESYNC and lots of changes - happen between syncing points. - - Fixes: Panic: file mail-transaction-log-view.c: line 144 - (mail_transaction_log_view_set): assertion failed: (min_file_seq <= - max_file_seq) - -M src/lib-storage/mailbox-get.c - -2020-10-29 12:34:57 +0200 Timo Sirainen (28301c44d0) - - lib-fts: test-fts-filter - Fix clang suspicious concatenation of string - literals warning - - Fixes: warning: suspicious concatenation of string literals in an array - initialization; did you mean to separate the elements with a comma? - [-Wstring-concatenation] - -M src/lib-fts/test-fts-filter.c - -2020-10-29 12:33:14 +0200 Timo Sirainen (9e72e39d52) - - lib: Standardize STMT_BEGIN and STMT_END - - do .. while(0) should work everywhere. - - This also fixes warnings given by new clang: warning: '}' and ')' tokens - terminating statement expression appear in different macro expansion - contexts [-Wcompound-token-split-by-macro] - -M src/lib/macros.h - -2020-10-29 12:32:44 +0200 Timo Sirainen (e7342877f8) - - lib: test-istream - Don't try to return void - - -M src/lib/test-istream.c - -2020-10-28 12:45:09 +0200 Aki Tuomi (05a491eebb) - - lib: test-file-cache - Add asserts for initial return value of - file_cache_get - - -M src/lib/test-file-cache.c - -2020-10-28 12:23:40 +0200 Aki Tuomi (57c63983d9) - - lib-lda: Update mail sizes to event only if they are known - - -M src/lib-lda/mail-deliver.c - -2020-10-28 12:22:58 +0200 Aki Tuomi (edb32ea0e8) - - lib-storage: raw-mail - Cast st_size to uoff_t - - mbox->size is unsigned field, and st_size will be -1 is the stat target is - not regular file or symbolic link. This can happen if it's stream like - stdin. - -M src/lib-storage/index/raw/raw-mail.c - -2020-10-23 14:54:22 +0300 Timo Sirainen (005a3d3b52) - - lib-fs: iteration - Fix crash when overwriting iteration error - - Can't use fs_file_path() because file is NULL. Instead, add the path to - struct fs_iter directly so it can be used in the error. - - Broken by eaaf40ca4e8994824abff89fc617c3cc737d83a5 - -M src/lib-fs/fs-api-private.h -M src/lib-fs/fs-api.c - -2020-10-22 20:21:41 +0300 Aki Tuomi (7a97dfb74f) - - quota: Avoid implicit integer conversion to unsigned in quota calculation - - Deducting negative number from unsigned integer causes signed integer - conversion to unsigned int, which results a too large positive number. Do - calculations using int64 instead. - - This did not cause any visible problems, found by clang integer - sanitization. - -M src/plugins/quota/quota.c - -2020-10-22 18:53:34 +0300 Aki Tuomi (408a4323ac) - - global: Fix overzealous use of ENUM_NEGATE - - -M src/lib-index/mail-transaction-log-file.c -M src/lib-ssl-iostream/iostream-openssl-context.c - -2020-10-22 22:46:35 +0300 Timo Sirainen (d1808bf2dd) - - lib: istream-seekable - Fix returning stream size - - The returned size may have been truncated. - -M src/lib/istream-seekable.c -M src/lib/test-istream-seekable.c - -2020-10-16 11:21:51 +0300 Timo Sirainen (966140ac53) - - lib-fs: Add assert to make sure we never log "(null)" as the old error - - -M src/lib-fs/fs-api.c - -2020-10-16 11:20:04 +0300 Timo Sirainen (8a094bf121) - - lib-fs: Fix logging old error when an unlogged error is replaced by new - error - - The old error was logged as "(null)" if the error happened in a non-root - (filter) file. - -M src/lib-fs/fs-api.c - -2020-10-16 10:19:59 +0300 Timo Sirainen (eaaf40ca4e) - - lib-fs: Include file's path when logging pending error messages - - Otherwise it may not be known which file the error is about. - - This happens when a file is freed without the last error being logged. Also - when an unlogged error is being replaced with a new error. - -M src/lib-fs/fs-api.c - -2020-09-24 13:44:58 -0400 Josef 'Jeff' Sipek (23645222de) - - lib: event-filter-parser - Disallow non-equals comparators on non-fields - - Non-equals comparisons (<, <=, >, and >=) aren't well defined for anything - other than fields. Therefore, if we encounter one of these comparators with - an event name, category name, or source location, we should error out and - avoid confusing the user. - -M src/lib/event-filter-parser.y -M src/lib/test-event-filter-parser.c - -2020-10-15 20:34:05 +0300 Timo Sirainen (81e2119bf7) - - lib-storage: Delay recreating event when closing mail - - If the mail isn't reused, the event is unnecessary. - -M src/lib-storage/index/index-mail.c - -2020-10-19 13:49:29 +0300 Aki Tuomi (fb6aa64435) - - global: Explicitly wrap values to fit target - - -M src/lib-compression/test-compression.c -M src/lib-imap/imap-utf7.c -M src/lib/base64.c -M src/lib/test-array.c -M src/lib/test-data-stack.c -M src/lib/test-istream-concat.c -M src/lib/test-istream-seekable.c - -2020-09-01 09:44:04 +0300 Aki Tuomi (48b2c8cfaf) - - global: Add explicit casts where needed - - Squash implicit conversion complains from sanitizer. - -M src/auth/crypt-blowfish.c -M src/lib-index/mail-index-sync-keywords.c -M src/lib-index/mail-index-sync-update.c -M src/lib-lua/dlua-dovecot.c -M src/lib-master/master-service.c -M src/lib-storage/index/mbox/mbox-sync-rewrite.c -M src/lib-storage/index/mbox/mbox-sync-update.c -M src/lib-storage/index/mbox/mbox-sync.c -M src/lib/test-array.c -M src/lib/test-failures.c -M src/lib/test-unichar.c - -2020-08-13 11:36:08 +0300 Aki Tuomi (fd35a7baa7) - - global: Disable undefined behaviour sanitization for select locations - - -M src/auth/crypt-blowfish.c -M src/lib-http/http-client-peer.c -M src/lib-otp/otp-parse.c -M src/lib/bits.h -M src/lib/buffer.c -M src/lib/data-stack.c -M src/lib/hash.c -M src/lib/md4.c -M src/lib/md5.c -M src/lib/strnum.c -M src/lib/test-bits.c - -2020-08-20 08:39:26 +0300 Aki Tuomi (f4cca6a5c6) - - global: Fix negation with constants to match target type - - -M src/doveadm/doveadm-dump-log.c -M src/lib-index/mail-cache-transaction.c -M src/lib-index/mail-index-private.h -M src/lib-index/mail-index-sync-update.c -M src/lib-index/mail-index-util.c -M src/lib-storage/index/index-mail.h -M src/lib-storage/index/mbox/mbox-lock.c -M src/lib-storage/list/mailbox-list-index-notify.c -M src/lib/hash.c -M src/lib/md4.c -M src/lib/md5.c -M src/lib/test-bits.c -M src/plugins/fts-squat/squat-uidlist.c - -2020-08-20 08:35:59 +0300 Aki Tuomi (4684a4a0e8) - - global: Use ENUM_NEGATE() macro where necessary - - -M src/auth/auth-fields.c -M src/doveadm/doveadm-dump-index.c -M src/doveadm/doveadm-mail-mailbox-cache.c -M src/doveadm/doveadm-mail-mailbox-status.c -M src/doveadm/dsync/dsync-brain.c -M src/doveadm/dsync/dsync-ibc-stream.c -M src/doveadm/dsync/dsync-transaction-log-scan.c -M src/imap-login/imap-proxy.c -M src/imap/cmd-list.c -M src/imap/imap-search.c -M src/imap/imap-sync.c -M src/lib-dict-backend/dict-cdb.c -M src/lib-fs/fs-api.c -M src/lib-fs/fs-metawrap.c -M src/lib-index/mail-cache-decisions.c -M src/lib-index/mail-cache-fields.c -M src/lib-index/mail-cache-purge.c -M src/lib-index/mail-cache-transaction.c -M src/lib-index/mail-index-map-hdr.c -M src/lib-index/mail-index-sync-update.c -M src/lib-index/mail-index-sync.c -M src/lib-index/mail-index-transaction-update.c -M src/lib-index/mail-index-transaction-view.c -M src/lib-index/mail-index-view-sync.c -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-view.c -M src/lib-index/test-mail-cache-purge.c -M src/lib-index/test-mail-index-transaction-update.c -M src/lib-mail/message-decoder.c -M src/lib-mail/message-parser.c -M src/lib-smtp/smtp-server-connection.c -M src/lib-ssl-iostream/iostream-openssl-context.c -M src/lib-storage/index/cydir/cydir-save.c -M src/lib-storage/index/cydir/cydir-storage.c -M src/lib-storage/index/dbox-common/dbox-save.c -M src/lib-storage/index/dbox-multi/mdbox-mail.c -M src/lib-storage/index/dbox-multi/mdbox-storage.c -M src/lib-storage/index/dbox-single/sdbox-copy.c -M src/lib-storage/index/dbox-single/sdbox-storage.c -M src/lib-storage/index/imapc/imapc-list.c -M src/lib-storage/index/imapc/imapc-mail-fetch.c -M src/lib-storage/index/imapc/imapc-mailbox.c -M src/lib-storage/index/imapc/imapc-save.c -M src/lib-storage/index/imapc/imapc-storage.c -M src/lib-storage/index/index-mail-headers.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-search.c -M src/lib-storage/index/index-status.c -M src/lib-storage/index/index-storage.c -M src/lib-storage/index/maildir/maildir-filename-flags.c -M src/lib-storage/index/maildir/maildir-mail.c -M src/lib-storage/index/maildir/maildir-save.c -M src/lib-storage/index/maildir/maildir-sync-index.c -M src/lib-storage/index/maildir/maildir-uidlist.c -M src/lib-storage/index/mbox/mbox-save.c -M src/lib-storage/index/mbox/mbox-sync-update.c -M src/lib-storage/index/mbox/mbox-sync.c -M src/lib-storage/index/pop3c/pop3c-storage.c -M src/lib-storage/index/raw/raw-storage.c -M src/lib-storage/list/mailbox-list-fs-iter.c -M src/lib-storage/list/mailbox-list-index-backend.c -M src/lib-storage/list/mailbox-list-index-iter.c -M src/lib-storage/list/mailbox-list-index-status.c -M src/lib-storage/list/mailbox-list-index-sync.c -M src/lib-storage/list/mailbox-list-index.c -M src/lib-storage/list/mailbox-list-iter.c -M src/lib-storage/list/mailbox-list-maildir-iter.c -M src/lib-storage/list/mailbox-list-subscriptions.c -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage.c -M src/lib-storage/mailbox-attribute.c -M src/lib/askpass.c -M src/lib/fd-util.c -M src/lib/ioloop-poll.c -M src/lib/iostream-temp.c -M src/lib/net.c -M src/plugins/acl/acl-cache.c -M src/plugins/acl/acl-mailbox-list.c -M src/plugins/acl/acl-mailbox.c -M src/plugins/fs-compress/fs-compress.c -M src/plugins/fts-lucene/fts-backend-lucene.c -M src/plugins/fts-solr/fts-backend-solr.c -M src/plugins/lazy-expunge/lazy-expunge-plugin.c -M src/plugins/mail-crypt/fs-crypt-common.c -M src/plugins/quota/quota-storage.c -M src/plugins/replication/replication-plugin.c -M src/plugins/virtual/virtual-storage.c -M src/plugins/virtual/virtual-sync.c -M src/util/rawlog.c - -2020-09-23 14:51:53 +0300 Aki Tuomi (38a1c8fc8d) - - global: Use UOFF_T_MAX instead of (uoff_t)-1 - - -M src/anvil/anvil-settings.c -M src/auth/auth-settings.c -M src/config/config-settings.c -M src/dict/dict-settings.c -M src/director/director-settings.c -M src/dns/dns-client-settings.c -M src/doveadm/doveadm-settings.c -M src/doveadm/dsync/dsync-mail.h -M src/doveadm/dsync/dsync-mailbox-export.c -M src/doveadm/dsync/dsync-mailbox-import.c -M src/doveadm/dsync/dsync-transaction-log-scan.c -M src/imap-hibernate/imap-hibernate-settings.c -M src/imap-login/imap-login-settings.c -M src/imap-urlauth/imap-urlauth-login-settings.c -M src/imap-urlauth/imap-urlauth-settings.c -M src/imap-urlauth/imap-urlauth-worker-settings.c -M src/imap/cmd-append.c -M src/imap/imap-fetch-body.c -M src/imap/imap-settings.c -M src/indexer/indexer-settings.c -M src/indexer/indexer-worker-settings.c -M src/ipc/ipc-settings.c -M src/lda/main.c -M src/lib-compression/istream-bzlib.c -M src/lib-compression/istream-lzma.c -M src/lib-compression/istream-zlib.c -M src/lib-fs/fs-api.c -M src/lib-fs/fs-metawrap.c -M src/lib-fs/fs-posix.c -M src/lib-http/http-client-connection.c -M src/lib-http/http-header-parser.c -M src/lib-http/http-response-parser.c -M src/lib-http/http-server-request.c -M src/lib-http/test-http-payload.c -M src/lib-imap-storage/imap-msgpart-url.c -M src/lib-imap-storage/imap-msgpart.c -M src/lib-imap-storage/imap-msgpart.h -M src/lib-index/mail-index-map-hdr.c -M src/lib-index/mail-index-map-read.c -M src/lib-index/mail-index-sync-update.c -M src/lib-index/mail-index-sync.c -M src/lib-index/mail-index-view-sync.c -M src/lib-index/mail-transaction-log-file.c -M src/lib-index/mail-transaction-log-private.h -M src/lib-index/mail-transaction-log-view.c -M src/lib-index/mail-transaction-log.c -M src/lib-index/test-mail-transaction-log-view.c -M src/lib-mail/istream-attachment-connector.c -M src/lib-mail/istream-attachment-connector.h -M src/lib-mail/istream-header-filter.c -M src/lib-mail/test-istream-attachment.c -M src/lib-settings/settings-parser.c -M src/lib-smtp/smtp-command-parser.c -M src/lib-smtp/smtp-server-connection.c -M src/lib-smtp/smtp-server-reply.c -M src/lib-smtp/test-smtp-payload.c -M src/lib-storage/index/dbox-common/dbox-file-fix.c -M src/lib-storage/index/dbox-common/dbox-file.c -M src/lib-storage/index/dbox-common/dbox-mail.c -M src/lib-storage/index/dbox-multi/mdbox-file.c -M src/lib-storage/index/imapc/imapc-mail-fetch.c -M src/lib-storage/index/imapc/imapc-mail.c -M src/lib-storage/index/index-mail-binary.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/istream-mail.c -M src/lib-storage/index/maildir/maildir-copy.c -M src/lib-storage/index/maildir/maildir-mail.c -M src/lib-storage/index/maildir/maildir-save.c -M src/lib-storage/index/maildir/maildir-uidlist.c -M src/lib-storage/index/mbox/istream-raw-mbox.c -M src/lib-storage/index/mbox/istream-raw-mbox.h -M src/lib-storage/index/mbox/mbox-mail.c -M src/lib-storage/index/mbox/mbox-save.c -M src/lib-storage/index/mbox/mbox-sync-parse.c -M src/lib-storage/index/mbox/mbox-sync-rewrite.c -M src/lib-storage/index/mbox/mbox-sync-update.c -M src/lib-storage/index/mbox/mbox-sync.c -M src/lib-storage/index/pop3c/pop3c-mail.c -M src/lib-storage/index/raw/raw-mail.c -M src/lib-storage/index/raw/raw-storage.c -M src/lib/file-cache.c -M src/lib/istream-concat.c -M src/lib/istream-failure-at.c -M src/lib/istream-limit.c -M src/lib/istream-private.h -M src/lib/istream-seekable.c -M src/lib/istream-tee.c -M src/lib/istream.c -M src/lib/ostream-file.c -M src/lib/ostream.h -M src/lib/strnum.c -M src/lib/test-iostream-temp.c -M src/lib/test-istream-concat.c -M src/lib/test-istream-sized.c -M src/lib/test-istream.c -M src/lmtp/lmtp-client.c -M src/lmtp/lmtp-proxy.c -M src/lmtp/lmtp-settings.c -M src/log/log-settings.c -M src/master/master-settings.c -M src/master/service.c -M src/old-stats/stats-settings.c -M src/plugins/fts-squat/squat-uidlist.c -M src/plugins/mail-crypt/mail-crypt-plugin.c -M src/plugins/pop3-migration/pop3-migration-plugin.c -M src/plugins/quota/quota-maildir.c -M src/plugins/zlib/zlib-plugin.c -M src/pop3-login/pop3-login-settings.c -M src/pop3/pop3-commands.c -M src/pop3/pop3-settings.c -M src/replication/aggregator/aggregator-settings.c -M src/replication/replicator/replicator-settings.c -M src/stats/stats-settings.c -M src/submission-login/submission-login-settings.c -M src/submission/submission-settings.c -M src/util/health-check-settings.c -M src/util/tcpwrap-settings.c - -2020-09-23 14:43:29 +0300 Aki Tuomi (e80cfb62b6) - - global: Use SIZE_MAX instead of (size_t)-1 - - -M src/anvil/anvil-connection.c -M src/auth/auth-client-connection.c -M src/auth/auth-master-connection.c -M src/auth/auth-settings.c -M src/auth/auth-worker-client.c -M src/auth/auth-worker-server.c -M src/auth/db-passwd-file.c -M src/auth/mech-gssapi.c -M src/auth/mech-winbind.c -M src/auth/userdb-passwd-file.c -M src/config/config-connection.c -M src/config/config-parser.c -M src/config/config-request.c -M src/dict/dict-settings.c -M src/director/auth-connection.c -M src/director/director-settings.c -M src/director/director-test.c -M src/director/director.c -M src/director/doveadm-connection.c -M src/director/login-connection.c -M src/dns/dns-client.c -M src/doveadm/client-connection-tcp.c -M src/doveadm/doveadm-director.c -M src/doveadm/doveadm-dsync.c -M src/doveadm/doveadm-dump-dbox.c -M src/doveadm/doveadm-dump-log.c -M src/doveadm/doveadm-log.c -M src/doveadm/doveadm-oldstats.c -M src/doveadm/doveadm-penalty.c -M src/doveadm/doveadm-replicator.c -M src/doveadm/doveadm-settings.c -M src/doveadm/doveadm-stats.c -M src/doveadm/doveadm-who.c -M src/doveadm/doveadm-zlib.c -M src/doveadm/server-connection.c -M src/imap-hibernate/imap-hibernate-client.c -M src/imap-hibernate/imap-master-connection.c -M src/imap-login/imap-login-settings.c -M src/imap-urlauth/imap-urlauth-client.c -M src/imap-urlauth/imap-urlauth-login-settings.c -M src/imap-urlauth/imap-urlauth-settings.c -M src/imap-urlauth/imap-urlauth-worker-settings.c -M src/imap-urlauth/imap-urlauth-worker.c -M src/imap/cmd-getmetadata.c -M src/imap/cmd-urlfetch.c -M src/imap/imap-client.c -M src/imap/imap-fetch-body.c -M src/imap/imap-master-client.c -M src/imap/imap-settings.c -M src/indexer/indexer-client.c -M src/indexer/master-connection.c -M src/indexer/worker-connection.c -M src/ipc/client.c -M src/ipc/ipc-connection.c -M src/lib-auth/auth-client-connection.c -M src/lib-charset/charset-iconv.c -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-dcrypt/ostream-encrypt.c -M src/lib-dict/dict-client.c -M src/lib-dict/dict-file.c -M src/lib-dict/dict-memcached-ascii.c -M src/lib-dict/dict-memcached.c -M src/lib-dict/dict-redis.c -M src/lib-dns/dns-lookup.c -M src/lib-dns/dns-util.c -M src/lib-fs/fs-test.c -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-request.c -M src/lib-http/http-message-parser.c -M src/lib-http/http-server-connection.c -M src/lib-http/http-server-response.c -M src/lib-http/test-http-client-errors.c -M src/lib-http/test-http-payload.c -M src/lib-http/test-http-server-errors.c -M src/lib-imap-client/imapc-client.h -M src/lib-imap-client/imapc-connection.c -M src/lib-imap-client/test-imapc-client.c -M src/lib-imap-storage/imap-msgpart.c -M src/lib-imap-urlauth/imap-urlauth-connection.c -M src/lib-imap/imap-bodystructure.c -M src/lib-imap/imap-envelope.c -M src/lib-imap/imap-id.c -M src/lib-index/mail-cache-transaction.c -M src/lib-index/mail-index-fsck.c -M src/lib-index/mail-index-strmap.c -M src/lib-index/mail-index-transaction-update.c -M src/lib-index/mail-transaction-log-append.c -M src/lib-index/mail-transaction-log-file.c -M src/lib-lda/lda-settings.c -M src/lib-mail/istream-header-filter.c -M src/lib-mail/qp-decoder.c -M src/lib-mail/test-istream-dot.c -M src/lib-master/anvil-client.c -M src/lib-master/ipc-client.c -M src/lib-master/ipc-server.c -M src/lib-master/master-instance.c -M src/lib-master/master-login-auth.c -M src/lib-master/master-login.c -M src/lib-master/master-service-settings-cache.c -M src/lib-master/master-service-settings.c -M src/lib-master/master-service-ssl-settings.c -M src/lib-master/stats-client.c -M src/lib-master/test-event-stats.c -M src/lib-master/test-master-service-settings-cache.c -M src/lib-oauth2/test-oauth2-jwt.c -M src/lib-program-client/program-client.c -M src/lib-program-client/test-program-client-net.c -M src/lib-program-client/test-program-client-unix.c -M src/lib-settings/settings-parser.c -M src/lib-settings/settings.c -M src/lib-smtp/smtp-client-command.c -M src/lib-smtp/smtp-client-connection.c -M src/lib-smtp/smtp-client.h -M src/lib-smtp/smtp-reply-parser.c -M src/lib-smtp/smtp-server-connection.c -M src/lib-smtp/smtp-submit-settings.c -M src/lib-smtp/test-smtp-client-errors.c -M src/lib-smtp/test-smtp-server-errors.c -M src/lib-smtp/test-smtp-submit.c -M src/lib-sql/sql-api.c -M src/lib-ssl-iostream/istream-openssl.c -M src/lib-storage/index/dbox-common/dbox-file.c -M src/lib-storage/index/dbox-multi/mdbox-purge.c -M src/lib-storage/index/dbox-multi/mdbox-settings.c -M src/lib-storage/index/imapc/imapc-settings.c -M src/lib-storage/index/maildir/maildir-settings.c -M src/lib-storage/index/maildir/maildir-uidlist.c -M src/lib-storage/index/mbox/istream-raw-mbox.c -M src/lib-storage/index/mbox/mbox-settings.c -M src/lib-storage/index/mbox/mbox-sync-parse.c -M src/lib-storage/index/mbox/mbox-sync-rewrite.c -M src/lib-storage/index/mbox/mbox-sync-update.c -M src/lib-storage/index/pop3c/pop3c-client.c -M src/lib-storage/index/pop3c/pop3c-settings.c -M src/lib-storage/mail-storage-settings.c -M src/lib-test/test-istream.c -M src/lib-test/test-ostream.c -M src/lib/array.c -M src/lib/array.h -M src/lib/buffer.c -M src/lib/buffer.h -M src/lib/file-cache.c -M src/lib/istream-data.c -M src/lib/istream-seekable.c -M src/lib/istream-tee.c -M src/lib/mempool-system.c -M src/lib/ostream-buffer.c -M src/lib/ostream-wrapper.c -M src/lib/strfuncs.c -M src/lib/test-buffer-istream.c -M src/lib/test-buffer.c -M src/lib/test-connection.c -M src/lib/test-file-cache.c -M src/lib/test-iostream-pump.c -M src/lib/test-istream-multiplex.c -M src/lib/test-multiplex.c -M src/lib/test-ostream-buffer.c -M src/lib/test-ostream-multiplex.c -M src/lib/unichar.c -M src/lib/uri-util.c -M src/lmtp/lmtp-settings.c -M src/log/doveadm-connection.c -M src/login-common/login-proxy.c -M src/login-common/login-settings.c -M src/master/master-settings.c -M src/master/test-auth-client.c -M src/master/test-auth-master.c -M src/master/test-master-login-auth.c -M src/old-stats/client.c -M src/old-stats/global-memory.c -M src/old-stats/stats-settings.c -M src/plugins/acl/acl-backend-vfile-acllist.c -M src/plugins/acl/acl-backend-vfile.c -M src/plugins/acl/acl-global-file.c -M src/plugins/fts-squat/squat-test.c -M src/plugins/fts/fts-expunge-log.c -M src/plugins/mail-crypt/fs-crypt-common.c -M src/plugins/mail-crypt/fs-crypt-settings.c -M src/plugins/quota/quota-status-settings.c -M src/plugins/quota/quota-status.c -M src/plugins/trash/trash-plugin.c -M src/plugins/virtual/virtual-config.c -M src/pop3-login/pop3-login-settings.c -M src/pop3/pop3-client.c -M src/pop3/pop3-settings.c -M src/replication/aggregator/aggregator-settings.c -M src/replication/aggregator/notify-connection.c -M src/replication/aggregator/replicator-connection.c -M src/replication/replicator/doveadm-connection.c -M src/replication/replicator/dsync-client.c -M src/replication/replicator/notify-connection.c -M src/replication/replicator/replicator-queue.c -M src/replication/replicator/replicator-settings.c -M src/stats/client-reader.c -M src/stats/client-writer.c -M src/stats/stats-settings.c -M src/stats/test-client-reader.c -M src/stats/test-client-writer.c -M src/submission-login/submission-login-settings.c -M src/submission/submission-settings.c -M src/util/rawlog.c - -2020-08-11 08:41:54 +0300 Aki Tuomi (3698334932) - - lib: macros - Add ENUM_NEGATE - - Handles enumeration flag negation. - -M src/lib/macros.h - -2020-07-28 13:42:01 +0300 Aki Tuomi (55c6d609aa) - - configure: Add ubsan support - - -M m4/dovecot.m4 -M src/lib/macros.h - -2020-09-23 14:39:36 +0300 Aki Tuomi (15318d2780) - - lib-mail: test-message-header-hash: Fix type issue - - Satisfies runtime analyzer. - -M src/lib-mail/test-message-header-hash.c - -2020-09-22 14:39:41 +0300 Aki Tuomi (e32650c399) - - doveadm: mailbox status - Handle first_save_date correctly - - If first_save_date is -1 it means no save has been done. - -M src/doveadm/doveadm-mail-mailbox-status.c - -2020-08-20 08:57:35 +0300 Aki Tuomi (309b3ceba0) - - lib: unichar - Change uni_utf8_char_bytes to accept unsigned char - - -M src/lib-imap/imap-utf7.c -M src/lib/unichar.h - -2020-09-01 09:57:04 +0300 Aki Tuomi (fa3b53798c) - - lib-index: Use SIZE_MAX with str_sanitize - - -M src/lib-index/mail-index-map.c -M src/lib-index/mail-index.c - -2020-09-01 09:57:23 +0300 Aki Tuomi (b8c83f6061) - - auth: password-scheme - Use UINT_MAX when calling password_generate_otp - - -M src/auth/password-scheme.c - -2020-09-01 11:54:50 +0300 Aki Tuomi (3aed1e852a) - - lib: mempool-allocfree - Do not use PTR_OFFSET with negative offset - - Avoids undefined behaviour sanitization error. - -M src/lib/mempool-allocfree.c - -2020-09-01 11:56:42 +0300 Aki Tuomi (f5af22d2c8) - - lib-fts: test-fts-tokenizer - Change test_chars to unsigned char - - -M src/lib-fts/test-fts-tokenizer.c - -2020-08-20 09:46:24 +0300 Aki Tuomi (f2e4eed824) - - lib: str - Ensure str_append_c gets unsigned char parameter - - -M src/lib/str.h - -2020-10-01 11:37:24 +0300 Timo Sirainen (f4ab2fc962) - - lib: seq-range-array - Assert-crash if array becomes 0..(uint32_t)-1 - - -M src/lib/seq-range-array.c -M src/lib/seq-range-array.h -M src/lib/test-lib.inc -M src/lib/test-seq-range-array.c - -2020-10-01 11:19:33 +0300 Timo Sirainen (588c3b9637) - - lib: seq_range_array_add() - Reorder code flow - - -M src/lib/seq-range-array.c - -2020-10-01 11:18:04 +0300 Timo Sirainen (1c7ae79d97) - - lib: seq-range-array - Split off seq_range_array_add_slow_path() - - -M src/lib/seq-range-array.c - -2020-10-01 11:04:56 +0300 Timo Sirainen (1203cd16ad) - - lib: seq-range-array - Use seq_range_length() internally - - -M src/lib/seq-range-array.c - -2020-10-01 11:04:36 +0300 Timo Sirainen (c1a5cbb9da) - - lib: seq_range_length() - Use const pointer - - -M src/lib/seq-range-array.h - -2020-10-20 15:02:24 +0300 Martti Rannanjärvi (6752ab40f6) - - doc: Include dovecot-oauth2.conf.ext in dist tarball - - -M doc/example-config/Makefile.am - -2020-10-12 23:29:02 +0200 Stephan Bosch (7f1738a772) - - doveadm-server: Fix STARTTLS support. - - -M src/doveadm/main.c - -2020-10-13 22:56:25 +0200 Stephan Bosch (4b90fbfcc3) - - lib-master: master-service-ssl - Make context initialization error more - useful. - - This improves the error in case SSL is disabled; other causes still yield a - rather unhelpful error message. - -M src/lib-master/master-service-ssl.c - -2020-10-12 23:18:09 +0200 Stephan Bosch (c2e5d7fdfb) - - lib: ostream-multiplex - Fix dead assignment by adding an assertion on the - result. - - Found by Clang scan-build. - -M src/lib/ostream-multiplex.c - -2020-10-07 00:06:08 +0200 Stephan Bosch (904d96418a) - - global: Fix dead assignments in expressions. - - Found by Clang scan-build. - -M src/auth/db-lua.c -M src/lib-sql/driver-cassandra.c -M src/lib/ostream-wrapper.c -M src/plugins/mail-lua/mail-lua-plugin.c -M src/plugins/mail-lua/mail-storage-lua.c -M src/plugins/push-notification/push-notification-driver-lua.c - -2020-10-08 13:48:45 +0200 raphael-walther <48209673+raphael-walther@users.noreply.github.com> (9a8ebce905) - - man: Update doveadm-search-query.7 - - TEXT searches also from headers, not just body. - -M doc/man/doveadm-search-query.7 - -2020-10-07 17:48:06 +0200 jonmoesli <69861248+jonmoesli@users.noreply.github.com> (f0c15f2d6c) - - director: Fix error message when director_username_hash expansion fails - - -M src/director/director.c - -2020-10-09 14:58:54 +0300 Timo Sirainen (787cc98cf8) - - lib-storage: Fix potential assert-crash when adding missing attachment - keywords - - Broken by aab71c35259f542d9ba46b4b5b24eff0016b802e - - Fixes: Panic: file index-mail.c: line 1241 (index_mail_parse_body): - assertion failed: (data->parser_ctx != NULL) - -M src/lib-storage/index/index-mail-headers.c -M src/lib-storage/index/index-mail.c - -2020-10-08 10:41:52 +0300 Timo Sirainen (4c4377e82e) - - lib: json-parser - Fix skipping strings with non-blocking input - - The skipping could have accessed memory outside the allocated string. This - might have resulted in a crash, or caused JSON parsing to fail. - -M src/lib/json-parser.c - -2020-09-16 05:06:12 +0200 Stephan Bosch (8608c26908) - - lib-mail: test-message-header-decode - Add random encode/decode tests for 8 - bit data. - - This also tests handling of (broken) UTF-8 input. - -M src/lib-mail/test-message-header-decode.c - -2020-09-16 04:31:58 +0200 Stephan Bosch (b37dcca4fb) - - lib-mail: test-message-header-encode - Add tests for broken UTF-8 in input. - - -M src/lib-mail/test-message-header-encode.c - -2020-09-17 12:17:44 +0200 Stephan Bosch (5f35cab966) - - lib-mail: test-message-header-encode - Check maximum line length with long - printable text and whitespace. - - -M src/lib-mail/test-message-header-encode.c - -2020-09-17 01:26:13 +0200 Stephan Bosch (05e84eb74c) - - lib-mail: message-header-encode - Update function descriptions. - - -M src/lib-mail/message-header-encode.h - -2020-09-16 03:21:30 +0200 Stephan Bosch (617b1beaa3) - - lib-mail: Properly handle bad UTF-8 in message_header_encode_b(). - - Broken characters are substituted with a replacement character. - -M src/lib-mail/message-header-encode.c - -2020-09-16 03:19:34 +0200 Stephan Bosch (e73eafc68b) - - lib-mail: Properly handle bad UTF-8 in message_header_encode_q(). - - Broken characters are substituted with a replacement character. - -M src/lib-mail/message-header-encode.c - -2020-09-16 03:10:12 +0200 Stephan Bosch (de56f9152b) - - lib-mail: message-header-encode - Return immediately when len == 0 in - message_header_encode_b/q(). - - Just to make sure. This shouldn't happen in the first place. - -M src/lib-mail/message-header-encode.c - -2020-09-16 03:05:30 +0200 Stephan Bosch (894e088f92) - - lib-mail: message-header-encode - Use size_t for length/size variables and - parameters. - - -M src/lib-mail/message-header-encode.c -M src/lib-mail/message-header-encode.h - -2020-09-17 01:33:52 +0200 Stephan Bosch (2d35de6b65) - - lib-mail: message-header-encode - Fix encoding of 0x7F byte for Q encoding. - - It was not escaped. - -M src/lib-mail/message-header-encode.c -M src/lib-mail/test-message-header-decode.c - -2020-09-17 01:41:41 +0200 Stephan Bosch (6832846c8c) - - lib-mail: test-message-header-decode - Use test_assert_idx(). - - -M src/lib-mail/test-message-header-decode.c - -2020-09-16 18:28:43 +0200 Stephan Bosch (154602378a) - - lib-mail: test-message-header-decode - Avoid generating random bytes that - are never used. - - -M src/lib-mail/test-message-header-decode.c - -2020-09-17 12:24:40 +0200 Stephan Bosch (9bd6007d8b) - - lib-mail: test-message-header-decode - Use test_assert_strcmp(). - - -M src/lib-mail/test-message-header-decode.c - -2020-09-17 12:23:06 +0200 Stephan Bosch (0b5206d887) - - lib-mail: test-message-header-encode - Use test_assert_strcmp(). - - -M src/lib-mail/test-message-header-encode.c - -2020-09-16 01:03:53 +0200 Stephan Bosch (334cd2fc22) - - lib: base64 - Add base64_encode_get_full_space(). - - This translates the space in the destination buffer to the number of bytes - that can be encoded at most to complete the full base64 encoding, including - padding and newlines if configured. - -M src/lib/base64.c -M src/lib/base64.h -M src/lib/test-base64.c - -2020-09-16 01:02:22 +0200 Stephan Bosch (dd8408a50e) - - lib: base64 - Fix return value of base64_encode_more(). - - It didn't properly return TRUE when all input data was consumed. - -M src/lib/base64.c -M src/lib/test-base64.c - -2020-09-16 23:19:19 +0200 Stephan Bosch (2eaa4e3fd3) - - lib: test-base64 - Add test for base64_encode_get_size() in random lowlevel - streaming tests. - - -M src/lib/test-base64.c - -2020-09-16 23:20:32 +0200 Stephan Bosch (375332aa5f) - - lib: test-base64 - Abort random lowlevel test case early when something - failed already. - - -M src/lib/test-base64.c - -2020-09-16 00:37:45 +0200 Stephan Bosch (c830037f8c) - - lib: unichar - Add length definitions for replacement and ellipsis - characters. - - -M src/lib/unichar.h - -2020-05-06 13:15:34 +0300 Timo Sirainen (1cf8040306) - - lib: json-parser - Fix parsing \uXXXX in non-blocking input - - If it was in the istream's read boundary it resulted as parsing error. - -M src/lib/json-parser.c -M src/lib/test-json-parser.c - -2020-05-06 13:01:41 +0300 Timo Sirainen (c4beabf43f) - - lib: json-parser - Fix error message for invalid escape sequence - - -M src/lib/json-parser.c - -2020-05-06 12:54:13 +0300 Timo Sirainen (7d74329816) - - lib: json-parser - Don't allocate errors from data stack - - There's no guarantee that the json-parser's life time is within the same - data stack frame. - -M src/lib/json-parser.c - -2020-05-06 12:38:22 +0300 Timo Sirainen (a4057ea644) - - lib: json-parser - Fail if strings contain NULs - - Previous behavior was to just truncate the string, which could be worse than - failing entirely. - -M src/lib/json-parser.c -M src/lib/test-json-parser.c - -2020-09-23 01:59:27 +0200 Stephan Bosch (4d09884528) - - lib-http: test-http-client-errors - Add unit test for host idle timeout. - - This test involves retrying a request that failed host lookup, which used to - cause the request to be erroneously aborted. - -M src/lib-http/test-http-client-errors.c - -2020-09-21 01:14:20 +0200 Stephan Bosch (ac4173fa38) - - lib-http: http-client-host - Prevent erroneously starting host idle timeout - during request retry. - - During request retry the request is first dropped from and subsequently - added to the queue. Dropping a request from the queue can start the host - idle timeout when it is the very last one. The timeout was not removed later - on anymore when the request was submitted again, because it was added - prematurely (before dropping the request). - -M src/lib-http/http-client-host.c - -2020-09-20 23:16:00 +0200 Stephan Bosch (29f3be1af8) - - lib-http: http-client-host - Fix determination of whether host is idle. - - -M src/lib-http/http-client-host.c - -2020-09-22 22:12:27 +0200 Stephan Bosch (c701368bef) - - lib-http: http-client-host - Make sure DNS lookup is performed when host has - no IPs. - - This fixes at least one panic: - - Panic: file ./http-client-private.h: line 679 (http_client_host_get_ip): - assertion failed: (idx < host->shared->ips_count) - -M src/lib-http/http-client-host.c - -2020-08-26 11:31:01 +0300 Timo Sirainen (bf1c45440a) - - auth: Fix potential read buffer overflow in PLAIN mechanism - - The overflow could have crashed the auth process in theory, although - practically it doesn't seem to happen. - -M src/auth/mech-plain.c -M src/auth/test-mech.c - -2020-08-26 11:42:02 +0300 Timo Sirainen (e29ce296cf) - - auth: test-mech - Allocate test input explicitly - - This way valgrind will catch if there are read buffer overflows. - -M src/auth/test-mech.c - -2020-04-01 17:22:04 +0300 Timo Sirainen (c394c60959) - - lib-index: Fix DEBUG assert to not trigger on transaction resets - - Fixes a crash in test-mail-index when compiled --with-devel-checks: - - Panic: file mail-index-transaction.c: line 211 - (mail_index_transaction_commit_real): assertion failed: - (expected_highest_modseq == log->head->sync_highest_modseq) - -M src/lib-index/mail-index-transaction.c - -2020-09-17 15:43:02 -0400 Josef 'Jeff' Sipek (372a88e701) - - login-common: Include the proxy's source address in log messages - - -M src/login-common/client-common-auth.c - -2020-09-17 15:42:52 -0400 Josef 'Jeff' Sipek (c066b7d60d) - - login-common: Move common client info logging into a helper function - - -M src/login-common/client-common-auth.c - -2020-09-17 14:19:46 -0400 Josef 'Jeff' Sipek (cd8a50c686) - - login-common: Add login_proxy_get_source_host() to get the local proxy - hostname - - -M src/login-common/login-proxy.c -M src/login-common/login-proxy.h - -2020-09-17 10:45:44 -0400 Josef 'Jeff' Sipek (bd8eadf128) - - login-common: Heap allocate login source IPs array to avoid use-after-free - - By default, the service init code runs with a temporary datastack frame that - gets freed at the end of initialization to get rid of any temporary - allocations made during init before the long-running part of the process - executes. - -M src/login-common/main.c - -2020-09-18 14:55:27 +0300 sergey.kitov (4740d48ba3) - - man: update doveadm-proxy man page with kick -h option. - - -M doc/man/doveadm-proxy.1.in -M src/login-common/login-proxy.c - -2020-09-15 15:52:24 +0300 sergey.kitov (0f889378f5) - - doveadm: Implement proxy kick -h - - -M src/doveadm/doveadm-proxy.c - -2020-09-15 15:51:26 +0300 sergey.kitov (30a816a360) - - login-common: Implement kicking all user at backend host. - - -M src/login-common/login-proxy.c - -2020-09-17 13:51:36 +0300 sergey.kitov (62e8fe8c4e) - - login-common: change want_kick signature from (struct *client, ...) to - (struct *login_proxy, ...) - - -M src/login-common/login-proxy.c - -2020-09-25 10:43:39 +0300 sergey.kitov (10f534e0f2) - - login-common: Put proxy looping on stack in login_proxy_cmd_kick_full() - - -M src/login-common/login-proxy.c - -2020-06-24 11:20:25 +0200 Stephan Bosch (517080d0f3) - - lib-smtp: smtp-server-connection - Ignore replied command for pipeline limit - calculation. - - This prevents failed commands with payload from blocking the input pipeline. - This caused a hang before. - -M src/lib-smtp/smtp-server-connection.c - -2020-06-24 11:15:55 +0200 Stephan Bosch (95edff15c1) - - lib-smtp: smtp-server-connection - Use connection settings for command - pipeline limit. - - It used the top-level server settings before. - -M src/lib-smtp/smtp-server-connection.c - -2020-06-24 11:13:59 +0200 Stephan Bosch (0dcc8f0556) - - lib-smtp: smtp-server-connection - Move pipeline limit check to separate - function. - - -M src/lib-smtp/smtp-server-connection.c - -2020-06-24 10:45:38 +0200 Stephan Bosch (e1009a8641) - - lib-smtp: smtp-server-command - Always end input lock/capture upon reply - submission. - - -M src/lib-smtp/smtp-server-command.c - -2020-06-24 10:42:17 +0200 Stephan Bosch (d6ec5245d4) - - lib-smtp: smtp-server-command - Reliably end input capture in - smtp_server_command_input_unlock(). - - -M src/lib-smtp/smtp-server-command.c - -2020-09-17 13:09:54 +0300 Timo Sirainen (3fa7052a5d) - - lib-storage: Rename mail_attachment_detection_options=add-flags-on-save to - add-flags - - Keep add-flags-on-save for backwards compatibility. - -M doc/example-config/conf.d/10-mail.conf -M src/lib-storage/index/index-mail.c -M src/lib-storage/mail-storage-settings.c -M src/lib-storage/mail-storage-settings.h -M src/lib-storage/mail-storage.c - -2020-09-04 01:58:58 +0300 Timo Sirainen (aab71c3525) - - lib-storage: Try to add missing attachment flags when opening mail stream - - Since the message body is being opened in any case, it's pretty inexpensive - to add missing attachment flags. Do this only when - mail_attachment_detection_options has add-flags-on-save but no - no-flags-on-fetch. - -M src/lib-storage/index/index-mail.c - -2020-09-10 16:38:11 +0300 Timo Sirainen (194dcaa65c) - - lib-storage: Try to add missing attachment flags when fetching MIME parts or - BODYSTRUCTURE - - This happens only if both mime.parts and imap.bodystructure are already in - cache and mail_attachment_detection_options has add-flags-on-save but no - no-flags-on-fetch. The no-flags-on-fetch option may be removed in a future - release once it's known that it's not causing any unexpected performance - issues. - -M src/lib-storage/index/index-mail.c -M src/lib-storage/mail-storage-settings.c -M src/lib-storage/mail-storage-settings.h - -2020-09-10 16:36:14 +0300 Timo Sirainen (52a0f91840) - - lib-storage: index_mail_get_cached_bodystructure() - Reorder the if - statements - - Simplifies the following commit. - -M src/lib-storage/index/index-mail.c - -2020-09-10 16:32:35 +0300 Timo Sirainen (74ab5e62e0) - - lib-storage: Avoid initializing stream multiple times recursively - - This fixes the situation where stream opening causes it to be re-opened by - index_mail_parse_headers(). There are some other more rare situations, but - they're in error handling code paths. - -M src/lib-storage/index/index-mail-headers.c -M src/lib-storage/index/index-mail.c -M src/lib-storage/index/index-mail.h - -2020-09-10 16:21:17 +0300 Timo Sirainen (f4f1c0a1b6) - - lib-storage: Avoid caching size.physical unless it's explicitly asked for - - It's internally requested in a few places, but only as an optimization if it - happens to exist. It's not important enough that it should affect caching - decisions. - - This change becomes more important after the following changes, which cause - size.physical to be added unnecessarily when filling out attachment flags. - -M src/lib-storage/index/index-mail.c - -2020-09-22 20:00:17 +0200 Stephan Bosch (778811a3e6) - - lib-http: http-client-host - Do not prematurely reset ips_count to zero. - - It causes problems with existing connection attempts. - - Panic was: - - Panic: file http-client-queue.c: line 215 - (http_client_queue_is_last_connect_ip): assertion failed: - (queue->ips_connect_idx < ips_count) - -M src/lib-http/http-client-host.c - -2020-09-23 02:04:20 +0200 Stephan Bosch (dff9d4719f) - - lib-http: http-client-host - Log debug message for failed DNS lookup. - - If the host has no requests, nothing is logged about the failure otherwise. - -M src/lib-http/http-client-host.c - -2020-09-22 19:58:59 +0200 Stephan Bosch (1c9264909c) - - lib-http: http-client-host - Move DNS lookup success handling to a common - function. - - -M src/lib-http/http-client-host.c - -2020-09-21 00:38:11 +0200 Stephan Bosch (a01eae05bb) - - lib-http: Reformat http-client-host.c. - - -M src/lib-http/http-client-host.c - -2020-09-28 15:26:27 -0400 ihsinme <61293369+ihsinme@users.noreply.github.com> (9ca475537e) - - lib-mail: html2text - Fix buffer out-of-bounds access - - The passed in buffer size is at least 1 byte shorter than the actual buffer - size, therefore there is no chance of a crash. - -M src/lib-mail/mail-html2text.c - -2020-08-15 00:56:36 +0300 Timo Sirainen (645a30a6c7) - - dict-sql: Fix crash if dict iteration is destroyed early - - If the iteration callback is still called after the iterator is freed, the - callback accesses freed memory and crashes. - -M src/lib-dict-backend/dict-sql.c - -2020-09-12 00:20:51 +0200 Stephan Bosch (dba3d86625) - - lib-smtp: test-smtp-command-parser - Add tests for input ending in partial - UTF-8 sequences. - - -M src/lib-smtp/test-smtp-command-parser.c - -2020-09-12 00:19:14 +0200 Stephan Bosch (4e24c1a705) - - lib-smtp: test-smtp-command-parser - Test parsing commands from input that - comes in gradually. - - -M src/lib-smtp/test-smtp-command-parser.c - -2020-09-12 00:15:35 +0200 Stephan Bosch (77903cf3a3) - - lib-smtp: smtp-command-parser - Fix parameter parsing not to fail on - particular unicode code points. - - Unicode code points were sometimes erroneously checked as ASCII characters. - -M src/lib-smtp/smtp-command-parser.c - -2020-09-11 21:53:06 +0200 Stephan Bosch (1ae3ca2988) - - lib-smtp: smtp-command-parser - Fix read past buffer limit while parsing - UTF-8 character. - - The buffer limit was specified as (buf->pos - buf->end) rather than - (buf->end - buf->pos). Since at most a valid UTF-8 character can be read - beyond the buffer size, this bug didn't cause noticeable effects, nor does - it present an attack surface. - -M src/lib-smtp/smtp-command-parser.c - -2020-09-11 23:54:29 +0200 Stephan Bosch (2ec6f2f75b) - - lib-smtp: Reformat test-smtp-command-parser.c. - - -M src/lib-smtp/test-smtp-command-parser.c - -2020-09-11 22:57:58 +0200 Stephan Bosch (853b233469) - - lib-smtp: Reformat smtp-command-parser.c. - - -M src/lib-smtp/smtp-command-parser.c - -2020-08-31 20:38:42 +0300 Timo Sirainen (a668d767a7) - - lib-mail: message_parser_init_from_parts() - Fix crash if MIME boundaries - don't end - - If the last "boundary--" doens't exist, the parsing assert-crashed at - deinit. This mainly happened when searching mails. - - Fixes: Panic: file message-parser.c: line 175 (message_part_finish): - assertion failed: (ctx->nested_parts_count > 0) - -M src/lib-mail/message-parser.c -M src/lib-mail/test-message-parser.c - -2020-08-28 18:35:00 +0300 Timo Sirainen (86e1953d07) - - acl: Ignore acl_object_list_deinit() error when copying ACLs from parent - - There's already a FIXME, and this makes static analyzer happier. - -M src/plugins/acl/acl-mailbox.c - -2020-08-13 11:38:07 +0300 Timo Sirainen (007e1ff1c5) - - director: Explicitly ignore array_bsearch_insert_pos() return value - - Makes static analyzers happier. - -M src/director/mail-host.c - -2020-08-13 11:29:38 +0300 Timo Sirainen (15e7385f69) - - lib: test-istream - Check or explicitly ignore i_stream_read() return value - - Makes static analyzers happier. - -M src/lib/test-istream.c - -2020-08-12 11:05:55 +0300 Timo Sirainen (51ed74c63f) - - lib-ssl-iostream: Fix error message with invalid ciphersuites - - The error message contained curve_list's value, not ciphersuites' value. - -M src/lib-ssl-iostream/iostream-openssl-context.c - -2020-09-14 17:44:58 +0300 Timo Sirainen (ffd2fdd8d8) - - lib-compression: test-compression - Fix memory leak - - -M src/lib-compression/test-compression.c - -2020-09-14 10:37:16 +0300 Timo Sirainen (8655329e14) - - lib: Add a comment about o_stream_create_buffer() - - -M src/lib/ostream.h - -2020-09-14 10:28:41 +0300 Timo Sirainen (d2054a3115) - - lib: ostream-buffer - Revert returning 0 as used buffer size - - This change broke at least one external plugin that assumed the original - behavior. Safer to just revert this change. - - Reverts 48083d9e7fdbe257b0be33043ecf0ca87489eef9 - -M src/lib/ostream-buffer.c -M src/lib/test-ostream-buffer.c - -2020-09-14 10:27:26 +0300 Timo Sirainen (0416a3fdc0) - - lib-compression: test-compression - Convert from ostream-buffer to - iostream-temp - - Using ostream-buffer required 48083d9e7fdbe257b0be33043ecf0ca87489eef9 - change, but this broke some code that assumed the original behavior. - -M src/lib-compression/test-compression.c - -2020-09-11 23:28:47 +0300 Aki Tuomi (c2eee2e4bc) - - lib-compression: test-compression - Use datastack in test - - Plugs a memory leak. - - Broken in 60b4040ba498ce7b19fc8b189d327cc606856f07 - -M src/lib-compression/test-compression.c - -2020-09-11 14:29:14 +0300 Timo Sirainen (71c3938bca) - - lib-fs: test-fs-async - Fix to work properly after previous changes - - It's an async test, so it should expect that the fs actually behaves - asynchronously. - -M src/lib-fs/fs-test-async.c - -2020-09-11 14:28:11 +0300 Timo Sirainen (31d7b252df) - - lib-dict: dict_switch_ioloop() - Move also failure timeout - - Forgotten in 178bb676ea1dd380789d3587bf5e64fd85a29d7a - -M src/lib-dict/dict.c - -2020-08-21 14:31:12 -0400 Josef 'Jeff' Sipek (0bcdf2217a) - - stats: event exporter - Use category exporting helper to avoid duplicates - (tabtext) - - -M src/stats/event-exporter-fmt-tab-text.c - -2020-08-21 14:23:50 -0400 Josef 'Jeff' Sipek (de4d3eb974) - - stats: event exporter - Use category exporting helper to avoid duplicates - (json) - - -M src/stats/event-exporter-fmt-json.c - -2020-08-21 14:23:14 -0400 Josef 'Jeff' Sipek (eb4c8a9a5a) - - stats: Add helper to append category names without duplicates - - -M src/stats/event-exporter-fmt.c -M src/stats/event-exporter.h - -2020-08-28 18:36:47 +0300 Timo Sirainen (6f42f48bd3) - - lib: net_listen|connect_unix() - Use consistent error handling for too long - paths - - The errno should be the same for both functions. Prefer ENAMETOOLONG if it - exists on the OS, otherwise fallback to EOVERFLOW. - -M src/lib/net.c -M src/lib/test-net.c - -2020-09-11 08:22:11 +0300 Aki Tuomi (1f2ac2afaa) - - lib-dict: dict - Keep track of next commit in dict_wait - - Satisfies static analyser, broken in - 178bb676ea1dd380789d3587bf5e64fd85a29d7a - -M src/lib-dict/dict.c - -2020-09-10 17:56:49 +0300 Aki Tuomi (b4a048914a) - - lib-dict: dict - Ensure there are no commits during deinit - - -M src/lib-dict/dict.c - -2020-09-10 17:43:06 +0300 Aki Tuomi (24aca7088f) - - lib-dict: dict - Allow calling callback immediately - - Make callback calls the next callback immediately, instead of adding a - timeout that calls the callback. - - Forgotten in 178bb676ea1dd380789d3587bf5e64fd85a29d7a - -M src/lib-dict/dict.c - -2020-09-10 17:42:19 +0300 Aki Tuomi (5db10b21b3) - - lib-dict: dict - Change background to delayed_callback - - It better describes what it's intended to do. - -M src/lib-dict/dict.c - -2020-08-12 15:48:14 +0300 Timo Sirainen (6907021530) - - acl: Add unit test for acl_rights_sort() - - -M src/plugins/acl/Makefile.am -A src/plugins/acl/test-acl.c - -2020-08-12 15:46:31 +0300 Timo Sirainen (3d15b25968) - - acl: acl_rights_sort() - Handle zero sized rights array properly - - Fixes ubsan complaint about count-dest wrapping to negative. The array code - handled this properly though, so nothing was broken. - -M src/plugins/acl/acl-api.c - -2020-09-01 09:13:05 +0300 Aki Tuomi (9a389c7e88) - - lib: test-file-cache - Add tests for file-cache - - -M src/lib/Makefile.am -A src/lib/test-file-cache.c -M src/lib/test-lib.inc - -2020-08-20 16:47:12 +0300 Aki Tuomi (eab4b27d31) - - lib: log-throttle - Initialize last_throttle - - It's compared to ioloop_timeval later on and would produce overflow there. - -M src/lib/log-throttle.c - -2020-08-20 16:24:41 +0300 Aki Tuomi (bbca56c946) - - quota: quota_free_bytes - Check we don't decrease more than INT64_MAX - - Otherwise we get overflow - -M src/plugins/quota/quota.c - -2020-08-20 12:46:06 +0300 Aki Tuomi (d50a5a1151) - - lib: file-dotlock - Do not call callback if we are going to timeout - - -M src/lib/file-dotlock.c - -2020-08-20 10:55:36 +0300 Aki Tuomi (2a82a8a9da) - - lib-mail: istream-header-filter - Avoid unsigned overflow in last_offset - calculation - - Unsigned integer overflow occurs when size is 0. - -M src/lib-mail/istream-header-filter.c - -2020-08-20 10:37:54 +0300 Aki Tuomi (d34c873397) - - lib-ldap: ldap_connection_send_next - Extract next message in separate - function - - -M src/lib-ldap/ldap-connection.c - -2020-08-20 10:31:41 +0300 Aki Tuomi (70d98bc561) - - lib-storage: index-mail-headers - Avoid unsigned overflow on - header_match_value - - -M src/lib-storage/index/index-mail-headers.c - -2020-08-20 09:53:11 +0300 Aki Tuomi (4eb3f6f273) - - imap: imap-sync - Avoid unsigned integer overflow - - Error: imap-sync.c:433:17: runtime error: unsigned integer overflow: - 4294967295 + 1 cannot be represented in type 'unsigned int' - -M src/imap/imap-sync.c - -2020-08-20 09:44:58 +0300 Aki Tuomi (3a5ebc8e80) - - lib-mail: test-istream-attachment - Avoid unsigned overflow in size - calculation - - -M src/lib-mail/test-istream-attachment.c - -2020-08-20 09:44:20 +0300 Aki Tuomi (43f8729587) - - lib: var-expand - Avoid unsigned overflow in offset calculation - - -M src/lib/var-expand.c - -2020-08-20 09:43:35 +0300 Aki Tuomi (16ab55427a) - - lib: time-util - Use correct data types - - -M src/lib/time-util.c - -2020-08-20 09:34:40 +0300 Aki Tuomi (192d351aec) - - quota: quota-imapc - Handle quota limits better - - If quota limit is bigger than INT64_MAX, it's unlimited as we cannot express - this anyways. - -M src/plugins/quota/quota-imapc.c - -2020-08-20 09:10:36 +0300 Aki Tuomi (7ca5c15b7f) - - lib-mail: message-parser - Change last_chr to unsigned char - - Matches code usage. - -M src/lib-mail/message-parser-private.h - -2020-08-20 09:02:07 +0300 Aki Tuomi (1a29b5ec0c) - - lib-imap-storage: imap-msgpart - Fix constant type - - -M src/lib-imap-storage/imap-msgpart.c - -2020-08-20 08:47:16 +0300 Aki Tuomi (a0ea53c313) - - auth: password-scheme - Fix salt generation data type mess - - Satisfies runtime analyser - -M src/auth/password-scheme.c - -2020-08-20 08:44:45 +0300 Aki Tuomi (13254b7a45) - - auth: mech-scram - Use correct data type for proof calculation - - Satisfies runtime analyzer - -M src/auth/mech-scram.c - -2020-08-31 16:15:15 +0300 Aki Tuomi (faa0c21f21) - - lib: Remove istream-mmap.c - - Nothing uses it. - -M src/lib/Makefile.am -D src/lib/istream-mmap.c -M src/lib/istream.h - -2020-08-31 10:33:05 +0300 Aki Tuomi (28d085f408) - - lib-ntlm: Ensure data_size is large enough for buffer - - -M src/lib-ntlm/ntlm-message.c - -2020-08-13 09:48:27 +0300 Aki Tuomi (371025a287) - - lib-ntlm: Use CONST_PTR_OFFSET - - -M src/lib-ntlm/ntlm-message.c -M src/lib-ntlm/ntlm.h - -2020-08-13 09:46:37 +0300 Aki Tuomi (4a264f8f70) - - auth, lib-ntlm: Use dovecot byteorder functions - - -M src/auth/mech-ntlm.c -M src/lib-ntlm/Makefile.am -D src/lib-ntlm/ntlm-byteorder.h -M src/lib-ntlm/ntlm-message.c -M src/lib-ntlm/ntlm.h - -2020-08-11 09:00:17 +0300 Aki Tuomi (acba0e7c3d) - - lib: buffer - Assert that we don't try to allocate SIZE_MAX buffer - - Only if devel checks are enabled - -M src/lib/buffer.c - -2020-08-11 08:45:37 +0300 Aki Tuomi (c2631470a7) - - lib-ssl-iostream: ostream-openssl - Allocate at most IO_BLOCK_SIZE initial - buffer - - Otherwise we might attempt to allocate way too large buffers. This has not - caused issues yet, except with max_buffer_size=SIZE_T, which has been - causing us to allocate 0-sized buffers. - -M src/lib-ssl-iostream/ostream-openssl.c - -2020-08-10 19:54:51 +0300 Aki Tuomi (ddf34a7a7c) - - auth: auth-cache - Data is not 4 bytes but variable sized - - -M src/auth/auth-cache.c -M src/auth/auth-cache.h - -2020-08-13 11:41:23 +0300 Aki Tuomi (91c831378a) - - lib-otp: Use for-loop instead while - - Avoids unsigned integer wrap - -M src/lib-otp/otp-hash.c - -2020-08-13 11:40:35 +0300 Aki Tuomi (6473c1a61f) - - lib-compression: istream-zstd - Handle signed/unsigned return values - correctly - - -M src/lib-compression/istream-zstd.c - -2020-08-13 11:39:59 +0300 Aki Tuomi (20765bf476) - - lib: lib-event - Use for-loop in copying categories - - Avoids unsigned integer wrap - -M src/lib/lib-event.c - -2020-08-19 13:55:18 +0300 Aki Tuomi (5c7b859710) - - global: Use i_rand_limit(limit) instead of i_rand() % limit - - spatch with coccinelle/random-misuse.cocci - -A coccinelle/random-misuse.cocci -M src/director/director-test.c -M src/lib-fts/test-fts-tokenizer.c -M src/lib/test-array.c -M src/lib/test-data-stack.c -M src/lib/test-hash.c -M src/lib/test-istream-crlf.c -M src/lib/test-istream-multiplex.c -M src/lib/test-multiplex.c -M src/lib/test-ostream-multiplex.c -M src/lib/test-seq-range-array.c - -2020-08-19 14:01:50 +0300 Aki Tuomi (a8705c0a82) - - lib: Use i_rand_limit() helpers - - -M src/lib/test-array.c -M src/lib/test-base32.c -M src/lib/test-base64.c -M src/lib/test-buffer.c -M src/lib/test-istream-base64-decoder.c - -2020-08-19 14:00:03 +0300 Aki Tuomi (761f5d7796) - - lib: test-base32/64 - Use unsigned char - - Simplifies next change - -M src/lib/test-base32.c -M src/lib/test-base64.c - -2020-08-19 19:49:38 +0300 Aki Tuomi (5549aec84f) - - lib: Add some helpers for random values - - -M src/lib/lib.h - -2020-08-19 14:33:59 -0400 Josef 'Jeff' Sipek (bbdd5bb3b7) - - lib: Document how i_rand_limit() ensures uniform distribution - - This algorithm is not original, but it is dense enough that a detailed - explanation is in order. - -M src/lib/rand.c - -2020-08-13 11:35:17 +0300 Aki Tuomi (0589ced751) - - lib: rand - Fix random number bounding - - -M src/lib/rand.c - -2020-08-11 08:48:09 +0300 Aki Tuomi (6c21966242) - - auth: password-scheme - Use generate_salt in md5crypt - - Deduplicates code - -M src/auth/password-scheme.c - -2020-08-23 23:24:35 +0300 Aki Tuomi (74598bd6d3) - - lib-sql: driver-cassandra - Add SSL options - - ssl_ca=: Sets trusted peer certificate filename ssl_cert=: Sets - client certificate filename sl_key=: Sets client certificate private - key filename ssl_key_password=: Sets password for private key - ssl_verify=none | cert | cert-ip | cert-dns: Sets verify mode - * none = don't verify - * cert = verify certificate - * cert-ip = verify IP from CN or SubjectAltName - * cert-dns = verify hostname from CN or SubjectAltName - -M src/lib-sql/driver-cassandra.c - -2020-08-23 23:05:33 +0300 Aki Tuomi (0429b4aaf5) - - lib: buffer - Add buffer_append_full_(file|istream) - - Consume istream or file up to max_read_size or EOF. - -M src/lib/Makefile.am -A src/lib/buffer-istream.c -M src/lib/buffer.h -A src/lib/test-buffer-istream.c -M src/lib/test-lib.inc - -2020-08-23 22:24:07 +0300 Aki Tuomi (c25e20d658) - - m4: want_cassandra.m4 - Add check for CASS_SSL_VERIFY_PEER_IDENTITY_DNS - - -M m4/want_cassandra.m4 - -2020-08-23 22:06:50 +0300 Aki Tuomi (5cf96c1e73) - - m4: want_cassandra.m4 - Add check for - cass_cluster_set_use_hostname_resolution - - -M m4/want_cassandra.m4 - -2020-08-23 22:06:34 +0300 Aki Tuomi (f4f08ac194) - - m4: Modernize want_cassandra.m4 - - -M m4/want_cassandra.m4 - -2020-08-28 13:17:10 +0300 Aki Tuomi (8055e6bacd) - - lib-sql: driver-cassandra - Use INTx_MIN and INTx_MAX - - Preferred over magic numbers - -M src/lib-sql/driver-cassandra.c - -2020-08-28 13:13:32 +0300 Aki Tuomi (e1c3224a48) - - lib-sql: Reformat driver-cassandra.c - - -M src/lib-sql/driver-cassandra.c - -2020-09-09 12:08:38 +0300 Timo Sirainen (60b4040ba4) - - lib-compression: Add unit test to compress large input - - This catches earlier zstd and lzma bugs. - -M src/lib-compression/test-compression.c - -2020-09-09 13:00:44 +0300 Timo Sirainen (3d0f6cf3e0) - - lib-compression: ostream-lzma - Compressed output could have been truncated - - The compression wasn't fully finished, resulting in truncated compressed - output that couldn't be fully read back. Reading would result in "Broken - pipe" errors. - - Broken by 6080aa16e1bd50cd661acc31203d9f4986a9450a - -M src/lib-compression/ostream-lzma.c - -2020-09-09 12:48:39 +0300 Timo Sirainen (d559f58767) - - lib-compression: istream-lzma - Improve error messages in EOF handling - - -M src/lib-compression/istream-lzma.c - -2020-09-09 12:46:51 +0300 Timo Sirainen (a775fe3d06) - - lib-compression: istream-lzma - Fix EOF handling - - lzma_stream_end() call was accidentally dropped by - c6248b825d8c6562b1320e51ad0d88e99b9fbe85 - - This (probably) didn't result in visible problems. - -M src/lib-compression/istream-lzma.c - -2020-09-08 21:19:21 +0300 Timo Sirainen (a96e742047) - - lib-compression: ostream-zstd - Fix assert-crash with large input - - If the input was large enough, the ostream write could have returned - partially written output. Since this ostream-zstd was only used for blocking - ostreams, this would always result in an assert-crash. Fix is to keep - flushing the output to parent if the output buffer becomes full. - - Fixes: Panic: file ostream.c: line 287 (o_stream_sendv_int): assertion - failed: (!stream->blocking) - -M src/lib-compression/ostream-zstd.c - -2020-09-09 12:03:31 +0300 Timo Sirainen (48083d9e7f) - - lib: ostream-buffer: Return 0 as the used size, not the destination buffer - size - - This allows using ostream-buffer in places that previously would think that - the ostream buffer needed to be flushed because its buffer size was too - large. - - This also changes o_stream_get_buffer_avail_size() to always return the - ostream max buffer size. - -M src/lib/ostream-buffer.c -M src/lib/test-ostream-buffer.c - -2020-08-31 15:29:03 +0200 Stephan Bosch (2d9f3124da) - - lib-smtp: smtp-server-recipient - Recipient event should be using the - transaction event as parent. - - The connection event is only used as event parent when the MAIL command - failed in pipeline or when the recipient is destroyed prematurely. The log - prefix of the transaction event is dropped, so that the connection event log - prefix is used in either case. Therefore, the main visible effect of this - commit is that the transaction event fields are available in the recipient - event when there is a transaction, the log messages will not change. - -M src/lib-smtp/smtp-server-recipient.c - -2020-08-31 14:10:18 +0200 Stephan Bosch (e0529aa325) - - lib-smtp: smtp-server-recipient - Don't create event until transaction - becomes available. - - This way, the recipient event parent can be the transaction event once (and - if) that becomes available. - -M src/lib-smtp/smtp-server-cmd-rcpt.c -M src/lib-smtp/smtp-server-private.h -M src/lib-smtp/smtp-server-recipient.c - -2020-08-31 14:58:44 +0200 Stephan Bosch (55a8b332c0) - - lib-smtp: smtp-server-command - Always call the NEXT_TO_REPLY hook. - - Before, it wasn't called when a reply was submitted before the command - became next to reply. - -M src/lib-smtp/smtp-server-cmd-mail.c -M src/lib-smtp/smtp-server-cmd-rcpt.c -M src/lib-smtp/smtp-server-command.c -M src/lib-smtp/smtp-server-connection.c - -2020-08-31 14:44:25 +0200 Stephan Bosch (1cae0ff5c8) - - lib-smtp: smtp-server-command - Move smtp_server_command_ready_to_reply(). - - New order makes more sense in the progression of command state. - -M src/lib-smtp/smtp-server-command.c - -2020-09-02 11:15:33 +0200 Stephan Bosch (205b9fd9f4) - - lib: event-log - Fix handling dropping parent prefixes beyond a drop at a - higher level. - - Before, the drop in the higher level became invisible to the lower - hiererarchies. For example: - - parent1, parent2, parent3, parent4(drop one) yielded - "parent1: parent2: parent4: " as a prefix (which is still OK), whereas - parent1: parent2: parent3: parent4(drop one): leaf(drop 3) yielded - "parent1: leaf: ", while the expected prefix would be: - "leaf: ". - - This means that the drop of one prefix by parent4 is ignored. Instead it - should apply that drop and operate on the prefixes that are still visible at - the lowel level, so the number of prefixes dropped should be additive, which - is what this commit changes. - -M src/lib/event-log.c -M src/lib/test-event-log.c - -2020-08-31 15:08:43 +0200 Stephan Bosch (fbd4baa150) - - lib-smtp: Reformat smtp-server-recipient.c. - - -M src/lib-smtp/smtp-server-recipient.c - -2020-08-31 14:40:16 +0200 Stephan Bosch (6848a98e52) - - lib-smtp: Reformat smtp-server-private.h. - - -M src/lib-smtp/smtp-server-private.h - -2020-08-31 14:37:35 +0200 Stephan Bosch (5cd3c75a8e) - - lib-smtp: Reformat smtp-server-connection.c. - - -M src/lib-smtp/smtp-server-connection.c - -2020-08-31 14:21:41 +0200 Stephan Bosch (4d7f258c93) - - lib-smtp: Reformat smtp-server-command.c. - - -M src/lib-smtp/smtp-server-command.c - -2020-08-31 14:16:31 +0200 Stephan Bosch (953c35eed3) - - lib-smtp: Reformat smtp-server-cmd-mail.c. - - -M src/lib-smtp/smtp-server-cmd-mail.c - -2020-08-31 14:13:31 +0200 Stephan Bosch (bb6edd5e63) - - lib-smtp: Reformat smtp-server-cmd-rcpt.c. - - -M src/lib-smtp/smtp-server-cmd-rcpt.c - -2020-09-07 10:56:34 +0300 Aki Tuomi (178bb676ea) - - lib-dict: dict_transaction_commit_async() - Never call callback immediately - - This could cause confusion for the callers. Although so far all the callers - have handled it fine. - - Use this wrappers for all dict drivers, even if they support async commits - themselves. This is because many of them were still calling the callback - immediately on error handling. - -M src/lib-dict/dict-private.h -M src/lib-dict/dict.c - -2020-09-10 10:16:56 +0300 Timo Sirainen (54bc6c2d4e) - - lib: istream-try - Fix off-by-one check for min_buffer_full_size - - This mainly fixes random failures with the unit test. - -M src/lib/istream-try.c - -2020-09-10 10:16:35 +0300 Timo Sirainen (7a16c2e06d) - - lib: test-istream-try - Fix test name - - -M src/lib/test-istream-try.c - -2020-09-08 17:32:32 +0300 Timo Sirainen (6d4c1a6506) - - lib: istream-try - Fix detecting istream when its input buffer is full - - The previous check didn't work when the stream's buffer_size was 0, which - happened with istream-concat parent. - - Added also a unit test that tries to test for these kind of situations. It - doesn't actually reproduce this specific bug, but it tests that the code - paths works at least in the generic situation. - -M src/lib/istream-try.c -M src/lib/istream-try.h -M src/lib/test-istream-try.c -M src/plugins/fs-compress/fs-compress.c - -2020-09-08 20:14:09 +0300 Timo Sirainen (b1ca1ba084) - - lib-compression: Add COMPRESSION_HDR_MAX_SIZE macro - - Will be used by the next commit. - -M src/lib-compression/compression.h - -2020-07-08 10:18:27 +0200 Markus Valentin (43131bf97f) - - quota: Add logging prefix once and remove it from loglines - - -M src/plugins/quota/quota-storage.c -M src/plugins/quota/quota.c - -2020-07-07 14:39:22 +0200 Markus Valentin (f4ab672321) - - quota: Introduce per quota-backend events - - -M src/plugins/quota/quota-count.c -M src/plugins/quota/quota-dict.c -M src/plugins/quota/quota-dirsize.c -M src/plugins/quota/quota-fs.c -M src/plugins/quota/quota-imapc.c -M src/plugins/quota/quota-maildir.c -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota.c - -2019-10-31 19:27:15 +0200 Timo Sirainen (d9f9d08624) - - quota: Use event based logging - - -M src/plugins/quota/quota-dict.c -M src/plugins/quota/quota-fs.c -M src/plugins/quota/quota-imapc.c -M src/plugins/quota/quota-maildir.c -M src/plugins/quota/quota-storage.c -M src/plugins/quota/quota-util.c -M src/plugins/quota/quota.c - -2020-08-25 14:01:24 +0300 Aki Tuomi (25ed309c85) - - quota: Add event support - - -M src/plugins/quota/quota-private.h -M src/plugins/quota/quota.c - -2020-08-31 18:30:18 +0300 Timo Sirainen (15ae4f8c63) - - lib-index: Fix cache being purged too often when it had unaccessed fields - - Cache was being purged when it had a field that was last accessed after - mail_cache_unaccessed_field_drop but before - 2*mail_cache_unaccessed_field_drop. This purging may not have even done - anything. - - Use shared code now between the check in mail_cache_header_fields_read() and - the actual purging in mail_cache_purge_check_field(). This way they can't - become desynced again. - -M src/lib-index/mail-cache-fields.c -M src/lib-index/mail-cache-private.h -M src/lib-index/mail-cache-purge.c - -2020-08-31 17:27:58 +0300 Timo Sirainen (c4a85ba0e4) - - lib-index: Use delayed purge reason for mail_cache_purge_* events - - -M src/lib-index/mail-cache-purge.c -M src/lib-index/mail-cache.h -M src/lib-index/mail-index-sync.c - -2020-08-31 17:25:54 +0300 Timo Sirainen (4dd52e0499) - - lib-index: Remember reason for delayed cache file purges - - -M src/lib-index/mail-cache-fields.c -M src/lib-index/mail-cache-private.h -M src/lib-index/mail-cache-purge.c -M src/lib-index/mail-cache.c -M src/lib-index/mail-cache.h - -2020-08-31 17:23:05 +0300 Timo Sirainen (bfd065af9e) - - lib-index: Fix file_size field in mail_cache_purge_finished event - - It used to be 32 always. - -M src/lib-index/mail-cache-purge.c - -2020-08-26 18:39:22 +0300 Timo Sirainen (fe21413485) - - lib-index: Fix deadlock when expunging mails and adding lots of data to - cache - - This practically happened only when dovecot.index.cache contents were lost - and they were being re-filled while mails were also being expunged. - - Broken by 9efb99924d0b7de27ca83e373f2290f3dd5b22cf - -M src/lib-index/mail-cache-transaction.c - -2020-08-28 17:16:03 +0300 Timo Sirainen (b3f95fbad7) - - zlib: Rename istreams from zlib(parent) to compress(parent) - - This clarifies it that the istream is a generic compression stream, not - specifically zlib/gz. - -M src/plugins/zlib/zlib-plugin.c - -2020-08-28 17:13:32 +0300 Timo Sirainen (154109921d) - - lib-compression: ostreams - Add asserts to clarify how buffer flushing works - - If the output buffer isn't fully sent, the flush function returns 0 early - on, before setting flushed=TRUE. - -M src/lib-compression/ostream-bzlib.c -M src/lib-compression/ostream-lzma.c -M src/lib-compression/ostream-zlib.c -M src/lib-compression/ostream-zstd.c - -2020-08-28 16:57:57 +0300 Timo Sirainen (1e3f43e124) - - auth: Fix leaking memory if auth client disconnects with pending penalty - delays - - * auth penalty lookup returns that auth_request needs a penalty delay - * during the penalty timeout auth client disconnects - * auth requests are freed, but auth_request_handler isn't unreferenced - - This resulted in memory leak, and after recent changes also logging warnings - about event leaks. - -M src/auth/auth-request-handler.c -M src/auth/auth-request-handler.h -M src/auth/auth-request.c -M src/auth/auth-request.h - -2020-08-27 18:35:33 +0300 Timo Sirainen (01a112995f) - - lib-auth: Remove duplicate auth_client_connection.event - - It's already in auth_client_connection.conn.event. Just use it directly to - avoid any confusion between them. - -M src/lib-auth/auth-client-connection.c -M src/lib-auth/auth-client-private.h -M src/lib-auth/auth-client-request.c - -2020-08-27 17:28:38 +0300 Timo Sirainen (50a6a5c0db) - - auth: Fix compiling gssapi, bsdauth, sia, vpopmail - - Broken by 5ff7299c9d85b1bab0c7d53d9459dbb31a2bd9d6 - -M src/auth/mech-gssapi.c -M src/auth/passdb-bsdauth.c -M src/auth/passdb-sia.c -M src/auth/passdb-vpopmail.c -M src/auth/userdb-vpopmail.c - -2020-08-20 00:24:52 +0200 Stephan Bosch (c2df8fa8ba) - - lib-http: test-http-client-errors - Add tests involving idle connections. - - Tests idle timeout and connection reuse. - -M src/lib-http/test-http-client-errors.c - -2020-08-20 00:17:49 +0200 Stephan Bosch (ef4e71e5c2) - - lib-http: http-client-connection - Use http_client_connection_is_active() to - check idle status. - - This makes the check shorter and easier to understand. - -M src/lib-http/http-client-connection.c - -2020-08-12 22:30:35 +0200 Stephan Bosch (6f16b0d63e) - - lib-http: http-client-queue - Fix unsigned int arithmetic problem in - http_client_queue_request_timeout_cmp(). - - -M src/lib-http/http-client-queue.c - -2020-08-13 19:31:30 +0200 Stephan Bosch (ba7357541e) - - lib-http: http-client-connection - Use timeout_add_short_to() for idle - timeout. - - The idle timeout can be very short. - -M src/lib-http/http-client-connection.c - -2020-08-12 21:33:08 +0200 Stephan Bosch (f9751e9b22) - - lib-http: http-client-connection - Make idle timeout calculation more - robust. - - -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-private.h - -2020-08-12 22:24:22 +0200 Stephan Bosch (7e849b84ac) - - lib-http: http-client-connection - Explicitly handle an infinite connection - limit for setting idle timeout. - - This can just use the maximum idle timeout directly. - -M src/lib-http/http-client-connection.c - -2020-08-12 22:20:26 +0200 Stephan Bosch (32f0fc2b41) - - lib-http: http-client-connection - Deal with first idle connection - separately for setting idle timeout. - - This can just use the maximum idle timeout directly. - -M src/lib-http/http-client-connection.c - -2020-08-12 21:17:08 +0200 Stephan Bosch (2d49e42f9a) - - lib-http: http-client-connection - Improve overall logic in - http_client_connection_start_idle_timeout(). - - Make clear that idle_count < max when it is used. - -M src/lib-http/http-client-connection.c - -2020-08-12 18:00:45 +0200 Stephan Bosch (09acd5c1eb) - - lib-http: http-client-connection - Start idle state in a common function. - - Removes code duplication. - -M src/lib-http/http-client-connection.c - -2020-08-12 20:35:46 +0200 Stephan Bosch (6ea3dc6f41) - - lib-http: http-client-connection - Handle infinite idle timeout - consistently. - - -M src/lib-http/http-client-connection.c - -2020-08-12 20:11:01 +0200 Stephan Bosch (8255f15bfc) - - lib-http: http-client-connection - Start idle timeout in a common function. - - -M src/lib-http/http-client-connection.c - -2020-08-12 19:54:50 +0200 Stephan Bosch (dda4e8d8a5) - - lib-http: http-client-connection - Use separate flag for idle status. - - It used the presence of the idle timeout before, which isn't acceptable when - the timeout is changed to be optional (happens in later commit). - -M src/lib-http/http-client-connection.c -M src/lib-http/http-client-private.h - -2020-08-12 17:16:12 +0200 Stephan Bosch (d1d65664bf) - - lib-http: http-client-connection - Determine idle timeout consistently. - - It should not matter whether connection got idle due to lost peer or - otherwise. - -M src/lib-http/http-client-connection.c - -2020-08-12 17:10:20 +0200 Stephan Bosch (9ead85be5b) - - lib-http: http-client-connection - Restructure - http_client_connection_check_idle(). - - -M src/lib-http/http-client-connection.c - -2020-08-12 17:06:23 +0200 Stephan Bosch (60bd3475f6) - - lib-http: http-client-connection - Restructure - http_client_connection_lost_peer(). - - -M src/lib-http/http-client-connection.c - -2020-08-12 21:47:39 +0200 Stephan Bosch (50814cc74f) - - lib-http: http-client-peer - Properly saturate result of - http_client_peer_shared_max_connections() at UINT_MAX. - - -M src/lib-http/http-client-peer.c - -2020-08-12 18:27:48 +0200 Stephan Bosch (ecaf195beb) - - lib-http: Reformat http-client-connection.c. - - -M src/lib-http/http-client-connection.c - -2018-03-20 20:59:07 +0100 Stephan Bosch (111b0d3063) - - lib-http: Reformat http-client-private.h. - - -M src/lib-http/http-client-private.h - -2018-03-20 20:59:21 +0100 Stephan Bosch (9b0f648c58) - - lib-http: Reformat http-client-queue.c. - - -M src/lib-http/http-client-queue.c - -2018-03-20 20:58:56 +0100 Stephan Bosch (4dd39dc63d) - - lib-http: Reformat http-client-peer.c. - - -M src/lib-http/http-client-peer.c - -2020-08-10 14:43:11 +0300 Aki Tuomi (a88b78fa5a) - - lib-auth: Do not send ssl details to auth process - - They are not used for anything. But we still provide them as auth_client - event fields, so that we can e.g. do metrics on which TLS protocol is used. - -M src/lib-auth/auth-client-request.c - -2020-08-10 10:56:14 +0300 Aki Tuomi (b2511e8d6b) - - lib-auth: Add user_mask to auth_userdb_list events - - -M src/lib-auth/auth-master.c - -2020-08-10 10:23:19 +0300 Aki Tuomi (4e3ae6fab7) - - lib-auth: Add new fields to auth_client_userdb events - - -M src/lib-auth/auth-master.c - -2020-08-10 09:29:10 +0300 Aki Tuomi (395ef5b35c) - - doveadm: doveadm-auth - Add support for real_{remote|local}_{ip|port} -x - parameters - - -M src/doveadm/doveadm-auth.c - -2020-08-10 09:11:41 +0300 Aki Tuomi (d4a70a35ee) - - doveadm: doveadm-auth - Add session and local_name -x parameters - - -M src/doveadm/doveadm-auth.c - -2020-08-10 09:10:08 +0300 Aki Tuomi (6c5b749390) - - lib-auth: Add session_id and local_name to master auth - - -M src/lib-auth/auth-master.c -M src/lib-auth/auth-master.h - -2020-08-06 10:52:18 +0300 Aki Tuomi (f02877312e) - - lmtp: Rename orig_user event field to original_user - - -M src/lmtp/lmtp-proxy.c - -2020-07-27 09:11:47 +0300 Aki Tuomi (d1aaeab138) - - lib-auth: Add more fields to auth client event - - This way it becomes more useful - -M src/lib-auth/auth-client-request.c - -2020-07-27 12:26:49 +0300 Aki Tuomi (36de1858d0) - - lib-auth: Always iterate input arguments - - Makes next change easier - -M src/lib-auth/auth-client-request.c - -2020-07-27 08:48:49 +0300 Aki Tuomi (0e3468f07e) - - lib-auth: Send event after setting all fields - - -M src/lib-auth/auth-client-request.c - -2020-08-06 19:38:33 +0300 Timo Sirainen (d602274721) - - man: doveadm-auth - List more -x fields - - -M doc/man/doveadm-auth.1.in - -2020-08-06 14:13:29 +0300 Timo Sirainen (570ad473dd) - - auth: Add some unit testing for auth_request_import/export() - - -M src/auth/Makefile.am -A src/auth/test-auth-request-fields.c -M src/auth/test-auth.h -M src/auth/test-main.c - -2020-08-06 14:10:50 +0300 Timo Sirainen (4d46d3e5cf) - - auth: Escape exported session ID string in protocol replies - - Session ID is normally coming only from trusted sources, so the lack of - escaping shouldn't have mattered too much. - -M src/auth/auth-request-fields.c - -2020-08-05 22:48:40 +0300 Timo Sirainen (3edbefb705) - - auth: Worker commands: Rename "id" event field to "command_id" - - Now that auth_request events are inherited from worker command events, the - "id" field was also inherited. This is rather confusing and might conflict - with other IDs in the future, so better to rename it already. - -M src/auth/auth-worker-client.c - -2020-08-05 22:45:30 +0300 Timo Sirainen (e53e98204d) - - auth: Support inheritance for master auth_requests' events - - Requests created by auth worker will inherit from the command's event, while - other events inherit from the global auth_event for now (since - auth-master-connection doesn't have its own event yet). - -M src/auth/auth-master-connection.c -M src/auth/auth-request.c -M src/auth/auth-request.h -M src/auth/auth-worker-client.c -M src/auth/test-lua.c - -2020-08-05 22:43:55 +0300 Timo Sirainen (95f89e9048) - - auth: Inherit auth client connection event from the global auth_event - - -M src/auth/auth-client-connection.c - -2020-06-25 20:03:57 +0300 Timo Sirainen (b06d4c7309) - - doveadm auth: Support forward and extra fields with -x parameter - - Using "forward_" prefix assumes that it's a forwarded field. Otherwise all - unknown parameters are assumed to be extra fields. - -M src/doveadm/doveadm-auth.c - -2020-08-05 22:25:12 +0300 Timo Sirainen (1d5bbaf127) - - lib-auth: auth-client - Support sending extra_fields. - - -M src/lib-auth/auth-client-request.c -M src/lib-auth/auth-client.h - -2020-05-28 23:10:41 +0200 Stephan Bosch (4ac4b3b5d2) - - lib-auth: auth-master - Support sending extra_fields. - - -M src/lib-auth/auth-master.c -M src/lib-auth/auth-master.h - -2020-08-04 17:35:30 +0300 Timo Sirainen (29371f227e) - - auth: Add more event fields - - -M src/auth/auth-request-fields.c - -2020-08-04 17:34:42 +0300 Timo Sirainen (b0fb82bb67) - - auth: Set event fields immediately when they're changed in - auth_request_fields - - This way the fields are available for all auth events, not just the final - events. - -M src/auth/auth-request-fields.c -M src/auth/auth-request.c - -2020-08-06 12:29:07 +0300 Timo Sirainen (6c0fb43324) - - auth: Remove "username" and "domain" event fields - - They're not very useful in event fields, since event filtering can just do - user=username@* or user=*@domain. - -M src/auth/auth-request.c - -2020-08-04 17:30:02 +0300 Timo Sirainen (8499ff49e6) - - auth: Remove "credentials_scheme" event field - - This field wasn't set for plaintext authentication, and in general it's not - quite what it was intended to be. Better to remove it entirely to avoid - confusion. - -M src/auth/auth-request.c - -2020-08-04 17:29:32 +0300 Timo Sirainen (764265bfdf) - - auth: Rename auth_request.credentials_scheme to wanted_credentials_scheme - - Also add comments explaining what it actually does. - -M src/auth/auth-request.c -M src/auth/auth-request.h -M src/auth/auth-worker-client.c -M src/auth/db-checkpassword.c -M src/auth/passdb-blocking.c -M src/auth/passdb-checkpassword.c -M src/auth/passdb-dict.c -M src/auth/passdb-ldap.c -M src/auth/passdb-sql.c -M src/auth/passdb.c - -2020-08-04 16:46:15 +0300 Timo Sirainen (6619fbab6f) - - auth: Rename "orig_user" event field to "original_user" - - It's a bit more understandable to use the full name. There's now also - %{original_user} variable alias. - -M src/auth/auth-request.c - -2020-08-04 16:30:59 +0300 Timo Sirainen (3822c3e6e3) - - auth: Rename "mech" event field to "mechanism" - - It's a bit more understandable to use the full name. There's now also - %{mechanism} variable alias. - -M src/auth/auth-request-fields.c - -2020-08-03 18:51:33 +0300 Timo Sirainen (97749d387f) - - auth: Keep auth_request_fields const for most of the code - - This way there's a compiler warning/error if anything outside - auth-request-fields.c attempts to modify them. It makes it easier to keep - the values synced with events. - -M src/auth/auth-request-fields.c -M src/auth/auth-request.h -M src/auth/test-auth.h - -2020-08-04 16:16:18 +0300 Timo Sirainen (8c698ff01e) - - auth: test-mech - Fix include ordering - - Required by the following change. - -M src/auth/test-mech.c - -2020-08-04 14:48:23 +0300 Timo Sirainen (4d724f877b) - - auth: Add and use auth_request_set_delayed_credentials() - - -M src/auth/auth-request-fields.c -M src/auth/auth-request.c -M src/auth/auth-request.h - -2020-08-04 14:44:00 +0300 Timo Sirainen (8f86c02d64) - - auth: Add and use auth_request_set_login_username_forced() - - -M src/auth/auth-request-fields.c -M src/auth/auth-request.c -M src/auth/auth-request.h - -2020-08-04 14:28:28 +0300 Timo Sirainen (39c4197b30) - - auth: LIST - Use auth_request_import() to set missing "service" - - -M src/auth/auth-master-connection.c - -2020-08-04 14:26:08 +0300 Timo Sirainen (c5a72becc6) - - auth: Use auth_request_init_userdb_reply() always for initializing - userdb_reply - - -M src/auth/auth-request-fields.c -M src/auth/auth-request.c - -2020-08-04 14:23:18 +0300 Timo Sirainen (e04efc5cbf) - - auth: auth_request_init_userdb_reply() - Add add_default_fields parameter - - -M src/auth/auth-request-fields.c -M src/auth/auth-request.c -M src/auth/auth-request.h -M src/auth/auth-worker-client.c - -2020-08-04 14:22:16 +0300 Timo Sirainen (544781e8d4) - - auth: Move auth_request_init_userdb_reply() to auth-request-fields.c - - -M src/auth/auth-request-fields.c -M src/auth/auth-request.c - -2020-08-04 12:42:22 +0300 Timo Sirainen (1797aaf874) - - auth: Add and use auth_request_set_password_verified() - - -M src/auth/auth-request-fields.c -M src/auth/auth-request.c -M src/auth/auth-request.h - -2020-08-04 12:32:27 +0300 Timo Sirainen (4dc7edd911) - - auth: Add and use auth_request_set_auth_successful() - - -M src/auth/auth-request-fields.c -M src/auth/auth-request.c -M src/auth/auth-request.h - -2020-08-03 17:32:34 +0300 Timo Sirainen (deaba55862) - - auth: Add and use auth_request_set_realm() - - -M src/auth/auth-request-fields.c -M src/auth/auth-request.h -M src/auth/mech-digest-md5.c - -2020-08-03 17:25:59 +0300 Timo Sirainen (854ffb49fd) - - auth: Add and use auth_request_set_username_forced() - - -M src/auth/auth-master-connection.c -M src/auth/auth-request-fields.c -M src/auth/auth-request.c -M src/auth/auth-request.h -M src/auth/mech-anonymous.c -M src/auth/userdb-blocking.c - -2020-08-04 14:41:42 +0300 Timo Sirainen (cb06a8f19c) - - auth: Change auth_request_fix_username() to return int - - -M src/auth/auth-request-fields.c - -2020-08-04 14:35:49 +0300 Timo Sirainen (5f5256311a) - - auth: Optimize memory usage when auth_username_format is set - - The per-request memory pool was used unnecessarily to allocate the username - before the formatting was applied. - -M src/auth/auth-request-fields.c - -2020-08-03 17:16:12 +0300 Timo Sirainen (6bf74fbc35) - - auth: Move auth_request_fields initialization code to - auth_request_fields_init() - - -M src/auth/auth-request-fields.c -M src/auth/auth-request.c -M src/auth/auth-request.h - -2020-08-03 17:11:14 +0300 Timo Sirainen (51623b9e9e) - - auth: Move auth_request_master_lookup_finish() to auth-request-fields.c - - Also rename it to auth_request_master_user_login_finish(). - -M src/auth/auth-request-fields.c -M src/auth/auth-request.c -M src/auth/auth-request.h - -2020-08-03 17:07:22 +0300 Timo Sirainen (007deed21f) - - auth: Move username changing functions to auth-request-fields.c - - -M src/auth/auth-request-fields.c -M src/auth/auth-request.c - -2020-08-03 17:06:23 +0300 Timo Sirainen (f469acfcd2) - - auth: Change auth_request_get_log_prefix_db() to be public - - -M src/auth/auth-request.c -M src/auth/auth-request.h - -2020-08-03 16:49:00 +0300 Timo Sirainen (1c7ea685e6) - - auth: test-lua - Use auth_request_set_username() - - Instead of changing the user directly. - -M src/auth/test-lua.c - -2020-08-03 16:43:56 +0300 Timo Sirainen (8841d1b2a8) - - auth: test-lua - Deduplicate code into test_db_lua_auth_request_new() - - -M src/auth/test-lua.c - -2020-08-03 16:28:57 +0300 Timo Sirainen (6e07479735) - - auth: auth_request_fix_username() - Don't temporarily modify - auth_request_fields.user - - Use the new username parameter in auth_request_get_var_expand_table_full() - instead. - -M src/auth/auth-request.c - -2020-08-03 16:26:11 +0300 Timo Sirainen (e743e0b02b) - - auth: auth_cache_insert() - Don't temporarily modify - auth_request_fields.user - - Use the new username parameter in auth_request_get_var_expand_table_full() - instead. - -M src/auth/auth-cache.c -M src/auth/test-auth-cache.c - -2020-08-03 16:18:00 +0300 Timo Sirainen (aa21999180) - - auth: auth_request_get_var_expand_table_full() - Add username parameter - - -M src/auth/auth-policy.c -M src/auth/auth-request-var-expand.c -M src/auth/auth-request-var-expand.h -M src/auth/db-ldap.c -M src/auth/db-oauth2.c - -2020-08-04 16:45:19 +0300 Timo Sirainen (2522e957e1) - - auth: Add %{original_*} aliases for %{orig_*} - - -M src/auth/auth-request-var-expand.c -M src/auth/auth-request-var-expand.h - -2020-08-04 16:19:29 +0300 Timo Sirainen (bff8b10007) - - auth: Add %{mechanism} alias for %{mech} - - -M src/auth/auth-request-var-expand.c -M src/auth/auth-request-var-expand.h - -2020-04-27 16:43:39 +0300 Timo Sirainen (bb2a9ba49a) - - auth: Add %{[real_]local/remote_ip/port} aliases for - %{[real_]lip/rip/lport/rport) - - -M src/auth/auth-request-var-expand.c -M src/auth/auth-request-var-expand.h -M src/auth/test-auth-request-var-expand.c - -2020-08-03 15:10:35 +0300 Timo Sirainen (c5d940f758) - - auth: Move auth_request_export/import*() to auth-request-fields.c - - -M src/auth/Makefile.am -A src/auth/auth-request-fields.c -M src/auth/auth-request.c - -2020-08-03 14:56:12 +0300 Timo Sirainen (5ff7299c9d) - - auth: Move imported/exported fields to struct auth_request_fields - - This makes it clearer what fields are being passed between auth master and - worker processes. - -M src/auth/auth-cache.c -M src/auth/auth-master-connection.c -M src/auth/auth-penalty.c -M src/auth/auth-policy.c -M src/auth/auth-request-handler.c -M src/auth/auth-request-stats.c -M src/auth/auth-request-var-expand.c -M src/auth/auth-request.c -M src/auth/auth-request.h -M src/auth/auth-worker-client.c -M src/auth/db-checkpassword.c -M src/auth/db-lua.c -M src/auth/db-oauth2.c -M src/auth/mech-anonymous.c -M src/auth/mech-digest-md5.c -M src/auth/mech-dovecot-token.c -M src/auth/mech-external.c -M src/auth/mech-login.c -M src/auth/mech-ntlm.c -M src/auth/mech-otp-skey-common.c -M src/auth/mech-otp.c -M src/auth/mech-rpa.c -M src/auth/mech-skey.c -M src/auth/passdb-blocking.c -M src/auth/passdb-cache.c -M src/auth/passdb-dict.c -M src/auth/passdb-ldap.c -M src/auth/passdb-lua.c -M src/auth/passdb-pam.c -M src/auth/passdb-passwd.c -M src/auth/passdb-shadow.c -M src/auth/passdb-sql.c -M src/auth/passdb-static.c -M src/auth/passdb.c -M src/auth/test-auth-request-var-expand.c -M src/auth/test-lua.c -M src/auth/test-mech.c -M src/auth/userdb-blocking.c -M src/auth/userdb-passwd.c -M src/auth/userdb-static.c - -2020-08-03 14:31:30 +0300 Timo Sirainen (9743153243) - - auth: Remove auth_request->debug - - Use event_want_debug(auth_request->event) instead. - -M src/auth/auth-request.c -M src/auth/auth-request.h -M src/auth/db-ldap.c -M src/auth/passdb-imap.c -M src/auth/test-lua.c - -2020-08-03 14:29:55 +0300 Timo Sirainen (5110ff330c) - - auth: Remove unnecessary auth_request->debug checks - - e_debug() already checks whether debug logging is enabled. - -M src/auth/db-lua.c - -2020-04-26 20:15:39 +0300 Timo Sirainen (6ef8c6324d) - - lib: events - Use const event pointer for "get" functions - - -M src/lib/lib-event.c -M src/lib/lib-event.h - -2020-08-24 15:00:39 +0300 Timo Sirainen (cb875b83a8) - - lib-storage: mail_user_init_fs_settings() - Use user's event as fs parent - event - - -M src/lib-storage/mail-user.c - -2020-08-13 19:13:49 +0300 Aki Tuomi (68817df1ef) - - auth: test-mech - Fix type mismatch - - -M src/auth/test-mech.c - -2020-08-13 19:13:04 +0300 Aki Tuomi (a744f28294) - - auth: test-mech - Fix APOP challenge format - - -M src/auth/test-mech.c - -2020-08-17 18:06:14 +0200 Stephan Bosch (4e264dad2f) - - submission: submission-backend-relay - Handle relay server replies - consistently. - - Initial connection setup errors were handled differently when the reply came - into the ready callback first. - -M src/submission/submission-backend-relay.c - -2018-07-12 00:15:23 +0200 Stephan Bosch (a0a7d59e6a) - - lib-smtp: test-smtp-client-errors - Add test for server presenting invalid - SSL certificate. - - -M src/lib-smtp/Makefile.am -M src/lib-smtp/test-smtp-client-errors.c - -2018-07-14 13:16:05 +0200 Stephan Bosch (4032347467) - - lib-smtp: smtp-client-connection - If SSL connection gets lost, log the last - SSL error. - - -M src/lib-smtp/smtp-client-connection.c - -2018-07-12 00:15:31 +0200 Stephan Bosch (d5c5dffdf9) - - lib-smtp: smtp-client-connection - Handle connection loss uniformly at a - single location. - - Also amend the logged error message with SSL information when relevant. - -M src/lib-smtp/smtp-client-connection.c - -2018-07-14 12:19:07 +0200 Stephan Bosch (58ace7aaaf) - - lib-smtp: smtp-client-connection - Properly log SSL handshake failure - occuring during input read as an error. - - -M src/lib-smtp/smtp-client-connection.c - -2018-07-14 11:35:20 +0200 Stephan Bosch (a9849c479b) - - lib-smtp: smtp-client-connection - Restructure handling of immediate - connection failure. - - The delayed error callback is now started at a single location, much like - lib-http/client deals with this situation. - -M src/lib-smtp/smtp-client-connection.c -M src/lib-smtp/smtp-client-private.h - -2020-05-04 17:21:23 +0300 Timo Sirainen (db253d7e8e) - - master: Make sure a listener isn't added to a throttled service - - This fixes master process using 100% CPU in some situations when a service - is being throttled. - -M src/master/service-monitor.c - -2020-08-16 10:57:36 +0100 Paul G. Banks (fea1bacab9) - - auth: mech-gssapi - GSSAPI can contain NUL. - - -M src/auth/mech-gssapi.c - -2020-08-17 19:16:01 +0300 Timo Sirainen (6ab580a6e5) - - imap: Add "mailbox" field to successful imap_client_unhibernated event - - -M src/imap/imap-master-client.c - -2020-08-17 19:10:35 +0300 Timo Sirainen (ef60e26343) - - imap-hibernate: Add "mailbox" field to events - - -M src/imap-hibernate/imap-client.c -M src/imap-hibernate/imap-client.h -M src/imap-hibernate/imap-hibernate-client.c -M src/imap/imap-client-hibernate.c - -2020-08-17 15:33:23 +0300 Timo Sirainen (8fac1bccc1) - - imap, imap-hibernate: Track how long hibernation lasted - - -M src/imap-hibernate/imap-client.c -M src/imap/imap-master-client.c - -2020-08-17 15:39:19 +0300 Timo Sirainen (7c90fb0723) - - imap-hibernate: Add imap_client_unhibernate_retried event - - -M src/imap-hibernate/imap-client.c - -2020-08-17 14:03:53 +0300 Timo Sirainen (be68c85357) - - imap-hibernate: Add imap_client_unhibernated event for errors - - Successful unhibernation is logged by imap process. - -M src/imap-hibernate/imap-client.c - -2020-08-17 13:55:18 +0300 Timo Sirainen (faaaf06e4f) - - imap-hibernate: Handle unhibernation errors more consistently. - - Log an error with the exact reason, and just log "Failed to unhibernate - client" as the info-level disconnect reason. - -M src/imap-hibernate/imap-client.c - -2020-08-17 13:53:50 +0300 Timo Sirainen (6adcb79448) - - imap-hibernate: Fix error handling when unhibernation retry timeout is - reached - - An error message wasn't logged, and a wrong kind of message was logged in - the info line. - -M src/imap-hibernate/imap-client.c - -2020-08-17 13:53:28 +0300 Timo Sirainen (cf69e30178) - - imap-hibernate: Split off imap_move_has_reached_timeout() - - -M src/imap-hibernate/imap-client.c - -2020-08-17 15:06:42 +0300 Timo Sirainen (0ea836c9b0) - - imap: Add imap_client_unhibernated event - - -M src/imap/imap-master-client.c - -2020-08-17 14:48:01 +0300 Timo Sirainen (9e44878321) - - imap: Send unhibernation OK reply to imap-hibernate only after creating - client - - The following commit adds unhibernation event, which would be much more - difficult to implement for this error path without this change. - - The OK reply is still sent before client_create_finish(), which is the part - that could be slow. - -M src/imap/imap-master-client.c - -2020-08-17 14:55:55 +0300 Timo Sirainen (9df45f5df8) - - imap: Set unhibernation IDLE state earlier - - This simplifies the following changes. - -M src/imap/imap-master-client.c - -2020-08-17 13:34:35 +0300 Timo Sirainen (36a255bb93) - - imap: Add imap_client_hibernated event - - -M src/imap/imap-client-hibernate.c - -2020-08-17 13:08:50 +0300 Timo Sirainen (f8a13f869a) - - imap-hibernate: Log via imap_client.event or connection.event - - -M src/imap-hibernate/imap-client.c -M src/imap-hibernate/imap-hibernate-client.c -M src/imap-hibernate/imap-master-connection.c - -2020-08-17 13:08:19 +0300 Timo Sirainen (481e29adea) - - imap-hibernate: Add imap_client.event - - -M src/imap-hibernate/imap-client.c - -2020-08-17 13:07:49 +0300 Timo Sirainen (0665e883e3) - - imap-hibernate: Preserve local_port and remote_port during hibernation - - -M src/imap-hibernate/imap-client.c -M src/imap-hibernate/imap-client.h -M src/imap-hibernate/imap-hibernate-client.c -M src/imap/imap-client-hibernate.c -M src/imap/imap-master-client.c - -2020-08-17 12:47:53 +0300 Timo Sirainen (30098f130d) - - imap: Log ID and logout info lines via imap_client.event - - This doesn't change the logging output at all. - -M src/imap/cmd-id.c -M src/imap/imap-client.c - -2020-08-17 12:45:08 +0300 Timo Sirainen (12d740b891) - - imap: Log imap-master errors/debugs via connection.event - - -M src/imap/imap-master-client.c - -2020-08-17 12:43:12 +0300 Timo Sirainen (8482b886ea) - - imap: Log errors via imap_client.event when possible - - -M src/imap/cmd-getmetadata.c -M src/imap/cmd-urlfetch.c -M src/imap/imap-client-hibernate.c -M src/imap/imap-client.c -M src/imap/imap-master-client.c -M src/imap/main.c - -2020-08-17 13:28:58 +0300 Timo Sirainen (218eaa07c9) - - imap: imap_hibernate_process_send() - Return error instead of logging it - - -M src/imap/imap-client-hibernate.c - -2020-08-17 15:28:00 +0300 Timo Sirainen (b4b3b41989) - - lib: Add str_to_timeval() - - -M src/lib/test-time-util.c -M src/lib/time-util.c -M src/lib/time-util.h - -2020-08-20 16:17:48 +0300 Timo Sirainen (ea91edd058) - - director: Use director_connection.event wherever possible - - This adds the "director(name): " log prefix to many log messages where it - didn't previously exist. The director name is now sometimes duplicated in - the log messages, but maybe that's good for clarity. - -M src/director/director-connection.c - -2020-08-20 16:11:56 +0300 Timo Sirainen (4b7d51bfd0) - - director: Avoid explicit log prefixes by logging via - director_connection.event - - -M src/director/director-connection.c - -2020-08-20 16:07:00 +0300 Timo Sirainen (716aab1678) - - director: Add director_connection.event - - -M src/director/director-connection.c - -2020-08-20 16:05:23 +0300 Timo Sirainen (057b8620d7) - - director: Add director_connection_set_name() change connection name - - -M src/director/director-connection.c - -2019-10-31 19:15:22 +0200 Timo Sirainen (b47636b619) - - director: Replace most of the i_error() logging with e_error() - - -M src/director/auth-connection.c -M src/director/director-connection.c -M src/director/director.c -M src/director/doveadm-connection.c -M src/director/login-connection.c -M src/director/mail-host.c -M src/director/notify-connection.c - -2019-10-31 19:10:22 +0200 Timo Sirainen (2795b4f95e) - - director: Replace i_warning() and i_info() logging with e_*() - - -M src/director/director-connection.c -M src/director/director-request.c -M src/director/director.c -M src/director/doveadm-connection.c -M src/director/mail-host.c -M src/director/main.c -M src/director/notify-connection.c -M src/director/user-directory.c - -2019-10-31 19:17:28 +0200 Timo Sirainen (5e6d04c952) - - director: Add auth_connection.dir - - -M src/director/auth-connection.c -M src/director/auth-connection.h -M src/director/main.c - -2019-10-31 19:09:35 +0200 Timo Sirainen (c9b8061af6) - - director: Add user_directory.director - - -M src/director/mail-host.c -M src/director/test-user-directory.c -M src/director/user-directory.c -M src/director/user-directory.h - -2019-10-31 19:06:46 +0200 Timo Sirainen (5107e7f89c) - - director: Add mail_host_list.dir - - -M src/director/director.c -M src/director/doveadm-connection.c -M src/director/mail-host.c -M src/director/mail-host.h - -2019-10-31 19:00:57 +0200 Timo Sirainen (9da9aa4cf4) - - director: Remove dir_debug() and director_debug - - -M src/director/director.c -M src/director/director.h -M src/director/main.c - -2019-10-31 18:59:57 +0200 Timo Sirainen (d861dab090) - - director: director-request: Add event and replace dir_debug() with e_debug() - - -M src/director/director-request.c - -2019-10-31 18:56:56 +0200 Timo Sirainen (7e4f1966bf) - - director: Replace most of the dir_debug() with e_debug() - - -M src/director/director-connection.c -M src/director/director.c - -2019-10-31 18:49:59 +0200 Timo Sirainen (97af941652) - - director: Add struct director.event - - -M src/director/director.c -M src/director/director.h -M src/director/main.c - -2018-11-07 16:51:49 -0800 Rosen Penev (5d88510b30) - - lib: Fix compilation with OpenSSL deprecated APIs disabled - - OpenSSL with no deprecated APIs does not implicitly include header files. - -M src/lib-dcrypt/dcrypt-openssl.c -M src/lib-ssl-iostream/iostream-openssl-context.c - -2020-08-07 11:11:21 -0400 Josef 'Jeff' Sipek (8b2455fe5e) - - lib: Always use the representative when comparing event's categories - - We need to be consistent about using the representative category pointer. - Otherwise, we may end up with duplicates in an event's categories array. - - Since an event's categories are conceptually a set, it is reasonable to - write event using code that assumes no duplicates. If duplicates are - present, it may lead to incorrect behavior or even crashes. - -M src/lib/lib-event.c - -2020-08-14 10:25:33 -0400 Josef 'Jeff' Sipek (942e4a1b58) - - lib: event-filter-parser - Use str_begins() to compare unit test error - strings - - Different versions of bison generate slightly different error strings, but - they always begin the same way. So, instead of comparing them let's only - compare the beginning. - -M src/lib/test-event-filter-parser.c - -2020-08-14 09:26:12 -0400 Josef 'Jeff' Sipek (320a207cc5) - - lib: event-filter-parser - YYERROR_VERBOSE has been deprecated since 2003 - - The proper way to enable verbose error messages is to use the parse.error - define. - -M src/lib/event-filter-parser.y - -2020-08-14 00:36:19 +0300 Timo Sirainen (92d767268c) - - lib: Add unit test for long log line splitting - - -M src/lib/test-failures.c - -2020-08-13 22:49:43 +0300 Timo Sirainen (e02f24ac33) - - lib-index: Remove log prefix from cache events - - Index events don't have a prefix either. The parent event likely already - contains the mailbox name, which should be enough. It's especially bad using - the full filesystem path in the event prefix, because it could be very long. - -M src/lib-index/mail-cache.c - -2020-08-13 22:47:02 +0300 Timo Sirainen (984e3d03b6) - - global: Make sure event log prefixes are sanitized and not excessively long - - It doesn't make sense to allow log prefixes to grow to kilobytes long, - especially from user-given input. - -M src/lib-http/http-client-queue.c -M src/lib-http/http-client-request.c -M src/lib-http/http-server-request.c -M src/lib-http/http-server-resource.c -M src/lib-smtp/smtp-client-command.c -M src/lib-smtp/smtp-client-transaction.c -M src/lib-smtp/smtp-server-recipient.c -M src/lib-storage/fail-mailbox.c -M src/lib-storage/index/index-storage.c - -2020-08-13 22:18:41 +0300 Timo Sirainen (812fab2981) - - lib: Fix sending log lines when prefix is larger than PIPE_BUF - - This caused the log line to be sent repeatedly to the log process, possibly - causing hundreds of duplicate log lines. - -M src/lib/failures.c - -2020-08-13 22:08:48 +0300 Timo Sirainen (172e23fecb) - - log: log_connection_handshake() - Handle i_stream_read()'s -2 return value - properly - - Although this shouldn't happen anymore after the previous change. - -M src/log/log-connection.c - -2020-08-13 19:26:23 +0300 Timo Sirainen (884b5c012c) - - log: Fix busy loop when a long line is logged - - If the line exceeded PIPE_MAX (4 kB usually), the process got into a busy - loop. It would still break out of it every 100ms and maybe handle some other - services' logging, but the service that logged the long line would be stuck. - This resulted in all those service processes also hanging because they were - waiting to be able to write to log. - -M src/log/log-connection.c - -2020-05-18 13:08:45 +0300 Aki Tuomi (199686daf5) - - auth: test-mech - Add tests for RPA and NTLM bug - - -M src/auth/test-mech.c - -2020-05-18 12:33:39 +0300 Aki Tuomi (fb246611e6) - - lib-ntlm: Check buffer length on responses - - Add missing check for buffer length. - - If this is not checked, it is possible to send message which causes read - past buffer bug. - - Broken in c7480644202e5451fbed448508ea29a25cffc99c - -M src/lib-ntlm/ntlm-message.c - -2020-05-06 13:40:36 +0300 Aki Tuomi (69ad3c902e) - - auth: mech-rpa - Fail on zero len buffer - - -M src/auth/mech-rpa.c - -2020-07-02 17:31:19 +0300 Timo Sirainen (19193f40b1) - - lib-mail: Fix handling trailing "--" in MIME boundaries - - Broken by 5b8ec27fae941d06516c30476dcf4820c6d200ab - -M src/lib-mail/message-parser.c -M src/lib-mail/test-message-parser.c - -2020-04-23 17:09:33 +0300 Timo Sirainen (be53a118e7) - - lib-mail: message-parser - Support limiting max number of MIME parts - - The default is to allow 10000 MIME parts. When it's reached, no more MIME - boundary lines will be recognized, so the rest of the mail belongs to the - last added MIME part. - -M src/lib-mail/message-parser-private.h -M src/lib-mail/message-parser.c -M src/lib-mail/message-parser.h -M src/lib-mail/test-message-parser.c - -2020-04-23 16:59:40 +0300 Timo Sirainen (7868f5f49b) - - lib-mail: message-parser - Support limiting max number of nested MIME parts - - The default is to allow 100 nested MIME parts. When the limit is reached, - the innermost MIME part's body contains all the rest of the inner bodies - until a parent MIME part is reached. - -M src/lib-mail/message-parser-private.h -M src/lib-mail/message-parser.c -M src/lib-mail/message-parser.h -M src/lib-mail/test-message-parser.c - -2020-04-23 16:50:56 +0300 Timo Sirainen (0f46088a1a) - - lib-mail, global: message_parser_init*() - Convert flags to settings - structure - - -M src/doveadm/doveadm-mail-fetch.c -M src/lib-imap/test-imap-bodystructure.c -M src/lib-imap/test-imap-envelope.c -M src/lib-mail/istream-attachment-extractor.c -M src/lib-mail/istream-binary-converter.c -M src/lib-mail/message-parser-from-parts.c -M src/lib-mail/message-parser-private.h -M src/lib-mail/message-parser.c -M src/lib-mail/message-parser.h -M src/lib-mail/message-search.c -M src/lib-mail/message-snippet.c -M src/lib-mail/test-message-decoder.c -M src/lib-mail/test-message-parser.c -M src/lib-mail/test-message-part.c -M src/lib-storage/index/index-mail-headers.c -M src/plugins/fts/fts-build-mail.c - -2020-04-23 15:00:57 +0300 Timo Sirainen (a676cb539f) - - lib-mail: message-parser - Don't use memory pool for parser - - This reduces memory usage when parsing many MIME parts where boundaries are - being added and removed constantly. - -M src/lib-mail/message-parser-private.h -M src/lib-mail/message-parser.c - -2020-04-23 14:53:27 +0300 Timo Sirainen (a175d654c3) - - lib-mail: message-parser - Add boundary_remove_until() helper function - - -M src/lib-mail/message-parser.c - -2020-04-23 13:06:02 +0300 Timo Sirainen (8dbc754a31) - - lib-mail: message-parser - Optimize boundary lookups when exact boundary is - found - - When an exact boundary is found, there's no need to continue looking for - more boundaries. - -M src/lib-mail/message-parser.c - -2020-04-23 12:53:12 +0300 Timo Sirainen (729941c996) - - lib-mail: message-parser - Truncate excessively long MIME boundaries - - RFC 2046 requires that the boundaries are a maximum of 70 characters - (excluding the "--" prefix and suffix). We allow 80 characters for a bit of - extra safety. Anything longer than that is truncated and treated the same as - if it was just 80 characters. - -M src/lib-mail/message-parser-private.h -M src/lib-mail/message-parser.c -M src/lib-mail/test-message-parser.c - -2020-04-23 12:10:07 +0300 Timo Sirainen (02c7c6dbb5) - - lib-mail: message-parser - Minor code cleanup to finding the end of boundary - line - - -M src/lib-mail/message-parser.c - -2020-04-23 12:00:38 +0300 Timo Sirainen (24f0bfefdb) - - lib-mail: message-parser - Optimize appending new part to linked list - - -M src/lib-mail/message-parser-private.h -M src/lib-mail/message-parser.c - -2020-04-23 11:36:48 +0300 Timo Sirainen (5ecadd3074) - - lib-mail: message-parser - Optimize updating children_count - - -M src/lib-mail/message-parser.c - -2020-04-23 11:34:22 +0300 Timo Sirainen (cb00e21fd7) - - lib-mail: message-parser - Change message_part_append() to do all work - internally - - -M src/lib-mail/message-parser.c - -2020-04-23 11:33:31 +0300 Timo Sirainen (e5830ae885) - - lib-mail: message-parser - Add a message_part_finish() helper function - - -M src/lib-mail/message-parser.c - -2020-04-23 11:47:18 +0300 Timo Sirainen (926742088a) - - lib-mail: Move message_parser_init_from_parts() handling to its own file - - This helps to see what code they have in common. - -M src/lib-mail/Makefile.am -A src/lib-mail/message-parser-from-parts.c -A src/lib-mail/message-parser-private.h -M src/lib-mail/message-parser.c - -2020-04-23 11:27:14 +0300 Timo Sirainen (6d77e00e4d) - - lib-mail: test-message-parser - Test that children_count is correct - - -M src/lib-mail/test-message-parser.c - -2020-04-23 11:14:04 +0300 Timo Sirainen (d4bb43a08a) - - lib-mail: test-message-parser - Add another test for boundary matching - - -M src/lib-mail/test-message-parser.c - -2020-08-12 11:58:07 +0300 Timo Sirainen (84b70b76a6) - - dict: Fix potential hang when iterating - - Broken by 2937287a72cffa8c709c22ede838058d48b61778 - -M src/dict/dict-commands.c -M src/dict/dict-connection.h - -2020-08-12 11:57:26 +0300 Timo Sirainen (1bbb54716a) - - lib: Clarify o_stream_set_flush_pending() comment related to corking - - -M src/lib/ostream.h - -2020-08-06 17:46:07 +0300 Timo Sirainen (75693aa152) - - lib: When clearing signal handlers, ignore the signals instead of restoring - defaults - - This is mainly happening in while the process is shutting down. Getting a - signal at a time when the normal signal handlers are gone isn't something - that is expected. It's better to just ignore the signal and let the process - to finish shutting down normally instead of getting killed. - - This should also fix some unit tests where the child processes were - sometimes dying with SIGTERM due to these race conditions. - -M src/lib-test/test-subprocess.c -M src/lib/lib-signals.c -M src/lib/lib-signals.h - -2020-08-03 13:21:14 +0300 Timo Sirainen (d0ea7f9f45) - - pop3-login: Fix the next command failing after unsuccessful AUTH - - If the AUTH command failed (e.g. bad password or proxying failure), the next - command was still processed as AUTH command. For example: - - auth plain . - -ERR [AUTH] Invalid base64 data in initial response quit - -ERR [AUTH] Unsupported authentication mechanism. - -M src/pop3-login/client-authenticate.c - -2020-08-04 12:37:45 +0300 Aki Tuomi (f491dea427) - - lib-compression: zstd - Check version - - If we are using older than 1.3.1 we emit warning if there is library - mismatch. This is because error codes will break. - -M src/lib-compression/iostream-zstd-private.h -M src/lib-compression/istream-zstd.c -M src/lib-compression/ostream-zstd.c - -2020-08-04 12:35:39 +0300 Aki Tuomi (1160ac3a37) - - lib-compression: zstd - Repair error codes if necessary - - libzstd version numbers were pinned on 1.3.1, if we are compiled against - version before that, and runtime is newer, we need to repair version - numbers. - - A horrible hack that only allows using 1.3.1+ with old code. - -M src/lib-compression/Makefile.am -A src/lib-compression/iostream-zstd-private.h -M src/lib-compression/istream-zstd.c -M src/lib-compression/ostream-zstd.c - -2020-08-05 14:35:52 +0300 Timo Sirainen (9ee1a10480) - - lib: Fix potential crash changing signal handlers after destroying ioloop - - -M src/lib/lib-signals.c - -2020-06-22 15:30:49 +0300 sergey.kitov (ddd93d7953) - - lib-index: Set event name for "Recreated index" - - -M src/lib-index/mail-index-write.c - -2020-07-21 13:32:19 -0400 Josef 'Jeff' Sipek (9a6bbb115a) - - global: Rely on fs_deinit() automatically freeing parent fs - - -M src/lib-fs/fs-metawrap.c -M src/lib-fs/fs-randomfail.c -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c -M src/plugins/fs-compress/fs-compress.c -M src/plugins/mail-crypt/fs-crypt-common.c - -2020-07-21 12:55:27 -0400 Josef 'Jeff' Sipek (e42b179cb8) - - lib-fs: Free parent fs generically - - -M src/lib-fs/fs-api.c - -2020-07-21 13:24:15 -0400 Josef 'Jeff' Sipek (09085ba9ba) - - mail-crypt: Use container_of() instead of casts for fs code - - Being more explicit not only makes the code more explict, it makes it safer. - -M src/plugins/mail-crypt/fs-crypt-common.c - -2020-07-21 13:22:06 -0400 Josef 'Jeff' Sipek (af02f4005d) - - fs-compress: Use container_of() instead of casts - - Being more explicit not only makes the code more explict, it makes it safer. - -M src/plugins/fs-compress/fs-compress.c - -2020-07-21 13:18:41 -0400 Josef 'Jeff' Sipek (efad611e18) - - lib-fs: sis - Use container_of() instead of casts - - Being more explicit not only makes the code more explict, it makes it safer. - -M src/lib-fs/fs-sis.c - -2020-07-21 13:16:34 -0400 Josef 'Jeff' Sipek (e11855558a) - - lib-fs: sis-queue - Use container_of() instead of casts - - Being more explicit not only makes the code more explict, it makes it safer. - -M src/lib-fs/fs-sis-queue.c - -2020-07-21 13:13:20 -0400 Josef 'Jeff' Sipek (4f1409f68e) - - lib-fs: randomfail - Use container_of() instead of casts - - Being more explicit not only makes the code more explict, it makes it safer. - -M src/lib-fs/fs-randomfail.c - -2020-07-21 13:05:34 -0400 Josef 'Jeff' Sipek (fbfbbb3444) - - lib-fs: metawrap - Use container_of() instead of casts - - Being more explicit not only makes the code more explict, it makes it safer. - -M src/lib-fs/fs-metawrap.c - -2020-07-17 17:43:08 -0400 Josef 'Jeff' Sipek (8372b18e19) - - lib-fs: Add new deinit vfunc - - This is useful for tidying up anything just before freeing the struct fs. - For example, flushing dirty data in a write-back cache. - -M src/lib-fs/fs-api-private.h -M src/lib-fs/fs-api.c -M src/lib-fs/fs-dict.c -M src/lib-fs/fs-metawrap.c -M src/lib-fs/fs-posix.c -M src/lib-fs/fs-randomfail.c -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c -M src/lib-fs/fs-test.c -M src/plugins/fs-compress/fs-compress.c -M src/plugins/mail-crypt/fs-crypt.c -M src/plugins/mail-crypt/fs-mail-crypt.c - -2020-07-17 17:26:41 -0400 Josef 'Jeff' Sipek (9d59b32ff1) - - lib-fs: Rename deinit vfunc to free - - -M src/lib-fs/fs-api-private.h -M src/lib-fs/fs-api.c -M src/lib-fs/fs-dict.c -M src/lib-fs/fs-metawrap.c -M src/lib-fs/fs-posix.c -M src/lib-fs/fs-randomfail.c -M src/lib-fs/fs-sis-queue.c -M src/lib-fs/fs-sis.c -M src/lib-fs/fs-test.c -M src/plugins/fs-compress/fs-compress.c -M src/plugins/mail-crypt/fs-crypt-common.c -M src/plugins/mail-crypt/fs-crypt.c -M src/plugins/mail-crypt/fs-mail-crypt.c - -2020-04-26 22:27:52 +0300 Timo Sirainen (a92b4b21fa) - - lib, lib-master: Send updated event to stats if fields/categories change - - Based on code by Jeff Sipek - -M src/lib-master/stats-client.c -M src/lib-master/test-event-stats.c -M src/lib/lib-event-private.h -M src/lib/lib-event.c - -2020-04-28 18:48:07 +0300 Timo Sirainen (42c309013b) - - stats: Allow clients to update existing events with UPDATE command - - -M src/stats/client-writer.c - -2020-04-28 18:43:21 +0300 Timo Sirainen (f78e3f8bfb) - - lib: event_import*() - Allow importing duplicate data without using more - memory - - -M src/lib/lib-event.c - -2020-07-27 11:15:42 -0400 Josef 'Jeff' Sipek (21477aaefd) - - lib-master: Properly compare unit test output strings with expected values - - The I_MIN() mean that only the prefix was getting compared. - -M src/lib-master/test-event-stats.c - -2020-07-05 12:16:06 +0200 Stephan Bosch (6d9ff68a11) - - imap: cmd-notify - Do not try to notify for removable namespaces. - - It is not going to work anyway and it will cause a crash when the IMAP sync - code subsequently drops those namespaces as part of - mail_user_drop_useless_namespaces(). This does not drop the earlier created - mailbox_list_notify object, causing its mailbox list index view object to - remain open. This causes the following panic: - - Panic: Leaked view for index /dovecot.list.index: Opened in - mailbox-list-index-notify.c:142 - -M src/imap/cmd-notify.c - -2020-07-07 01:37:54 +0200 Stephan Bosch (08398c29dd) - - lib-storage: Add mail_namespace_is_removable() and use it. - - -M src/lib-storage/mail-namespace.h -M src/lib-storage/mail-user.c - -2020-07-05 12:47:05 +0200 Stephan Bosch (fbeeffeef8) - - lib-index: mail-index-view - Record caller source filename and line for - mail_index_view_clone/dup_private(). - - Before, this was only recorded for mail_index_view_open(), which caused the - view leak panic to show a useless source location, e.g.: - - Panic: Leaked view for index : Opened in (null):0 - -M src/lib-index/mail-index-view-private.h -M src/lib-index/mail-index-view.c - -2020-07-16 16:30:00 -0400 Josef 'Jeff' Sipek (622a3427eb) - - lib-fs: Set debug on event from settings - - -M src/lib-fs/fs-api.c - -2020-06-29 11:56:02 +0200 Stephan Bosch (49daa90133) - - imap: cmd-notify - Fix segfault ocurring upon NOTIFY error. - - The client_send_line() function in imap_client_notify_more() uses notify_ns - to obtain access to client struct, while that is available as a direct - function parameter. And notify_ns is invalid at the end of the for loop, so - dereferencing it causes a segmentation fault. - -M src/imap/imap-notify.c - -2020-07-31 18:39:54 +0300 Aki Tuomi (3fd7b277b2) - - lib-compression: test-compression - Do not fail on missing handlers - - -M src/lib-compression/test-compression.c - -2020-07-31 09:51:35 +0300 Aki Tuomi (b8ab80ca29) - - lib-compression: Fix support for older libzstd - - -M m4/want_zstd.m4 -M src/lib-compression/istream-zstd.c -M src/lib-compression/ostream-zstd.c - -2020-07-31 09:51:16 +0300 Aki Tuomi (cf227c6500) - - lib-compression: test-compression - Ensure compression handler is found by - file extension - - -M src/lib-compression/test-compression.c - -2020-06-10 15:53:41 +0300 Timo Sirainen (0447775763) - - fs-compress: Try all compression formats when decompressing - - Not just the specified compression format. - -M src/plugins/fs-compress/fs-compress.c - -2020-06-10 15:48:06 +0300 Timo Sirainen (4cd01cefd8) - - fs-compress: Rename compress_fs.handler to compress_handler - - -M src/plugins/fs-compress/fs-compress.c - -2020-07-06 14:54:48 +0300 Aki Tuomi (15786d88fb) - - lib-compression: test-compression - Add test for tiny invalid data - - Ensure compression handlers return EINVAL when reading less than header size - data. - -M src/lib-compression/test-compression.c - -2020-07-06 19:55:10 +0300 Aki Tuomi (ba73b7f0ea) - - lib-compression: istream-xz - Fix header reading - - If file was smaller than xz magic size, we would get EPIPE instead of - EINVAL. - -M src/lib-compression/istream-lzma.c - -2020-07-06 15:42:26 +0300 Aki Tuomi (6aaafffe3e) - - lib-compression: istream-zstd - Fix header reading - - If file was smaller than zstd magic size, we would get EPIPE instead of - EINVAL. - -M src/lib-compression/istream-zstd.c - -2020-07-06 15:41:28 +0300 Aki Tuomi (658bc80f44) - - lib-compression: istream-zlib - Fix header reading - - If data size was 0 it would give EPIPE instead of EINVAL - -M src/lib-compression/istream-bzlib.c - -2020-07-06 19:16:50 +0300 Aki Tuomi (58c9dda4c7) - - lib-compression: istream-lz4 - Fix header reading - - If data size was smaller than header size, lz4 reading would return -1 - without error indicating EOF instead of EINVAL. - - Broken in c1a43c6098f0caf11e8a2c1889227ec3969e410e - -M src/lib-compression/istream-lz4.c - -2020-07-06 10:12:39 +0300 Aki Tuomi (829ba2c7da) - - lib-compression: ostream-zstd - Remove o_stream_zstd_error - - It has only one private caller. - -M src/lib-compression/ostream-zstd.c - -2020-07-06 10:11:51 +0300 Aki Tuomi (2341a03534) - - lib-compression: ostream-zstd - Fix error handling - - The error code handling in ZSTD was wrong, because zstd returns error codes - as large unsigned numbers which need to be retrieved with helper function. - -M src/lib-compression/ostream-zstd.c - -2020-07-06 10:10:00 +0300 Aki Tuomi (286fa302a4) - - lib-compression: istream-zstd - Remove i_stream_zstd_error - - It has only one private caller. - -M src/lib-compression/istream-zstd.c - -2020-07-03 09:45:09 +0300 Aki Tuomi (a36b524470) - - lib-compression: Fix error handling for zstd - - The error code handling in ZSTD was wrong, because zstd returns error codes - as large unsigned numbers which need to be retrieved with helper function. - -M src/lib-compression/istream-zstd.c - -2020-07-06 11:48:13 +0200 Markus Valentin (6e1f9304ca) - - lib-compression: Add "unsupported" compression - - This new compression is only used for testing purposes. - -M src/lib-compression/compression.c - -2020-06-30 14:28:03 +0200 Markus Valentin (e6a0c94c08) - - lib-compression: Change compression_lookup_handler_from_ext return value - - In order to improve the error handling for - compression_lookup_handler_from_ext calls return an integer rather then a - pointer to struct compression_handler. - -M src/lib-compression/compression.c -M src/lib-compression/compression.h -M src/lib-compression/test-compression.c -M src/plugins/zlib/zlib-plugin.c - -2020-06-30 14:21:22 +0200 Markus Valentin (b6d3aedbd4) - - lib-compression: Change compression_lookup_handler return value - - In order to improve the error handling for compression_lookup_handler calls - return an integer rather then a pointer to struct compression_handler. - - This change also prevents crashes when trying to use a compression format - that isn't compiled in. - -M src/lib-compression/compression.c -M src/lib-compression/compression.h -M src/lib-compression/test-compression.c -M src/plugins/fs-compress/fs-compress.c -M src/plugins/imap-zlib/imap-zlib-plugin.c -M src/plugins/zlib/zlib-plugin.c - -2020-07-29 10:40:17 +0300 Timo Sirainen (af1a6be96c) - - pop3: Fix assert-crash when using pop3_deleted_flag - - Broken by 6d18044e1408ce98aa8ef145a9f85895829a7bc7 - - Fixes: Panic: file seq-range-array.c: line 472 (seq_range_array_invert): - assertion failed: (range[count-1].seq2 <= max_seq) - -M src/pop3/pop3-commands.c - -2020-07-15 12:42:59 +0300 Timo Sirainen (581bea0f68) - - pop3-login: Fix handling commands that are sent in multiple IP packets - - This happened especially if the commands were long, like XCLIENT. - - This got broken by recent pop3-login changes. - -M src/pop3-login/client-authenticate.c -M src/pop3-login/client-authenticate.h -M src/pop3-login/client.c -M src/pop3-login/client.h - -2020-07-10 11:00:14 +0300 Aki Tuomi (e6f8953a6e) - - lib-test: Rename s1, s2 to _temp_s1, _temp_s2 in test_assert_strcmp_idx - - Some test code uses s1 and s2 as variable names. - - Broken in 449539dc52070bebde3ae7babe96e6e272dd7101 - -M src/lib-test/test-common.h - -2020-07-09 09:38:37 +0300 Aki Tuomi (f19d3ad349) - - pop3-login: Use struct client authenticating member - - This is what should be used instead of introducing our own. - - Broken in 6c55437036b3de11804eb68f66d84cb164c33d63 - -M src/pop3-login/client-authenticate.c -M src/pop3-login/client.c -M src/pop3-login/client.h - -2020-07-09 09:39:48 +0300 Aki Tuomi (7ca712bb6f) - - pop3-login: Consume line after mech probe - - Otherwise we read next line empty and that causes -ERR. - - Broken in 6c55437036b3de11804eb68f66d84cb164c33d63 - -M src/pop3-login/client-authenticate.c - -2020-07-08 10:59:48 +0300 Aki Tuomi (1a1b810e2d) - - lib: istream - Do not attempt read past end in i_stream_next_line_finish - - -M src/lib/istream.c -M src/lib/test-istream.c - -2020-07-08 12:58:56 +0300 Aki Tuomi (449539dc52) - - lib-test: test_assert_strcmp_idx - Avoid double evaluation - - -M src/lib-test/test-common.h - -2020-07-08 08:55:31 +0300 Aki Tuomi (fb2379c54d) - - pop3-login: Read command more carefully - - Ensure we don't consume '\n' or '\0' when reading command, but that we - consume '\r' otherwise i_stream_read_next_line won't work properly. - -M src/pop3-login/client.c - -2020-07-01 12:11:43 -0400 Josef 'Jeff' Sipek (1accaf55c2) - - lib: Properly free event filter in unit tests - - -M src/lib/test-event-filter-parser.c - -2020-07-03 09:11:09 +0300 Aki Tuomi (5a38eafa70) - - lib: event-filter-lexer - Ignore unused parameters - - -M src/lib/event-filter-lexer.l - -2020-05-19 22:08:25 +0300 Timo Sirainen (757255c505) - - lib: lib-signals - Use persistent signal IOs - - When ioloop is switched, don't remove the IO from old ioloop and create it - to new ioloop. Just use persistent IOs for each separate ioloop. This can - reduce a lot of syscalls when ioloops are often switched. - -M src/lib/lib-signals.c -M src/lib/lib-signals.h - -2020-05-19 21:30:18 +0300 Timo Sirainen (b25bd31c70) - - lib: lib-signals - Add struct signal_ioloop - - This struct tracks which ioloops have signal handlers. - -M src/lib/lib-signals.c - -2020-05-19 21:02:38 +0300 Timo Sirainen (bda17bd783) - - lib: lib-signals - Replace LIBSIG_FLAG_NO_IOLOOP_AUTOMOVE with - LIBSIG_FLAG_IOLOOP_AUTOMOVE - - There aren't many signal handlers that actually want to move automatically. - It's just causing accidental bugs when signal handlers are run in unexpected - ioloops. - -M src/lib-test/test-subprocess.c -M src/lib/child-wait.c -M src/lib/lib-signals.c -M src/lib/lib-signals.h -M src/lib/test-lib-signals.c - -2020-06-24 10:30:21 +0300 Timo Sirainen (68210f3fa0) - - lib: lib-signals - Fix creating non-automove signal handlers before ioloop - - -M src/lib/lib-signals.c - -2020-05-19 21:50:25 +0300 Timo Sirainen (aa05159613) - - lib: Add io_loop_add/remove_destroy_callback() - - -M src/lib/ioloop.c -M src/lib/ioloop.h - -2020-07-02 10:09:49 +0300 Aki Tuomi (21ea4c6033) - - lib: event-filter - Use i_fatal for fatal error handling - - -M src/lib/event-filter-lexer.l - -2020-07-02 09:56:15 +0300 Aki Tuomi (ef7cec2957) - - lib: event-filter - Disable some more compiler warnings - - -M src/lib/event-filter-lexer.l - -2020-07-02 09:55:31 +0300 Aki Tuomi (f3c879817d) - - lib: event-filter - Handle allocations - - This allows us to use Dovecot specific memory error handling when - allocations fail. Also squashes compiler warnings. - -M src/lib/event-filter-lexer.l - -2020-06-30 14:02:34 +0300 Aki Tuomi (6c55437036) - - pop3-login: Read SASL-IR properly - - This fixes issue where login would fail if SASL-IR message would be too - long. - -M src/pop3-login/client-authenticate.c -M src/pop3-login/client-authenticate.h -M src/pop3-login/client.c -M src/pop3-login/client.h - -2020-06-30 14:01:12 +0300 Aki Tuomi (c703c8ff58) - - pop3-login: Read command separately - - Simplifies next commit - -M src/pop3-login/client.c - -2020-07-01 14:49:36 +0300 Aki Tuomi (b31bbec95b) - - auth: db-lua - Fix user iteration - - The old code did not leave the stack empty after finishing up, that would - lead into stack being left dirty and accumulating per each call. - -M src/auth/db-lua.c - -2020-07-01 13:18:03 +0300 Aki Tuomi (6e84cc3cd9) - - auth: db-lua - Always set callback when iterating - - -M src/auth/db-lua.c - -2020-06-26 18:31:11 +0300 Aki Tuomi (c76a5af14a) - - lib-lua: Register panic handler - - -M src/lib-lua/dlua-script.c - -2020-06-26 18:27:18 +0300 Aki Tuomi (3e11b97c63) - - auth: db-lua - Ensure stack is empty at end - - -M src/auth/db-lua.c - -2020-06-26 18:29:46 +0300 Aki Tuomi (21668efa7e) - - auth: db-lua - Pop dovecot after registering - - -M src/auth/db-lua.c - -2020-06-26 12:21:40 +0300 Aki Tuomi (919c5103b9) - - auth: db-lua - Pop result after lookup - - When doing lookups, the lookup result was not popped. - -M src/auth/db-lua.c - -2020-06-26 12:16:31 +0300 Aki Tuomi (d9dd3c2798) - - lib-lua: Add dlua_dump_stack - - Useful for debugging why stack leaks - -M src/lib-lua/dlua-script.c -M src/lib-lua/dlua-script.h - -2020-06-29 09:55:15 +0300 Aki Tuomi (dd87051e9e) - - configure: Properly fail if bison or flex is missing - - If bison or flex is missing, and are needed, fail configure. - -M configure.ac - -2020-06-26 10:08:27 -0400 Josef 'Jeff' Sipek (9a6e303a95) - - Ignore ylwrap - - -M .gitignore - -2020-06-25 12:16:44 -0400 Josef 'Jeff' Sipek (1e4f9b6566) - - lib: Rename event filter files to be less redundantly named - - -M .gitignore -M src/lib/Makefile.am -R098 src/lib/event-filter-parser-lexer.l src/lib/event-filter-lexer.l -R100 src/lib/event-filter-parser-parser.y src/lib/event-filter-parser.y - -2020-06-10 16:44:19 -0400 Josef 'Jeff' Sipek (b25cea63de) - - lib: event filter parser unit tests - - -M src/lib/Makefile.am -A src/lib/test-event-filter-parser.c -M src/lib/test-lib.inc - -2020-05-26 11:35:38 -0400 Josef 'Jeff' Sipek (fcba1d5307) - - lib: Switch event filtering to the new filter language - - -M src/lib-master/stats-client.c -M src/lib-master/test-event-stats.c -M src/lib/Makefile.am -D src/lib/event-filter-parser.c -M src/lib/event-filter.c -M src/lib/event-filter.h -M src/stats/client-writer.c -M src/stats/test-client-reader.c -M src/stats/test-client-writer.c -M src/stats/test-stats-metrics.c - -2020-05-29 13:09:22 -0400 Josef 'Jeff' Sipek (789484d40c) - - lib: Implement a new event filter language - - Currently, it is not used by anything. - - In general, the new syntax is very SQL-like. It is a boolean expression - made up of key-value comparisons, parentheses, and boolean connectors AND, - OR, and NOT. - - The key-value comparisons are of the form: - - - - Where the key is one of: - - (1) "event" - (2) "category" - (3) "source_location" - (4) a field name - - The operator is one of: - - (1) = - (2) > - (3) < - (4) >= - (5) <= - - And the value is either: - - (1) a single word token, or - (2) a quoted string - - For example, to match events with the event name "abc", we would use one of - the following expressions. Note that white space is not significant between - tokens, and therefore the following are all equivalent. - - event=abc - event="abc" - event = abc - event = "abc" - - To match events with the name "abc" that include the "imap" category, we'd - use: - - event=abc AND category=imap - - To match events with the name "abc" that either include the "imap" or "pop3" - categories, we'd use: - - event=abc AND (category=imap OR category=pop3) - - Field names don't have any special prefix. Therefore, to match events than - have the field bytes_out equal to 10, we'd use: - - bytes_out=10 - - To match events with bytes_out greater than or equal to 10, we'd use: - - bytes_out>=10 - -M .gitignore -M configure.ac -M src/lib/Makefile.am -A src/lib/event-filter-parser-lexer.l -A src/lib/event-filter-parser-parser.y -M src/lib/event-filter-private.h -M src/lib/event-filter.c - -2020-06-17 15:16:48 -0400 Josef 'Jeff' Sipek (09a26e31a2) - - lib: Allow event filter nodes to represent a log type category - - -M src/lib/event-filter-private.h -M src/lib/event-filter.c - -2020-06-17 15:01:28 -0400 Josef 'Jeff' Sipek (64874eaacb) - - lib: Future-proof the log type to event filter log type mapping - - The mapping assumed that: - - EVENT_FILTER_LOG_TYPE_FOO == (1 << LOG_TYPE_FOO) - - While that is true today and will likely continue to be true in the future, - there's no reason why we can't future proof it and ensure that it always - works. - -M src/lib/event-filter.c - -2020-05-28 17:43:21 -0400 Josef 'Jeff' Sipek (fc330b22cf) - - lib: Expose event_filter_category_to_log_type to the rest of event filter - code - - -M src/lib/event-filter-private.h -M src/lib/event-filter.c - -2020-05-28 17:22:09 -0400 Josef 'Jeff' Sipek (61cb32860f) - - lib: Add internal code for event filter le/lt/ge/gt comparisons - - These are currently unreachable. - -M src/lib/event-filter.c - -2020-05-22 13:08:24 -0400 Josef 'Jeff' Sipek (4ba261b738) - - lib: Rewrite event filter internals to use an abstract-syntax-tree - - -M src/lib/Makefile.am -A src/lib/event-filter-private.h -M src/lib/event-filter.c - -2020-05-11 14:43:15 -0400 Josef 'Jeff' Sipek (623031f7e9) - - stats: Fail to load with empty metric filters - - -M src/stats/stats-settings.c - -2020-04-21 10:32:32 -0400 Josef 'Jeff' Sipek (15ff31c2fe) - - stats: replace metric { } filtering with the common filter language - - -M src/stats/stats-metrics.c -M src/stats/stats-settings.c -M src/stats/stats-settings.h -M src/stats/test-client-reader.c -M src/stats/test-client-writer.c -M src/stats/test-stats-metrics.c - -2020-05-14 15:11:35 -0400 Josef 'Jeff' Sipek (a58a505d91) - - lib: Change event_filter_parse() filter arg to a single pointer - - Instead of allocating a new filter, fill in a passed in one. - -M src/lib-master/master-service-settings.c -M src/lib-master/master-service.c -M src/lib/event-filter-parser.c -M src/lib/event-filter.h - -2020-05-14 13:04:10 -0400 Josef 'Jeff' Sipek (5535938ae4) - - lib: Assert that we aren't trying to match using filter framents - - -M src/lib/event-filter.c - -2020-05-14 13:03:52 -0400 Josef 'Jeff' Sipek (fdff11be6c) - - lib: Add event_filter_create_fragment() - - -M src/lib/event-filter.c -M src/lib/event-filter.h - -2020-04-21 10:08:46 -0400 Josef 'Jeff' Sipek (891615285d) - - lib: Move event filter query language from lib-master - - This way we can use it elsewhere. - -M src/lib-master/master-service-settings.c -M src/lib-master/master-service-settings.h -M src/lib-master/master-service.c -M src/lib/Makefile.am -A src/lib/event-filter-parser.c -M src/lib/event-filter.h - -2020-04-21 11:05:58 -0400 Josef 'Jeff' Sipek (f3d6ba1bb8) - - stats: openmetrics shouldn't abuse metric { } filter strings - - Once upon a time it was thought that it was a good idea to output labels for - openmetrics metrics based on the fields used in the filter { } sub-block. - For the most part, this is not useful since the labels are going to be - either (1) always the same, or (2) one of several values. - - For example, consider the following metric block: - - metric foo { - event_name = something - ... - filter { - abc = BAR - def = BAZ* - } - } - - The value of 'abc' will *always* be 'BAR' for this metric, therefore it is - useless to include it. - - The value of 'def' will always start with 'BAZ' for this metric. While it - may be tempting to justify this usage, the group_by provides a superset of - the functionality. In other words, the following config snipped will - provide a superset of the same information. - - metric foo { - event_name = something - ... - filter { - abc = BAR - def = BAZ* - } - - group_by = abc def - } - - Therefore, this filter { } sub-block labeling support is redundant and can - be safely removed. - -M src/stats/stats-service-openmetrics.c - -2020-05-11 14:07:11 -0400 Josef 'Jeff' Sipek (43159ecb2c) - - lib: Add a way to merge filter queries with an overridden context - - This allows the consumers to construct a filter without setting the context - on each query, and then when merging it with another query "filling in" the - context on the fly. - -M src/lib/event-filter.c -M src/lib/event-filter.h - -2020-05-11 14:03:52 -0400 Josef 'Jeff' Sipek (a21b38c645) - - lib: Better document event filter iteration behavior - - -M src/lib/event-filter.h - -2020-05-29 09:53:53 +0300 Aki Tuomi (225bbb2fa6) - - auth: auth-worker-client - Fix whitespace formatting - - -M src/auth/auth-worker-client.c - -2020-05-29 09:52:23 +0300 Aki Tuomi (2bca51fb86) - - auth: auth-worker-client - Remove global auth_worker_client - - All should go through connection list instead. - - Broken in 317cb8aa981f856770057e23aeba98a33afc033a - -M src/auth/auth-worker-client.c - -2019-01-29 01:08:21 +0100 Stephan Bosch (33658141bb) - - lib-http: http-client - Fix assert panic occurring for shared clients. - - Occurs as a race condition between connections becoming idle and new - connections being set up. - - Panic was: - - Panic: file http-client-queue.c: line 373 - (http_client_queue_connection_attempt): assertion failed: - (http_client_peer_addr_cmp (&(*peer_idx)->shared->addr, addr) != 0) - -M src/lib-http/http-client-queue.c - -2020-05-26 19:22:52 +0300 Timo Sirainen (2937287a72) - - dict: Delay uncorking ostream in iteration callback - - -M src/dict/dict-commands.c - -2020-06-15 10:33:53 +0300 Timo Sirainen (8a31ae84ad) - - lib-storage: istream-mail - Fix assert-crash on handling corrupted mail size - - In some situations the "Cached message size smaller than expected" error - handling could have resulted in: - - Panic: file istream.c: line 315 (i_stream_read_memarea): assertion failed: - (old_size <= _stream->pos - _stream->skip) - -M src/lib-storage/index/istream-mail.c - -2020-05-26 19:09:38 +0300 Timo Sirainen (f5790ecaa6) - - dict-client: Fix potential iterator double-free - - client_dict_iterate_free() didn't really work properly, because of: - - ctx->finished = TRUE; - client_dict_iter_api_callback(ctx, cmd, extra_args); - client_dict_iterate_free(ctx); - - Here finished=TRUE is set first (and it needs to be set first). Afterwards - client_dict_iter_api_callback() internally calls - client_dict_iterate_deinit(), which can end up freeing the iterator. - -M src/lib-dict/dict-client.c - -2020-05-26 18:59:38 +0300 Timo Sirainen (ed47536cf2) - - dict-client: Rename struct dict_connection to dict_client_connection - - dict server already has struct dict_connection. This naming conflict caused - problems with gdb debugging. - -M src/lib-dict/dict-client.c - -2020-05-18 20:34:27 +0300 Timo Sirainen (66610c9f00) - - dict: Cork the output while writing iteration output - - This reduces system CPU usage by avoiding many tiny write() syscalls. - - Broken by 2ff2da52146609f4459bd0f7fd603e13400cb85e - -M src/dict/dict-commands.c - -2020-04-28 11:51:16 +0300 Timo Sirainen (c362e6dfd9) - - fts: Add fts category - - For now mainly so that the fts drivers' categories can inherit from it. - -M src/plugins/fts/fts-api.c -M src/plugins/fts/fts-api.h - -2020-06-11 12:59:14 +0300 Timo Sirainen (203b2b709b) - - imap: Fix assert-crash in COPY/MOVE when storage doesn't return UIDs - - For example copying mails into virtual storage crashed. - - Broken by 09413e35f764a2898cbc26cea94218eed6df5cbf - - Fixes: Panic: file cmd-copy.c: line 152 (fetch_and_copy): assertion failed: - (copy_ctx->copy_count == seq_range_count(©_ctx->saved_uids)) - -M src/imap/cmd-copy.c - -2020-06-09 11:40:53 +0300 Timo Sirainen (0fb7f89740) - - lib-compression: istream-zstd - Fix infinite loop when istream is - nonblocking - - -M src/lib-compression/istream-zstd.c - -2020-06-04 13:15:11 +0300 Aki Tuomi (87f109d404) - - lib-oauth2: oauth-jwt - Ensure / and . are escaped in kid - - -M src/lib-oauth2/oauth2-jwt.c -M src/lib-oauth2/test-oauth2-jwt.c - -2020-06-04 10:41:32 +0300 Aki Tuomi (654ade00c1) - - dovecot-oauth2.conf.ext: Update to match code - - -M doc/example-config/dovecot-oauth2.conf.ext - -2020-06-04 10:23:36 +0300 Aki Tuomi (92684902de) - - auth: db-oauth2 - Add more performant defaults for lib-http - - -M src/auth/db-oauth2.c - -2020-06-03 15:40:40 +0300 Aki Tuomi (b196135db1) - - lib-oauth2: Use azp to find token - - This validates that the token is actually for us and also allows having - multiple tokens with same ID but different issuer. - -M src/lib-oauth2/oauth2-jwt.c -M src/lib-oauth2/test-oauth2-jwt.c - -2020-06-03 15:40:04 +0300 Aki Tuomi (ebe460f7c2) - - lib-oauth2: Validate signature in jwt body process - - This way we can utilize fields from body with validation. - -M src/lib-oauth2/oauth2-jwt.c - -2020-06-03 15:35:48 +0300 Aki Tuomi (fc708711c8) - - lib-oauth2: Rename algo to alg - - It's the field name. - -M src/lib-oauth2/oauth2-jwt.c - -2020-06-02 15:59:37 +0300 Aki Tuomi (4b7d893712) - - lib-oauth2: Add iss validation support - - -M src/auth/db-oauth2.c -M src/lib-oauth2/oauth2-jwt.c -M src/lib-oauth2/oauth2.h -M src/lib-oauth2/test-oauth2-jwt.c - -2020-06-02 15:52:34 +0300 Aki Tuomi (b4dd39cce4) - - lib-oauth2: Ensure token algorithm matches with key - - Otherwise we might mistakenly use key that is not intended for the token. - -M src/lib-oauth2/oauth2-jwt.c -M src/lib-oauth2/test-oauth2-jwt.c - -2020-06-02 16:07:48 +0300 Aki Tuomi (a93c1dbfdf) - - lib-oauth2: oauth2-jwt - Always uppercase algorithm - - -M src/lib-oauth2/oauth2-jwt.c - -2020-05-27 15:41:22 +0300 Aki Tuomi (b219069e81) - - lib-dcrypt: dcrypt-openssl - Add helper macro for error_r handling - - Avoids missing NULL checks for error_r. - -M src/lib-dcrypt/dcrypt-openssl.c - -2020-05-27 12:16:25 +0200 Stephan Bosch (dcfd2a9177) - - lib-signals: Fix lib_signals_set_expected(). - - The function made no sense at all. - - Problem found by Coverity. - -M src/lib/lib-signals.c - -2020-04-16 07:35:25 +0200 Markus Valentin (53155cad72) - - lib-sql: driver-cassandra - Handle more Cassandra errors as uncertain - - Treat CASS_ERROR_LIB_WRITE_ERROR as uncertain error. - -M src/lib-sql/driver-cassandra.c - -2020-04-16 07:32:36 +0200 Markus Valentin (c3d98cebbd) - - lib-sql: driver-cassandra - Extract uncertain ascertainment to function - - -M src/lib-sql/driver-cassandra.c - -2020-05-08 03:02:22 +0300 Juha-Petri Tyrkkö (ce724fc647) - - lib-fs: Prevent the release of a nonexistent dict. - - -M src/lib-fs/fs-dict.c - -2020-05-27 09:09:45 +0300 Aki Tuomi (2acca6a60d) - - auth: db-oauth2 - Remove extra oauth2 prefix from log messages - - -M src/auth/db-oauth2.c - -2020-05-26 12:46:29 +0300 Aki Tuomi (139fb234bb) - - auth, lib-oauth2: Add local introspection mode - - Local introspection attempts to decode token always. This will also happen - with password grant, saving an extra roundtrip to oauth2 server. - -M src/auth/db-oauth2.c -M src/lib-oauth2/oauth2.h - -2020-05-26 09:53:26 +0300 Aki Tuomi (b2eed05ed0) - - auth: db-oauth2 - Use common code for lookup and password grant - - -M src/auth/db-oauth2.c - -2020-05-26 13:38:09 +0300 Aki Tuomi (1cb8ec93cf) - - auth: db-oauth2 - Clarify how introspect gets called - - This should make it more obvious when introspection actually gets called - after lookup. - - Introspection failure is now also moved earlier, before the request would - fail later because not all fields are available. - -M src/auth/db-oauth2.c - -2020-05-26 12:12:32 +0300 Aki Tuomi (15c893ea47) - - auth: db-oauth2 - Add token parameter to db_oauth2_local_validation - - -M src/auth/db-oauth2.c - -2020-05-25 21:42:08 +0300 Aki Tuomi (db7f5e6e54) - - auth: db-oauth2 - Move db_oauth2_local_validation - - Simplifies next change - -M src/auth/db-oauth2.c - -2020-05-25 21:47:35 +0300 Aki Tuomi (9e2507637e) - - auth: db-oauth2 - Move db_oauth2_lookup_continue - - Simplifies next change - -M src/auth/db-oauth2.c - -2020-05-26 21:24:02 +0300 Aki Tuomi (124861cc78) - - auth: db-oauth2 - Do not fallback into remote validation anymore - - It makes no sense anymore with introspection_mode=local. One should make - another passdb. - -M src/auth/db-oauth2.c - -2020-05-25 21:18:45 +0300 Aki Tuomi (de757d9e27) - - auth: db-oauth2 - Fix whitespace issue - - -M src/auth/db-oauth2.c - -2020-05-26 21:22:51 +0300 Aki Tuomi (e91e4a64ed) - - lib-oauth2: Use hash instead of hash2 - - Hash2 doesn't work as we want. Fixes key caching to actually work. - -M src/lib-oauth2/oauth2-key-cache.c - -2020-05-25 16:19:14 +0300 Aki Tuomi (bf25eab15e) - - lib-oauth2: Allow nbf and iat to be 0 - - Some implementations set these intentionally to 0. - -M src/lib-oauth2/oauth2-jwt.c -M src/lib-oauth2/test-oauth2-jwt.c - -2020-05-01 17:26:14 +0200 Stephan Bosch (0c10ac7534) - - lmtp: Support forwarding passdb's forward_* fields via RCPT TO XRCPTFORWARD - parameter. - - -M src/lmtp/lmtp-client.c -M src/lmtp/lmtp-commands.c -M src/lmtp/lmtp-common.h -M src/lmtp/lmtp-local.c -M src/lmtp/lmtp-proxy.c -M src/lmtp/lmtp-recipient.h - -2020-05-01 17:26:03 +0200 Stephan Bosch (82bf153436) - - lmtp: lmtp-proxy - Adjust RCPT parameter amendment code for expansion. - - -M src/lmtp/lmtp-proxy.c - -2020-05-01 17:25:46 +0200 Stephan Bosch (8cbb7b1310) - - lmtp: lmtp-proxy - Wait for client connection login before submitting RCPT - command. - - This allows evaluating the server capabilities while composing the RCPT - command. - -M src/lmtp/lmtp-proxy.c - -2020-05-01 17:25:27 +0200 Stephan Bosch (4289df7858) - - lmtp: lmtp-proxy - Make LMTP connection object available in proxy connection - struct. - - -M src/lmtp/lmtp-proxy.c - -2020-05-02 00:05:06 +0200 Stephan Bosch (2c9a0e54d6) - - lmtp: lmtp-client - Base client trust on the real remote IP. - - LMTP uses real_remote_ip for checking the trust. This means: - * LMTP proxy checks MTA's IP address - * LMTP backend checks LMTP proxy's IP address - * If haproxy is used in front of this LMTP server, the haproxy's IP address - is - checked. This may not be what is always wanted, but in LMTP backend it - wouldn't be correct to check the original client IP (= MTA IP) either. - -M src/lmtp/lmtp-client.c - -2020-04-26 11:02:47 +0200 Stephan Bosch (5e11257b83) - - lib-storage: mail-storage-service - Add support for sending forward_fields - in userdb lookup. - - -M src/lib-storage/mail-storage-service.c -M src/lib-storage/mail-storage-service.h - -2020-04-26 10:57:57 +0200 Stephan Bosch (91dfc52315) - - lib-auth: auth-master - Add support for sending forward_fields. - - -M src/lib-auth/auth-master.c -M src/lib-auth/auth-master.h - -2020-04-30 23:57:41 +0200 Stephan Bosch (d2a8e4e2e0) - - lib-smtp: smtp-client-connection - Allow smtp_client_connection_connect() to - be called several times. - - This change allows calling smtp_client_connection_connect() several times - with different login callbacks. If the connection is already available, the - provided login callback is called almost immediately from the ioloop. This - way, several parallel asynchronous activities using the same connection can - wait for its availability and don't need to check whether it is available - already. This is mostly useful to obtain the capabilities of the server. - -M src/lib-smtp/smtp-client-connection.c -M src/lib-smtp/smtp-client-private.h - -2020-05-01 13:02:57 +0200 Stephan Bosch (05828ad2c1) - - lib-smtp: smtp-client-connection - Record login reply. - - -M src/lib-smtp/smtp-client-connection.c -M src/lib-smtp/smtp-client-private.h - -2020-04-22 02:27:05 +0200 Stephan Bosch (d0fb4283ec) - - lib-smtp: smtp-params - Add support for xtext-encoding/decoding extra - parameters. - - -M src/lib-smtp/smtp-params.c -M src/lib-smtp/smtp-params.h - -2020-04-22 23:24:21 +0200 Stephan Bosch (dc3de46652) - - lib-smtp: smtp-params - Split off smtp_params_equal() from - smtp_params_rcpt_equal(). - - -M src/lib-smtp/smtp-params.c -M src/lib-smtp/smtp-params.h - -2020-04-22 23:03:57 +0200 Stephan Bosch (b9797261bb) - - lib-smtp: smtp-params - Remove code duplication between - smtp_params_*_write(). - - -M src/lib-smtp/smtp-params.c - -2020-04-22 22:55:54 +0200 Stephan Bosch (8ec6e1101b) - - lib-smtp: smtp-params - Remove code duplication between - smtp_params_*_copy(). - - -M src/lib-smtp/smtp-params.c -M src/lib-smtp/smtp-params.h - -2020-04-22 22:32:55 +0200 Stephan Bosch (c86fd10a18) - - lib-smtp: smtp-params - Remove code duplication between - smtp_params_*_drop_extra(). - - -M src/lib-smtp/smtp-params.c -M src/lib-smtp/smtp-params.h - -2020-04-22 22:26:25 +0200 Stephan Bosch (6f68a5d763) - - lib-smtp: smtp-params - Remove code duplication between - smtp_params_*_add_extra(). - - -M src/lib-smtp/smtp-params.c -M src/lib-smtp/smtp-params.h - -2020-04-22 22:15:43 +0200 Stephan Bosch (5830426484) - - lib-smtp: smtp-params - Remove code duplication between - smtp_params_*_get_extra(). - - -M src/lib-smtp/smtp-params.c -M src/lib-smtp/smtp-params.h - -2020-04-22 21:52:14 +0200 Stephan Bosch (4a2bfa7b95) - - lib-smtp: smtp-syntax - Add smtp_xtext_decode(). - - -M src/lib-smtp/smtp-syntax.c -M src/lib-smtp/smtp-syntax.h - -2020-04-27 11:50:13 +0200 Stephan Bosch (2f205f294e) - - lib-smtp: smtp-params - Rename smtp_params_rcpt_equals() to - smtp_params_rcpt_equal(). - - -M src/lib-smtp/smtp-params.c -M src/lib-smtp/smtp-params.h -M src/lib-smtp/smtp-server-transaction.c - -2020-05-01 17:25:05 +0200 Stephan Bosch (a077472e58) - - lmpt: Reformat lmtp-proxy.c. - - -M src/lmtp/lmtp-proxy.c - -2020-05-01 17:24:47 +0200 Stephan Bosch (11b8a9512f) - - lmtp: Reformat lmtp-commands.c. - - -M src/lmtp/lmtp-commands.c - -2020-05-04 22:25:47 +0200 Stephan Bosch (55b083e48b) - - lmtp: Reformat lmtp-client.c. - - -M src/lmtp/lmtp-client.c - -2020-05-02 02:34:34 +0200 Stephan Bosch (210e9058ff) - - lib-smtp: Reformat smtp-client-connection.h. - - -M src/lib-smtp/smtp-client-connection.h - -2020-05-01 17:16:01 +0200 Stephan Bosch (45689522bf) - - lib-smtp: Reformat smtp-client-connection.c. - - -M src/lib-smtp/smtp-client-connection.c - -2020-05-19 19:11:34 +0300 Timo Sirainen (2507d5576a) - - lib-storage: mail_search_args_init() - Expand "*" in SEARCH_SEQSET - - This is now required by the IMAP MOVE code to correctly handle - "MOVE * folder". - -M src/lib-storage/mail-search.c -M src/lib-storage/mail-search.h - -2020-05-19 18:31:31 +0300 Timo Sirainen (6a378e6f55) - - imap: imap_search_seqset_iter_next() - Assert-crash if iteration doesn't - progress - - This can be done easily with seq_range_array_remove_seq_range(). This is - cleaner to use than invert+intersect. I originally didn't notice that this - function existed. - -M src/imap/imap-search-args.c - -2020-05-19 19:10:59 +0300 Timo Sirainen (947774f899) - - lib: Add unit test for seq_range_array_remove_range() - - -M src/lib/test-seq-range-array.c - -2020-05-18 12:01:44 +0300 Timo Sirainen (3c9a50165a) - - lib-storage: mail_search_args_init() - Fix converting UIDSET * to SEQSET on - empty mailbox - - The "*" caused seq=0 to be added to the seqset. This could have caused - unexpected issues. - - Fixes at least UID MOVE on empty mailbox: Panic: file seq-range-array.c: - line 471 (seq_range_array_invert): assertion failed: (range[0].seq1 >= - min_seq) - - Before 1a5d89d2bfa031903e88af9aff7eafc1b373d521 this assert-crash didn't - happen, but it went to infinite loop. - -M src/lib-storage/mail-search.c - -2020-04-11 19:19:41 +0200 Stephan Bosch (b8116a9c40) - - lib-imap-client: test-imapc-client - Use the new sub-process test API. - - This makes an effort to terminate server processes gracefully. Killing them - bluntly hampers test coverage measurement and valgrind testing. - -M src/lib-imap-client/test-imapc-client.c - -2020-04-11 18:54:06 +0200 Stephan Bosch (e1c5779d82) - - lib-imap-client: test-imapc-client - Add server debug messages. - - -M src/lib-imap-client/test-imapc-client.c - -2020-04-11 13:44:45 +0200 Stephan Bosch (077e4752df) - - lib-imap-client: test-imapc-client - Split off test_run_server/client() from - test_run_client_server(). - - -M src/lib-imap-client/test-imapc-client.c - -2020-04-11 12:28:25 +0200 Stephan Bosch (7de3f74782) - - lib-imap-client: test-imapc-client - Add log prefixes to distinguish client - and server debug messages. - - -M src/lib-imap-client/test-imapc-client.c - -2020-04-11 10:02:12 +0200 Stephan Bosch (2a3f08a3f8) - - lib-imap-client: test-imapc-client - Make sure the child server process is - killed. - - -M src/lib-imap-client/test-imapc-client.c - -2020-04-11 10:05:25 +0200 Stephan Bosch (1eeb829538) - - lib-imap-client: test-imapc-client - Use getopt() for parsing command line - arguments. - - -M src/lib-imap-client/test-imapc-client.c - -2020-04-11 10:00:32 +0200 Stephan Bosch (c93c1cdde3) - - lib-imap-client: test-imapc-client - Add structural comments. - - -M src/lib-imap-client/test-imapc-client.c - -2020-04-11 09:30:29 +0200 Stephan Bosch (ad73b51c0c) - - lib-imap-client: test-imapc-client - Move client functions. - - -M src/lib-imap-client/test-imapc-client.c - -2020-04-13 18:49:12 +0200 Stephan Bosch (dfe0bdb29f) - - lib-imap-client: test-imapc-client - Move server functions. - - -M src/lib-imap-client/test-imapc-client.c - -2020-04-11 09:27:30 +0200 Stephan Bosch (7af50c6dd4) - - lib-imap-client: test-imapc-client - Move test_open_server_fd(). - - -M src/lib-imap-client/test-imapc-client.c - -2020-04-11 13:27:58 +0200 Stephan Bosch (c4e2843bb2) - - lib-imap-client: Reformat test-imapc-client.c. - - -M src/lib-imap-client/test-imapc-client.c - -2020-04-12 11:51:31 +0300 Timo Sirainen (cf04833d7c) - - lib-imap-client: Remove unnecessary "Authentication failed: disconnected" - errors - - If connection failed during login, there were always two log lines logged. - The first line is enough. - -M src/lib-imap-client/imapc-connection.c -M src/lib-imap-client/test-imapc-client.c - -2020-04-12 11:34:14 +0300 Timo Sirainen (c91b90cccd) - - lib-imap-client: test-imapc-client - Client now sends LOGOUT and server - expects it - - -M src/lib-imap-client/test-imapc-client.c - -2020-04-12 11:30:28 +0300 Timo Sirainen (b64215b17e) - - lib-imap-client: test-imapc-client - login_hangs: Client stopped too early - - -M src/lib-imap-client/test-imapc-client.c - -2020-04-12 11:29:06 +0300 Timo Sirainen (e00a29ea4f) - - lib-imap-client: test-imapc-client - login_hangs: Server checked wrong - connection's input - - -M src/lib-imap-client/test-imapc-client.c - -2020-04-11 00:47:21 +0200 Stephan Bosch (e37370c0e1) - - master: test-master-login-auth - Use the new sub-process test API. - - This makes an effort to terminate server processes gracefully. Killing them - bluntly hampers test coverage measurement and valgrind testing. - -M src/master/test-master-login-auth.c - -2020-04-11 13:51:49 +0200 Stephan Bosch (4f0b28f3fe) - - master: test-master-login-auth - Split off test_run_server/client() from - test_run_client_server(). - - -M src/master/test-master-login-auth.c - -2020-04-11 00:40:19 +0200 Stephan Bosch (d7251f0f6d) - - master: test-master-login-auth - Rename test_server_kill() to - test_servers_kill_forced(). - - -M src/master/test-master-login-auth.c - -2020-04-11 00:38:26 +0200 Stephan Bosch (b0692354a7) - - master: test-master-login-auth - Move global initialization to - main_init/deinit(). - - -M src/master/test-master-login-auth.c - -2020-04-11 00:32:25 +0200 Stephan Bosch (296c8cba36) - - master: test-master-login-auth - Avoid using sleep()/usleep(). - - -M src/master/test-master-login-auth.c - -2020-04-13 18:41:37 +0200 Stephan Bosch (5b2effd70c) - - master: test-master-login-auth - Use lib-signals API. - - Using signal() is not portable for installing a signal handler. - -M src/master/test-master-login-auth.c - -2020-04-11 00:29:42 +0200 Stephan Bosch (2de5a76c67) - - master: test-master-login-auth - Ignore SIGPIPE. - - -M src/master/test-master-login-auth.c - -2020-04-13 18:33:08 +0200 Stephan Bosch (e8af3c18a1) - - master: test-master-login-auth - Don't ignore SIGCHLD. - - -M src/master/test-master-login-auth.c - -2020-04-11 00:26:25 +0200 Stephan Bosch (6aaa25c6a0) - - master: test-master-login-auth - Add log prefixes to distinguish client and - server debug messages. - - -M src/master/test-master-login-auth.c - -2020-04-11 00:18:08 +0200 Stephan Bosch (de695e729b) - - master: test-auth-master - Use the new sub-process test API. - - This makes an effort to terminate server processes gracefully. Killing them - bluntly hampers test coverage measurement and valgrind testing. - -M src/master/test-auth-master.c - -2020-04-11 00:11:09 +0200 Stephan Bosch (a66f5b0fb6) - - master: test-auth-master - Split off test_run_server/client() from - test_run_client_server(). - - -M src/master/test-auth-master.c - -2020-04-11 00:04:32 +0200 Stephan Bosch (af91b26444) - - master: test-auth-master - Rename test_server_kill() to - test_servers_kill_forced(). - - -M src/master/test-auth-master.c - -2020-04-11 00:02:17 +0200 Stephan Bosch (4d1c6c0a6e) - - master: test-auth-master - Move global initialization to main_init/deinit(). - - -M src/master/test-auth-master.c - -2020-04-10 23:56:56 +0200 Stephan Bosch (3408f38934) - - master: test-auth-master - Avoid using sleep()/usleep(). - - -M src/master/test-auth-master.c - -2020-04-13 18:39:56 +0200 Stephan Bosch (62d0a3410a) - - master: test-auth-master - Use lib-signals API. - - Using signal() is not portable for installing a signal handler. - -M src/master/test-auth-master.c - -2020-04-10 23:54:29 +0200 Stephan Bosch (9a80c1fe66) - - master: test-auth-master - Ignore SIGPIPE. - - -M src/master/test-auth-master.c - -2020-04-13 18:30:54 +0200 Stephan Bosch (0e4019e254) - - master: test-auth-master - Don't ignore SIGCHLD. - - -M src/master/test-auth-master.c - -2020-04-10 23:52:20 +0200 Stephan Bosch (b1e2a6537f) - - master: test-auth-master - Add log prefixes to distinguish client and server - debug messages. - - -M src/master/test-auth-master.c - -2020-04-10 23:43:07 +0200 Stephan Bosch (bb2da34c42) - - master: test-auth-client - Use the new sub-process test API. - - This makes an effort to terminate server processes gracefully. Killing them - bluntly hampers test coverage measurement and valgrind testing. - -M src/master/test-auth-client.c - -2020-04-10 22:17:05 +0200 Stephan Bosch (1c40aa4946) - - master: test-auth-client - Split off test_run_server/client() from - test_run_client_server(). - - -M src/master/test-auth-client.c - -2020-04-10 22:07:48 +0200 Stephan Bosch (676a4ea66f) - - master: test-auth-client - Rename test_server_kill() to - test_servers_kill_forced(). - - -M src/master/test-auth-client.c - -2020-04-10 21:59:47 +0200 Stephan Bosch (dab562f599) - - master: test-auth-client - Move global initialization to main_init/deinit(). - - -M src/master/test-auth-client.c - -2020-04-10 21:53:06 +0200 Stephan Bosch (03c5dbbd4b) - - master: test-auth-client - Avoid using sleep()/usleep(). - - -M src/master/test-auth-client.c - -2020-04-13 18:37:55 +0200 Stephan Bosch (f1c60f48e7) - - master: test-auth-client - Use lib-signals API. - - Using signal() is not portable for installing a signal handler. - -M src/master/test-auth-client.c - -2020-04-10 21:50:16 +0200 Stephan Bosch (581b5c0bc0) - - master: test-auth-client - Ignore SIGPIPE. - - -M src/master/test-auth-client.c - -2020-04-13 18:28:19 +0200 Stephan Bosch (2819e392b8) - - master: test-auth-client - Don't ignore SIGCHLD. - - -M src/master/test-auth-client.c - -2020-04-10 21:48:11 +0200 Stephan Bosch (bd579b1023) - - master: test-auth-client - Add log prefixes to distinguish client and server - debug messages. - - -M src/master/test-auth-client.c - -2020-04-11 12:58:10 +0200 Stephan Bosch (205f5cbf7b) - - master: Reformat test-master-login-auth.c. - - -M src/master/test-master-login-auth.c - -2020-04-11 12:53:40 +0200 Stephan Bosch (b4ee4d3cdc) - - master: Reformat test-auth-master.c. - - -M src/master/test-auth-master.c - -2020-04-11 12:42:58 +0200 Stephan Bosch (6e4d82c689) - - master: Reformat test-auth-client.c. - - -M src/master/test-auth-client.c - -2020-05-14 16:05:00 +0200 Stephan Bosch (0890ee4883) - - lib-smtp: test-smtp-submit - Use the new sub-process test API. - - This makes an effort to terminate server processes gracefully. Killing them - bluntly hampers test coverage measurement and valgrind testing. - -M src/lib-smtp/test-smtp-submit.c - -2020-04-09 16:47:45 +0200 Stephan Bosch (aba5f64eed) - - lib-smtp: test-smtp-submit - Split off test_run_server/client() from - test_run_client_server(). - - -M src/lib-smtp/test-smtp-submit.c - -2020-04-09 11:05:10 +0200 Stephan Bosch (990e820062) - - lib-smtp: test-smtp-submit - Rename test_servers_kill_all() to - test_servers_kill_forced(). - - -M src/lib-smtp/test-smtp-submit.c - -2020-04-09 10:53:40 +0200 Stephan Bosch (7c9599e3dc) - - lib-smtp: test-smtp-submit - Move global initialization to - main_init/deinit(). - - -M src/lib-smtp/test-smtp-submit.c - -2020-04-09 10:56:07 +0200 Stephan Bosch (1dc769d5bb) - - lib-smtp: test-smtp-submit - Avoid using sleep(). - - -M src/lib-smtp/test-smtp-submit.c - -2020-04-13 17:52:09 +0200 Stephan Bosch (96f1ef1504) - - lib-smtp: test-smtp-submit - Use lib-signals API. - - Using signal() is not portable for installing a signal handler. - -M src/lib-smtp/test-smtp-submit.c - -2020-04-09 10:40:23 +0200 Stephan Bosch (a1669c00ae) - - lib-smtp: test-smtp-submit - Ignore SIGPIPE. - - -M src/lib-smtp/test-smtp-submit.c - -2020-04-13 17:45:55 +0200 Stephan Bosch (9cb98b69cc) - - lib-smtp: test-smtp-submit - Don't ignore SIGCHLD. - - -M src/lib-smtp/test-smtp-submit.c - -2020-04-09 10:37:28 +0200 Stephan Bosch (945ce4e152) - - lib-smtp: test-smtp-submit - Add log prefixes to distinguish client and - server debug messages. - - -M src/lib-smtp/test-smtp-submit.c - -2020-04-09 00:57:15 +0200 Stephan Bosch (856440da77) - - lib-smtp: test-smtp-server-errors - Use the new sub-process test API. - - This makes an effort to terminate client processes gracefully. Killing them - bluntly hampers test coverage measurement and valgrind testing. - -M src/lib-smtp/test-smtp-server-errors.c - -2020-04-09 00:30:11 +0200 Stephan Bosch (99f3dc5ae2) - - lib-smtp: test-smtp-server-errors - Split off test_run_client/server() from - test_run_client_server(). - - -M src/lib-smtp/test-smtp-server-errors.c - -2020-04-09 00:23:46 +0200 Stephan Bosch (f37980b708) - - lib-smtp: test-smtp-server-errors - Rename test_clients_kill_all() to - test_clients_kill_forced(). - - -M src/lib-smtp/test-smtp-server-errors.c - -2020-04-09 10:50:03 +0200 Stephan Bosch (eb954e32b1) - - lib-smtp: test-smtp-server-errors - Move global initialization to - main_init/deinit(). - - -M src/lib-smtp/test-smtp-server-errors.c - -2020-04-09 00:18:32 +0200 Stephan Bosch (fe2c2c6b4b) - - lib-smtp: test-smtp-server-errors - Fix name of client_connection_deinit(). - - -M src/lib-smtp/test-smtp-server-errors.c - -2020-04-13 15:40:23 +0200 Stephan Bosch (7afecadf1e) - - lib-smtp: test-smtp-server-errors - Use lib-signals API. - - Using signal() is not portable for installing a signal handler. - -M src/lib-smtp/test-smtp-server-errors.c - -2020-04-09 00:16:54 +0200 Stephan Bosch (ecf3cca0f0) - - lib-smtp: test-smtp-server-errors - Ignore SIGPIPE. - - -M src/lib-smtp/test-smtp-server-errors.c - -2020-04-13 15:15:34 +0200 Stephan Bosch (6b5e76662d) - - lib-smtp: test-smtp-server-errors - Remove useless child signal handler. - - Restructure code to better match equivalent unit tests. - -M src/lib-smtp/test-smtp-server-errors.c - -2020-04-09 00:15:24 +0200 Stephan Bosch (cf5d484a5e) - - lib-smtp: test-smtp-server-errors - Adjust log prefix code to match other - similar unit tests. - - -M src/lib-smtp/test-smtp-server-errors.c - -2020-04-08 23:49:31 +0200 Stephan Bosch (6e29b58293) - - lib-smtp: test-smtp-client-errors - Use the new sub-process test API. - - This makes an effort to terminate server processes gracefully. Killing them - bluntly hampers test coverage measurement and valgrind testing. - -M src/lib-smtp/test-smtp-client-errors.c - -2020-04-08 22:37:59 +0200 Stephan Bosch (fc19d780fd) - - lib-smtp: test-smtp-client-errors - Split off test_run_server/dns/client() - from test_run_client_server(). - - -M src/lib-smtp/test-smtp-client-errors.c - -2020-04-08 22:27:46 +0200 Stephan Bosch (ac4ce94d6c) - - lib-smtp: test-smtp-client-errors - Rename test_servers_kill_all() to - test_servers_kill_forced(). - - -M src/lib-smtp/test-smtp-client-errors.c - -2020-04-08 22:24:47 +0200 Stephan Bosch (74afe6d2a6) - - lib-smtp: test-smtp-client-errors - Move global initialization to - main_init/deinit(). - - -M src/lib-smtp/test-smtp-client-errors.c - -2020-04-08 21:10:08 +0200 Stephan Bosch (d82f9ec0b1) - - lib-smtp: test-smtp-client-errors - Avoid using sleep(). - - -M src/lib-smtp/test-smtp-client-errors.c - -2020-04-13 14:18:05 +0200 Stephan Bosch (a9c1ea5fa1) - - lib-smtp: test-smtp-client-errors - Use lib-signals API. - - Using signal() is not portable for installing a signal handler. - -M src/lib-smtp/test-smtp-client-errors.c - -2020-04-08 21:04:32 +0200 Stephan Bosch (462d42a287) - - lib-smtp: test-smtp-client-errors - Generally ignore SIGPIPE. - - Remove per-process code that achieves the same. - -M src/lib-smtp/test-smtp-client-errors.c - -2020-04-13 14:12:25 +0200 Stephan Bosch (950da3273d) - - lib-smtp: test-smtp-client-errors - Don't ignore SIGCHLD. - - -M src/lib-smtp/test-smtp-client-errors.c - -2020-04-13 14:44:31 +0200 Stephan Bosch (74c1251a60) - - lib-smtp: test-smtp-client-errors - Turn server-side payload read error into - a debug message. - - This can readily occur during tests and must not issue a real error message. - -M src/lib-smtp/test-smtp-client-errors.c - -2020-04-08 21:02:18 +0200 Stephan Bosch (735b90a5e5) - - lib-smtp: test-smtp-client-errors - Add log prefixes to distinguish client - and server debug messages. - - -M src/lib-smtp/test-smtp-client-errors.c - -2020-04-05 02:40:33 +0200 Stephan Bosch (3343d5e11a) - - lib-smtp: test-smtp-payload - Use the new sub-process test API. - - This makes an effort to terminate server processes gracefully. Killing them - bluntly hampers test coverage measurement and valgrind testing. - -M src/lib-smtp/test-smtp-payload.c - -2020-04-08 00:04:05 +0200 Stephan Bosch (08fefcfffc) - - lib-smtp: test-smtp-payload - Split off test_run_client/server() from - test_run_client_server(). - - -M src/lib-smtp/test-smtp-payload.c - -2020-04-07 23:48:44 +0200 Stephan Bosch (3f02f6ea98) - - lib-smtp: test-smtp-payload - Adjust log prefix code to match other similar - unit tests. - - -M src/lib-smtp/test-smtp-payload.c - -2020-04-05 02:34:29 +0200 Stephan Bosch (81be5e7e6b) - - lib-smtp: test-smtp-payload - Rename test_server_kill() to - test_server_kill_forced(). - - -M src/lib-smtp/test-smtp-payload.c - -2020-04-05 02:32:48 +0200 Stephan Bosch (671854cfc0) - - lib-smtp: test-smtp-payload - Move global initialization to - main_init/deinit(). - - -M src/lib-smtp/test-smtp-payload.c - -2020-04-05 02:25:30 +0200 Stephan Bosch (0fa20bd854) - - lib-smtp: test-smtp-payload - Call test_files_init/deinit() in - test_run_client_server(). - - -M src/lib-smtp/test-smtp-payload.c - -2020-04-13 13:28:51 +0200 Stephan Bosch (75305000aa) - - lib-smtp: test-smtp-payload - Use lib-signals API. - - Using signal() is not portable for installing a signal handler. - -M src/lib-smtp/test-smtp-payload.c - -2020-04-13 13:26:04 +0200 Stephan Bosch (04097a659f) - - lib-smtp: test-smtp-payload - Properly exit child process. - - -M src/lib-smtp/test-smtp-payload.c - -2020-04-13 13:23:15 +0200 Stephan Bosch (13d7680f2e) - - lib-smtp: test-smtp-payload - Don't ignore SIGCHLD. - - -M src/lib-smtp/test-smtp-payload.c - -2020-04-10 17:30:51 +0200 Stephan Bosch (eebbe6f4b1) - - lib-master: master-service - Add master_service_deinit_forked(). - - -M src/lib-master/master-service.c -M src/lib-master/master-service.h - -2020-05-25 17:16:30 +0200 Stephan Bosch (7fa64eb166) - - lib-smtp: test-smtp-server-errors - Fix "many bad commands" test. - - It didn't properly handle the two parallel connections. Removed a useless - context struct definition. Modified debug message for easier debugging. - -M src/lib-smtp/test-smtp-server-errors.c - -2020-04-09 01:33:22 +0200 Stephan Bosch (3c00c3590b) - - lib-smtp: Reformat test-smtp-submit.c. - - -M src/lib-smtp/test-smtp-submit.c - -2020-04-09 00:07:36 +0200 Stephan Bosch (f22c6c3006) - - lib-smtp: Reformat test-smtp-server-errors.c. - - -M src/lib-smtp/test-smtp-server-errors.c - -2020-04-08 22:05:57 +0200 Stephan Bosch (10667b6a9d) - - lib-smtp: Reformat test-smtp-client-errors.c. - - -M src/lib-smtp/test-smtp-client-errors.c - -2020-04-05 02:22:50 +0200 Stephan Bosch (c8e707ebeb) - - lib-smtp: Reformat test-smtp-payload.c. - - -M src/lib-smtp/test-smtp-payload.c - -2020-05-23 00:36:48 +0200 Stephan Bosch (647188820e) - - lib-program-client: test-program-client-local - Add test for running client - without I/O or timeouts. - - -M src/lib-program-client/test-program-client-local.c - -2019-02-21 02:37:41 +0100 Stephan Bosch (be38004f75) - - lib: child-wait - Mark the SIGCHLD handler as expected when waiting for - child. - - This alows waiting for a child to be the only activity on the ioloop. - -M src/lib/child-wait.c - -2019-02-21 02:34:54 +0100 Stephan Bosch (d39b532db5) - - lib: lib-signals - Implement lib_signals_set_expected(). - - This is a promise that the indicated delayed signal will occur eventually, - so that the associated ioloop will eventually terminate. This allows the - lib-signal io to be alone on the ioloop. - -M src/lib/lib-signals.c -M src/lib/lib-signals.h - -2019-02-21 02:40:36 +0100 Stephan Bosch (349029952a) - - lib-program-client: program-client-local - Restructure - program_client_local_disconnect(). - - Simplify the handling of the program timeout and improve the debug messages. - -M src/lib-program-client/program-client-local.c - -2020-05-13 15:04:45 +0300 Timo Sirainen (9bab1a7ef7) - - login-proxy: Add proxy_host_immediate_failure_after=