]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.12-20260316
authorWietse Z Venema <wietse@porcupine.org>
Mon, 16 Mar 2026 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <ietf-dane@dukhovni.org>
Fri, 20 Mar 2026 13:01:19 +0000 (00:01 +1100)
17 files changed:
postfix/HISTORY
postfix/Makefile.in
postfix/README_FILES/DB_README
postfix/conf/dynamicmaps.cf
postfix/conf/postfix-files
postfix/html/DB_README.html
postfix/html/postalias.1.html
postfix/makedefs
postfix/man/man1/postalias.1
postfix/proto/DB_README.html
postfix/src/global/mail_params.c
postfix/src/global/mail_version.h
postfix/src/postalias/postalias.c
postfix/src/postconf/postconf_builtin.c
postfix/src/util/Makefile.in
postfix/src/util/dict_open.c
postfix/src/util/sys_defs.h

index c578b1d40505167e99ed24cd5ffc9fd899e2505c..65fba8718387b31bd53af5ae24d9f23fa46e6604 100644 (file)
@@ -30632,8 +30632,8 @@ Apologies for any names omitted.
        Preparation: move src/global/dynamicmaps.[hc] to src/util
        without making any other code changes. This is a baseline
        for developing support to build tests with "shared=yes
-       dynamicmaps=yes". Curently, tests must be built with
-       "shared=yes dynamicmaps=no", which is annoying.  Files:
+       dynamicmaps=yes". Currently, tests must be built with
+       "shared=yes dynamicmaps=no", which is annoying. Files:
        util/dynamicmaps.[hc], util/Makefile.in, global/Makefile.in.
 
 20260312
@@ -30654,3 +30654,21 @@ Apologies for any names omitted.
        Deleted mail_version_parse() and mail_version_free()
        infrastructure. It was used only by test code. Files:
        src/global/mail_version.[hc].
+
+20260316
+
+       Cleanup: Berkeley DB plug-in support, like CDB and other
+       databases that have a third-party dependency. Files:
+       conf/dynamicmaps.cf, conf/postfix-files, makedefs, Makefile.in,
+       proto/DB_README.html, util/dict_open.c, util/Makefile.in,
+       util/sys_defs.h.
+
+       Build incompatibility: on non-Linux, non-BSD systems, if
+       CCARGS="...-DHAS_DB...", then it may be necessary to also
+       specify AUXLIBS_DB="-ldb".
+
+       Bugfix (defect introduced: 20260310) a change, to set the
+       service_name default value to "amnesiac", violated a test
+       that parameter names in postconf output must match 1:1 with
+       parameter names in the postlink script. File: global/mail_params.c,
+       postconf/postconf_builtin.c.
index 8d7501ada36eed4fb012d236a4828f56cf5de15e..041cf933632141f6d5f9eaf558fd025cb1f05bec 100644 (file)
@@ -108,7 +108,10 @@ libexec/postmulti-script: conf/postmulti-script
 meta/dynamicmaps.cf: conf/dynamicmaps.cf Makefile
        rm -f $@ && $(EXPAND) conf/dynamicmaps.cf | $(AWK) ' \
                BEGIN { split("'"$(DEFINED_MAP_TYPES)"'", map_types); \
-                       for (n in map_types) has_type[map_types[n]] = n } \
+                       for (n in map_types) has_type[map_types[n]] = n; \
+                       if (has_type["db"]) { \
+                           has_type["hash"] = has_type["btree"] = 1; \
+                           delete has_type["db"] } } \
                /^#/ { print } \
                /^[a-z]/ { if (has_type[$$1]) print } \
        ' >$@
index 266464c81c6f5daf74e22167e73b7442131cc7dc..8c050ad17ce05556c313e66cc9e7da6b56eaac97 100644 (file)
@@ -10,8 +10,6 @@ Postfix database type "hash" and "btree". The name of a Postfix Berkeley DB
 database is the name of the database file without the ".db" suffix. Berkeley DB
 databases are maintained with the postmap(1) command.
 
-Note: Berkeley DB version 4 is not supported by Postfix versions before 2.0.
-
 This document describes:
 
  1. How to build Postfix without Berkeley DB support even if the system comes
@@ -63,18 +61,25 @@ To build Postfix after you installed the Berkeley DB from source code, use
 something like:
 
     % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
-        AUXLIBS="-L/usr/local/BerkeleyDB/lib -ldb"
+        AUXLIBS_DB="-L/usr/local/BerkeleyDB/lib -ldb"
     % make
 
+Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier versions, use
+AUXLIBS instead.
+
 If your Berkeley DB shared library is in a directory that the RUN-TIME linker
 does not know about, add a "-Wl,-R,/path/to/directory" option after "-ldb".
 
 Solaris needs this:
 
     % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
-        AUXLIBS="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
+        AUXLIBS_DB="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -
+    ldb"
     % make
 
+Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier versions, use
+AUXLIBS instead.
+
 The exact pathnames depend on the Berkeley DB version, and on how it was
 installed.
 
@@ -97,9 +102,12 @@ Postfix builds with the default DB version that ships with the system.
 To build Postfix on BSD systems with a non-default DB version, use a variant of
 the following commands:
 
-    % make makefiles CCARGS=-I/usr/include/db3 AUXLIBS=-ldb3
+    % make makefiles CCARGS=-I/usr/include/db3 AUXLIBS_DB=-ldb3
     % make
 
+Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier versions, use
+AUXLIBS instead.
+
 Warning: the file format produced by Berkeley DB version 1 is not compatible
 with that of versions 2 and 3 (versions 2 and 3 have the same format). If you
 switch between DB versions, then you may have to rebuild all your Postfix DB
@@ -168,7 +176,10 @@ When building Postfix fails with:
 
 Add the "-lpthread" library to the "make makefiles" command.
 
-    % make makefiles .... AUXLIBS="... -lpthread"
+    % make makefiles .... AUXLIBS_DB="... -lpthread"
+
+Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier versions, use
+AUXLIBS instead.
 
 More information is available at https://www.oracle.com/database/technologies/
 related/berkeleydb.html.
index feeb6a11e6be20604c63fa7cf3826f172eaca497..0730134563b39ce3a50aa8be4c5a35f7f28f4f6b 100644 (file)
@@ -1,5 +1,7 @@
 # dict-type    so-name (pathname)      dict-function   mkmap-function
 cdb    ${LIB_PREFIX}cdb${LIB_SUFFIX}   dict_cdb_open   mkmap_cdb_open
+hash   ${LIB_PREFIX}db${LIB_SUFFIX}    dict_hash_open  mkmap_hash_open
+btree  ${LIB_PREFIX}db${LIB_SUFFIX}    dict_btree_open mkmap_btree_open
 ldap   ${LIB_PREFIX}ldap${LIB_SUFFIX}  dict_ldap_open
 lmdb   ${LIB_PREFIX}lmdb${LIB_SUFFIX}  dict_lmdb_open  mkmap_lmdb_open
 mongodb        ${LIB_PREFIX}mongodb${LIB_SUFFIX}       dict_mongodb_open
index 88c3371615039990ee728b31573352b7286cc501..0d95a975d694ec78a2eccdcd0e4c248a74dad37c 100644 (file)
@@ -73,6 +73,7 @@ $shlib_directory/lib${LIB_PREFIX}dns${LIB_SUFFIX}:f:root:-:755
 $shlib_directory/lib${LIB_PREFIX}tls${LIB_SUFFIX}:f:root:-:755
 $shlib_directory/lib${LIB_PREFIX}master${LIB_SUFFIX}:f:root:-:755
 $shlib_directory/${LIB_PREFIX}cdb${LIB_SUFFIX}:f:root:-:755
+$shlib_directory/${LIB_PREFIX}db${LIB_SUFFIX}:f:root:-:755
 $shlib_directory/${LIB_PREFIX}ldap${LIB_SUFFIX}:f:root:-:755
 $shlib_directory/${LIB_PREFIX}lmdb${LIB_SUFFIX}:f:root:-:755
 $shlib_directory/${LIB_PREFIX}mongodb${LIB_SUFFIX}:f:root:-:755
index 5080ddd5492385455c12e0f8bde0f7bd22b36027..714cf5708bce2924e557f34679108210058069a0 100644 (file)
@@ -27,9 +27,6 @@ Berkeley DB implements the Postfix database type "hash" and
 of the database file without the ".db" suffix. Berkeley DB databases
 are maintained with the <a href="postmap.1.html">postmap(1)</a> command.  </p>
 
-<p> Note: Berkeley DB version 4 is not supported by Postfix versions
-before 2.0.  </p>
-
 <p> This document describes: </p>
 
 <ol>
@@ -96,11 +93,14 @@ source code, use something like: </p>
 <blockquote>
 <pre>
 % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
-    AUXLIBS="-L/usr/local/BerkeleyDB/lib -ldb"
+    <a href="DB_README.html">AUXLIBS_DB</a>="-L/usr/local/BerkeleyDB/lib -ldb"
 % make
 </pre>
 </blockquote>
 
+<p> Note: Postfix version 3.12 and later use <a href="DB_README.html">AUXLIBS_DB</a>. With earlier
+versions, use AUXLIBS instead. </p>
+
 <p> If your Berkeley DB shared library is in a directory that the RUN-TIME
 linker does not know about, add a "-Wl,-R,/path/to/directory" option after
 "-ldb". </p>
@@ -110,11 +110,14 @@ linker does not know about, add a "-Wl,-R,/path/to/directory" option after
 <blockquote>
 <pre>
 % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
-    AUXLIBS="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
+    <a href="DB_README.html">AUXLIBS_DB</a>="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
 % make
 </pre>
 </blockquote>
 
+<p> Note: Postfix version 3.12 and later use <a href="DB_README.html">AUXLIBS_DB</a>. With earlier
+versions, use AUXLIBS instead. </p>
+
 <p> The exact pathnames depend on the Berkeley DB version, and on
 how it was installed. </p>
 
@@ -143,11 +146,14 @@ use a variant of the following commands: </p>
 
 <blockquote>
 <pre>
-% make makefiles CCARGS=-I/usr/include/db3 AUXLIBS=-ldb3
+% make makefiles CCARGS=-I/usr/include/db3 <a href="DB_README.html">AUXLIBS_DB</a>=-ldb3
 % make
 </pre>
 </blockquote>
 
+<p> Note: Postfix version 3.12 and later use <a href="DB_README.html">AUXLIBS_DB</a>. With earlier
+versions, use AUXLIBS instead. </p> 
+
 <p> Warning: the file format produced by Berkeley DB version 1 is
 not compatible with that of versions 2 and 3 (versions 2 and 3 have
 the same format). If you switch between DB versions, then you may
@@ -235,10 +241,13 @@ undefined reference to `pthread_mutex_trylock'
 
 <blockquote>
 <pre>
-% make makefiles .... AUXLIBS="... -lpthread"
+% make makefiles .... <a href="DB_README.html">AUXLIBS_DB</a>="... -lpthread"
 </pre>
 </blockquote>
 
+<p> Note: Postfix version 3.12 and later use <a href="DB_README.html">AUXLIBS_DB</a>. With earlier
+versions, use AUXLIBS instead. </p> 
+
 <p> More information is available at
 <a href="https://www.oracle.com/database/technologies/related/berkeleydb.html">https://www.oracle.com/database/technologies/related/berkeleydb.html</a>. </p>
 
index 20799a08085f8f9b2b3c517bb199e47a5467a774..5c4e311e13e381759e35ab6fcda0f27c820cb96a 100644 (file)
@@ -38,7 +38,7 @@ POSTALIAS(1)                                                      POSTALIAS(1)
        substitutions.
 
        In  a  database file, <a href="postalias.1.html"><b>postalias</b>(1)</a> stores keys in the external (quoted)
-       form. Historically, Postfix versions 3.10 and earlier stored the inter-
+       form. Historically, Postfix versions 3.11 and earlier store the  inter-
        nal  (unquoted) form. This was not consistent with <a href="postmap.1.html"><b>postmap</b>(1)</a> behavior.
        For backwards compatibility, Postfix  programs  will  search  with  the
        legacy  internal form only if the preferred external form is not found,
index 2b9242d44ce6edd3a5cd2976f5946f25a2761037..96f22ccefc3b0a90a602187cc90db0212770c25f 100644 (file)
@@ -646,7 +646,9 @@ EOF
                SYSTYPE=LINUX$RELEASE_MAJOR
                case "$CCARGS" in
                 *-DNO_DB*) ;;
-                *-DHAS_DB*) ;;
+                *-DHAS_DB*) case "$AUXLIBS_DB" in
+                            "") AUXLIBS_DB=-ldb;;
+                            esac;;
                 *) if [ -f /usr/include/db.h ]
                    then
                        : we are all set
@@ -662,7 +664,7 @@ EOF
                        echo "See: https://www.postfix.org/NON_BERKELEYDB_README.html#build-conf" 1>&2
                        exit 1
                    fi
-                   SYSLIBS="-ldb"
+                   AUXLIBS_DB="-ldb"
                    ;;
                esac
                for name in nsl resolv
@@ -701,7 +703,7 @@ EOF
                        echo "Alternatively, build with CCARGS=\"-NO_DB ...\"" 1>&2
                        exit 1
                    fi
-                   SYSLIBS="-ldb"
+                   AUXLIBS_DB="-ldb"
                    ;;
                esac
                for name in nsl resolv
@@ -745,14 +747,14 @@ HP-UX.B.10.*)     SYSTYPE=HPUX10
                CCARGS="$CCARGS -DNO_SNPRINTF"
                if [ -f /usr/lib/libdb.a ]; then
                    CCARGS="$CCARGS -DHAS_DB"
-                   SYSLIBS=-ldb
+                   AUXLIBS_DB=-ldb
                fi
                ;;
 HP-UX.B.11.*)  SYSTYPE=HPUX11
                SYSLIBS=-lnsl
                if [ -f /usr/lib/libdb.a ]; then
                    CCARGS="$CCARGS -DHAS_DB"
-                   SYSLIBS="$SYSLIBS -ldb"
+                   AUXLIBS_DB="-ldb"
                fi
                ;;
 ReliantUNIX-?.5.43) SYSTYPE=ReliantUnix543
@@ -1262,8 +1264,26 @@ ${WARN='-Wall -Wno-comment -Wformat -Wimplicit -Wmissing-prototypes \
 # and we don't try to figure out which awk versions have tolower().
 # The following was validated in 2014 on FreeBSD/Linux and Solaris 9.
 
+# But first, find out if sys_defs.h may contain '#define HAS_DB'.
+# Historically, this was how Postfix builds "knew" BDB was supported.
+trap 'rm -f makedefs.test makedefs.test.[co]' 0 1 2 3 15
+    cat >makedefs.test.c <<'EOF'
+#include "src/util/sys_defs.h"
+#include <stdio.h>
+int     main(void)
+{
+#ifdef HAS_DB
+    printf("-DHAS_DB\n");
+#endif 
+    return (0);
+}
+EOF
+eval ${CC-gcc} ${CCARGS} -D$SYSTYPE -o makedefs.test makedefs.test.c || exit 1
+HAS_DB=`./makedefs.test` || exit 1
+rm -f makedefs.test makedefs.test.[co]
+
 DEFINED_MAP_TYPES=`
-    echo $CCARGS | sed 's/=[^ ]*//g' | 
+    echo $HAS_DB $CCARGS | sed 's/=[^ ]*//g' | 
        tr -cd '\- _ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' | 
        tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | ${AWK} '
        { for (n = 1; n <= NF; n++)
@@ -1274,7 +1294,7 @@ DEFINED_MAP_TYPES=`
 
 # Propagate AUXLIBS_FOO or merge them into global AUXLIBS (i.e. SYSLIBS).
 
-PLUGGABLE_MAPS="CDB LDAP LMDB MONGODB MYSQL PCRE PGSQL SDBM SQLITE"
+PLUGGABLE_MAPS="CDB DB LDAP LMDB MONGODB MYSQL PCRE PGSQL SDBM SQLITE"
 
 case "$dynamicmaps" in
 yes) for name in $PLUGGABLE_MAPS
index e9cce32d64d410fc49ebc4d53b64fd4dab6389ef..798db5ad761cf1ead6a1fbf073ae89d4247f7fe4 100644 (file)
@@ -41,8 +41,8 @@ text, such as regexp: and pcre:. This resulted in loss of
 information with $\fInumber\fR substitutions.
 
 In a database file, \fBpostalias\fR(1) stores keys in the external
-(quoted) form. Historically, Postfix versions 3.10 and earlier
-stored the internal (unquoted) form. This was not consistent
+(quoted) form. Historically, Postfix versions 3.11 and earlier
+store the internal (unquoted) form. This was not consistent
 with \fBpostmap\fR(1) behavior. For backwards compatibility,
 Postfix programs will search with the legacy internal form only
 if the preferred external form is not found, and the internal
index 4b58b9f02363b2bdfce22101b1669f7db83f5ee4..972205a25061c876928fdbfb1bbc0a33764b04ae 100644 (file)
@@ -27,9 +27,6 @@ Berkeley DB implements the Postfix database type "hash" and
 of the database file without the ".db" suffix. Berkeley DB databases
 are maintained with the postmap(1) command.  </p>
 
-<p> Note: Berkeley DB version 4 is not supported by Postfix versions
-before 2.0.  </p>
-
 <p> This document describes: </p>
 
 <ol>
@@ -96,11 +93,14 @@ source code, use something like: </p>
 <blockquote>
 <pre>
 % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
-    AUXLIBS="-L/usr/local/BerkeleyDB/lib -ldb"
+    AUXLIBS_DB="-L/usr/local/BerkeleyDB/lib -ldb"
 % make
 </pre>
 </blockquote>
 
+<p> Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier
+versions, use AUXLIBS instead. </p>
+
 <p> If your Berkeley DB shared library is in a directory that the RUN-TIME
 linker does not know about, add a "-Wl,-R,/path/to/directory" option after
 "-ldb". </p>
@@ -110,11 +110,14 @@ linker does not know about, add a "-Wl,-R,/path/to/directory" option after
 <blockquote>
 <pre>
 % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
-    AUXLIBS="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
+    AUXLIBS_DB="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
 % make
 </pre>
 </blockquote>
 
+<p> Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier
+versions, use AUXLIBS instead. </p>
+
 <p> The exact pathnames depend on the Berkeley DB version, and on
 how it was installed. </p>
 
@@ -143,11 +146,14 @@ use a variant of the following commands: </p>
 
 <blockquote>
 <pre>
-% make makefiles CCARGS=-I/usr/include/db3 AUXLIBS=-ldb3
+% make makefiles CCARGS=-I/usr/include/db3 AUXLIBS_DB=-ldb3
 % make
 </pre>
 </blockquote>
 
+<p> Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier
+versions, use AUXLIBS instead. </p> 
+
 <p> Warning: the file format produced by Berkeley DB version 1 is
 not compatible with that of versions 2 and 3 (versions 2 and 3 have
 the same format). If you switch between DB versions, then you may
@@ -235,10 +241,13 @@ undefined reference to `pthread_mutex_trylock'
 
 <blockquote>
 <pre>
-% make makefiles .... AUXLIBS="... -lpthread"
+% make makefiles .... AUXLIBS_DB="... -lpthread"
 </pre>
 </blockquote>
 
+<p> Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier
+versions, use AUXLIBS instead. </p> 
+
 <p> More information is available at
 https://www.oracle.com/database/technologies/related/berkeleydb.html. </p>
 
index f715124aa860497eaaeb4e03b1fbf168338394a9..d7079dd2ac819ded21625c4fd66a26f8d4ff8d84 100644 (file)
@@ -797,7 +797,6 @@ void    mail_params_init()
        VAR_POSTLOG_SERVICE, DEF_POSTLOG_SERVICE, &var_postlog_service, 1, 0,
        VAR_DNSSEC_PROBE, DEF_DNSSEC_PROBE, &var_dnssec_probe, 0, 0,
        VAR_KNOWN_TCP_PORTS, DEF_KNOWN_TCP_PORTS, &var_known_tcp_ports, 0, 0,
-       VAR_SERVNAME, DEF_SERVNAME, &var_servname, 0, 0,
        0,
     };
     static const CONFIG_BOOL_TABLE first_bool_defaults[] = {
index 5fa1d0ffbabaa7b394a64aa33e90a86965353a45..a1393289dd93818788814b8ce639fe40ca3284f3 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20260312"
+#define MAIL_RELEASE_DATE      "20260316"
 #define MAIL_VERSION_NUMBER    "3.12"
 
 #ifdef SNAPSHOT
index eec322f4fc14c4cb85c2d9fa55c2d7600d6bb94f..ccbd61aac1519ae572b260dd180aaf3f974b77a6 100644 (file)
@@ -35,8 +35,8 @@
 /*     information with $\fInumber\fR substitutions.
 /*
 /*     In a database file, \fBpostalias\fR(1) stores keys in the external
-/*     (quoted) form. Historically, Postfix versions 3.10 and earlier
-/*     stored the internal (unquoted) form. This was not consistent
+/*     (quoted) form. Historically, Postfix versions 3.11 and earlier
+/*     store the internal (unquoted) form. This was not consistent
 /*     with \fBpostmap\fR(1) behavior. For backwards compatibility,
 /*     Postfix programs will search with the legacy internal form only
 /*     if the preferred external form is not found, and the internal
index e0902862b91a05b280def2a5b3304d1e6a97f244..0a88bb8fad4804e1ae29ece5ab80d2522b3cf0cc 100644 (file)
@@ -466,7 +466,7 @@ void    pcf_register_builtin_parameters(const char *procname, pid_t pid)
     PCF_PARAM_TABLE_ENTER(pcf_param_table, pcf_adhoc_procname.name,
                          PCF_PARAM_FLAG_BUILTIN | PCF_PARAM_FLAG_READONLY,
                      (void *) &pcf_adhoc_procname, pcf_conv_str_parameter);
-    pcf_adhoc_servname.defval = mystrdup("");
+    pcf_adhoc_servname.defval = mystrdup(DEF_SERVNAME);
     PCF_PARAM_TABLE_ENTER(pcf_param_table, pcf_adhoc_servname.name,
                          PCF_PARAM_FLAG_BUILTIN | PCF_PARAM_FLAG_READONLY,
                      (void *) &pcf_adhoc_servname, pcf_conv_str_parameter);
index 770dd7734c033f17ed8e1a40a04961cb51d2e0a6..b7157beb21fa9a126eb9657bd2f4c4ef82f0515e 100644 (file)
@@ -53,7 +53,7 @@ OBJS  = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
        attr_print64.o attr_print_plain.o attr_scan0.o attr_scan64.o \
        attr_scan_plain.o auto_clnt.o base64_code.o basename.o binhash.o \
        chroot_uid.o cidr_match.o clean_env.o close_on_exec.o concatenate.o \
-       ctable.o dict.o dict_alloc.o dict_cidr.o dict_db.o \
+       ctable.o dict.o dict_alloc.o dict_cidr.o \
        dict_dbm.o dict_debug.o dict_env.o dict_ht.o dict_ni.o dict_nis.o \
        dict_nisplus.o dict_open.o dict_regexp.o \
        dict_static.o dict_tcp.o dict_unix.o dir_forest.o doze.o dummy_read.o \
@@ -93,7 +93,7 @@ OBJS  = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
        split_qnameval.o argv_attr_print.o argv_attr_scan.o dict_file.o \
        msg_logger.o logwriter.o unix_dgram_connect.o unix_dgram_listen.o \
        byte_mask.o known_tcp_ports.o argv_split_at.o dict_stream.o \
-       sane_strtol.o hash_fnv.o ldseed.o mkmap_db.o mkmap_dbm.o \
+       sane_strtol.o hash_fnv.o ldseed.o mkmap_dbm.o \
        mkmap_fail.o mkmap_open.o inet_prefix_top.o inet_addr_sizes.o \
        quote_for_json.o mystrerror.o sane_sockaddr_to_hostaddr.o \
        normalize_ws.o valid_uri_scheme.o clean_ascii_cntrl_space.o \
@@ -103,7 +103,7 @@ OBJS        = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
 # When hard-linking these, makedefs sets NON_PLUGIN_MAP_OBJ=$(MAP_OBJ),
 # otherwise it sets the PLUGIN_* macros.
 MAP_OBJ        = dict_pcre.o dict_cdb.o dict_lmdb.o dict_sdbm.o slmdb.o \
-       mkmap_cdb.o mkmap_lmdb.o mkmap_sdbm.o 
+       mkmap_cdb.o mkmap_lmdb.o mkmap_sdbm.o dict_db.o mkmap_db.o
 HDRS   = argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.h \
        chroot_uid.h cidr_match.h clean_env.h connect.h ctable.h dict.h \
        dict_cdb.h dict_cidr.h dict_db.h dict_dbm.h dict_debug.h dict_env.h \
@@ -160,7 +160,8 @@ TESTPROG= dict_open dup2_pass_on_exec events exec_command fifo_open \
        normalize_v4mapped_addr_test ossl_digest_test dict_pipe_test \
        dict_union_test
 PLUGIN_MAP_SO = $(LIB_PREFIX)pcre$(LIB_SUFFIX) $(LIB_PREFIX)lmdb$(LIB_SUFFIX) \
-       $(LIB_PREFIX)cdb$(LIB_SUFFIX) $(LIB_PREFIX)sdbm$(LIB_SUFFIX)
+       $(LIB_PREFIX)cdb$(LIB_SUFFIX) $(LIB_PREFIX)sdbm$(LIB_SUFFIX) \
+       $(LIB_PREFIX)db$(LIB_SUFFIX)
 HTABLE_FIX = NORANDOMIZE=1
 LIB_DIR        = ../../lib
 INC_DIR        = ../../include
@@ -203,6 +204,10 @@ $(LIB_PREFIX)sdbm$(LIB_SUFFIX): mkmap_sdbm.o dict_sdbm.o
        $(PLUGIN_LD) $(SHLIB_RPATH) -o $@ mkmap_sdbm.o \
            dict_sdbm.o $(AUXLIBS_SDBM)
 
+$(LIB_PREFIX)db$(LIB_SUFFIX): mkmap_db.o dict_db.o
+       $(PLUGIN_LD) $(SHLIB_RPATH) -o $@ mkmap_db.o \
+           dict_db.o $(AUXLIBS_DB)
+
 update: $(LIB_DIR)/$(LIB) $(HDRS) $(PLUGIN_MAP_SO_UPDATE) \
        $(PLUGIN_MAP_OBJ_UPDATE)
        -for i in $(HDRS); \
index 05e4175c7be04eb9c706bfde579cb0bd9f96ab17..d7fab9141280a12fe1181f0d82778a10a75f1b2f 100644 (file)
@@ -397,10 +397,6 @@ static const DICT_OPEN_INFO dict_open_info[] = {
 #ifdef HAS_DBM
     DICT_TYPE_DBM, dict_dbm_open, mkmap_dbm_open,
 #endif
-#ifdef HAS_DB
-    DICT_TYPE_HASH, dict_hash_open, mkmap_hash_open,
-    DICT_TYPE_BTREE, dict_btree_open, mkmap_btree_open,
-#endif
 #ifdef HAS_NIS
     DICT_TYPE_NIS, dict_nis_open, 0,
 #endif
@@ -423,6 +419,10 @@ static const DICT_OPEN_INFO dict_open_info[] = {
     DICT_TYPE_UNION, dict_union_open, 0,
     DICT_TYPE_INLINE, dict_inline_open, 0,
 #ifndef USE_DYNAMIC_MAPS
+#ifdef HAS_DB
+    DICT_TYPE_HASH, dict_hash_open, mkmap_hash_open,
+    DICT_TYPE_BTREE, dict_btree_open, mkmap_btree_open,
+#endif
 #ifdef HAS_PCRE
     DICT_TYPE_PCRE, dict_pcre_open, 0,
 #endif
index 93a83b64db920794f52d9d713f50abfe863cf485..e14b2ef8ef31c5e14730a5aab84a20729e93a5e1 100644 (file)
@@ -51,7 +51,7 @@
 #define DEF_MAILBOX_LOCK "flock, dotlock"
 #define HAS_SUN_LEN
 #define HAS_FSYNC
-#define HAS_DB
+#define HAS_DB         1
 #define HAS_SA_LEN
 #define NATIVE_DB_TYPE "hash"
 #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000)
 #define DEF_MAILBOX_LOCK "flock, dotlock"
 #define HAS_SUN_LEN
 #define HAS_FSYNC
-#define HAS_DB
+#define HAS_DB         1
 #define HAS_SA_LEN
 #define NATIVE_DB_TYPE "hash"
 #define ALIAS_DB_MAP   "$default_database_type:/etc/aliases"
@@ -774,7 +774,7 @@ extern int initgroups(const char *, int);
 #define INTERNAL_LOCK  MYFLOCK_STYLE_FLOCK
 #define DEF_MAILBOX_LOCK "fcntl, dotlock"      /* RedHat >= 4.x */
 #define HAS_FSYNC
-#define HAS_DB
+#define HAS_DB         1
 #define NATIVE_DB_TYPE "hash"
 #define ALIAS_DB_MAP   "$default_database_type:/etc/aliases"
 #ifndef NO_NIS
@@ -850,7 +850,7 @@ extern int initgroups(const char *, int);
 #define INTERNAL_LOCK  MYFLOCK_STYLE_FLOCK
 #define DEF_MAILBOX_LOCK "dotlock"     /* verified RedHat 3.03 */
 #define HAS_FSYNC
-#define HAS_DB
+#define HAS_DB         1
 #define NATIVE_DB_TYPE "hash"
 #define ALIAS_DB_MAP   "$default_database_type:/etc/aliases"
 #ifndef NO_NIS
@@ -883,7 +883,7 @@ extern int initgroups(const char *, int);
 #define INTERNAL_LOCK  MYFLOCK_STYLE_FCNTL
 #define DEF_MAILBOX_LOCK "fcntl, dotlock"      /* RedHat >= 4.x */
 #define HAS_FSYNC
-#define HAS_DB
+#define HAS_DB         1
 #define NATIVE_DB_TYPE "hash"
 #define ALIAS_DB_MAP   "$default_database_type:/etc/aliases"
 #ifndef NO_NIS