]> git.pld-linux.org Git - packages/postfix.git/blobdiff - postfix-dynamicmaps.patch
- 2.8.3 fixes CVE-2011-1720
[packages/postfix.git] / postfix-dynamicmaps.patch
index 46f2baf6392b1bf210f527b1c0bff120d83b2e72..7e5b6aa0867e5b661c5b3ef094196db5aed7cbff 100644 (file)
@@ -1,18 +1,7 @@
---- postfix-1.1.3.orig/conf/dynamicmaps.cf
-+++ postfix-1.1.3/conf/dynamicmaps.cf
-@@ -0,0 +1,9 @@
-+# Postfix dynamic maps configuration file.
-+#
-+# The first match found is the one that is used.  The only wildcard
-+# allowed is '*', which matches everything.  The first %s is expanded
-+# to the map type.
-+#
-+#type location of .so file                    name of open function
-+#==== ================================        =====================
-+*     /usr/lib/postfix/dict_%s.so             dict_%s_open
---- postfix-1.1.3.orig/src/dns/Makefile.in
-+++ postfix-1.1.3/src/dns/Makefile.in
-@@ -15,7 +15,7 @@
+diff -durN postfix-2.1.3.orig/src/dns/Makefile.in postfix-2.1.3/src/dns/Makefile.in
+--- postfix-2.1.3.orig/src/dns/Makefile.in     2004-04-22 21:37:34.000000000 +0200
++++ postfix-2.1.3/src/dns/Makefile.in  2004-06-22 15:39:24.242860389 +0200
+@@ -12,7 +12,7 @@
  LIB_DIR       = ../../lib
  INC_DIR       = ../../include
  
@@ -21,8 +10,8 @@
  
  all: $(LIB)
  
-@@ -25,12 +25,10 @@
- test: $(TESTPROG)
+@@ -24,12 +24,10 @@
+ tests:        test
  
  $(LIB):       $(OBJS)
 -      $(AR) $(ARFL) $(LIB) $?
  
  update: $(LIB_DIR)/$(LIB) $(HDRS)
        -for i in $(HDRS); \
---- postfix-1.1.3.orig/src/global/Makefile.in
-+++ postfix-1.1.3/src/global/Makefile.in
-@@ -76,8 +76,9 @@
- LIB_DIR       = ../../lib
- INC_DIR       = ../../include
- MAKES =
-+LDAPSO  = dict_ldap.so
--.c.o:;        $(CC) $(CFLAGS) -c $*.c
-+.c.o:;        $(CC) -fPIC $(CFLAGS) -c $*.c
- all: $(LIB)
-@@ -87,14 +88,21 @@
- test: $(TESTPROG)
- $(LIB):       $(OBJS)
--      $(AR) $(ARFL) $(LIB) $?
--      $(RANLIB) $(LIB)
-+      gcc -shared -Wl,-soname,libpostfix-global.so.1 -o $(LIB) $(OBJS)
-+
-+$(LDAPSO): dict_ldap.o
-+      gcc -shared -Wl,-soname,dict_ldap.so -o $@ $? -lldap -llber -L../../lib -lutil -L. -lglobal
-+
-+dict_ldap.c:  ../util/dict_ldap.c
-+      ln -f $? $@
- $(LIB_DIR)/$(LIB): $(LIB)
-       cp $(LIB) $(LIB_DIR)
--      $(RANLIB) $(LIB_DIR)/$(LIB)
--update: $(LIB_DIR)/$(LIB) $(HDRS)
-+$(LIB_DIR)/$(LDAPSO): $(LDAPSO)
-+      cp $(LDAPSO) $(LIB_DIR)
-+
-+update: $(LIB_DIR)/$(LIB) $(LIB_DIR)/${LDAPSO} $(HDRS)
-       -for i in $(HDRS); \
-       do \
-         cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
-@@ -232,7 +240,7 @@
-       lint $(DEFS) $(SRCS) $(LINTFIX)
- clean:
--      rm -f *.o $(LIB) *core $(TESTPROG) junk
-+      rm -f *.o $(LIB) $(LDAPSO) dict_ldap.c *core $(TESTPROG) junk
-       rm -rf printfck
- tidy: clean
-@@ -389,6 +397,8 @@
- deliver_request.o: mail_open_ok.h
- deliver_request.o: recipient_list.h
- deliver_request.o: deliver_request.h
-+dict_ldap.o: dict_ldap.c
-+dict_ldap.o: ../../include/sys_defs.h
- domain_list.o: domain_list.c
- domain_list.o: ../../include/sys_defs.h
- domain_list.o: ../../include/match_list.h
---- postfix-1.1.3.orig/src/global/mail_conf.c
-+++ postfix-1.1.3/src/global/mail_conf.c
+diff -durN postfix-2.1.3.orig/src/global/mail_conf.c postfix-2.1.3/src/global/mail_conf.c
+--- postfix-2.1.3.orig/src/global/mail_conf.c  2004-04-10 16:52:51.000000000 +0200
++++ postfix-2.1.3/src/global/mail_conf.c       2004-06-22 15:39:24.247860093 +0200
 @@ -175,6 +175,13 @@
      path = concatenate(var_config_dir, "/", "main.cf", (char *) 0);
      dict_load_file(CONFIG_DICT, path);
  }
  
  /* mail_conf_eval - expand macros in string */
---- postfix-1.1.3.orig/src/global/mail_params.c
-+++ postfix-1.1.3/src/global/mail_params.c
-@@ -122,6 +122,8 @@
- #include <valid_hostname.h>
- #include <stringops.h>
- #include <safe.h>
-+#include <safe_open.h>
-+#include <mymalloc.h>
- /* Global library. */
-@@ -204,6 +206,7 @@
- char   *var_debug_peer_list;
- int     var_debug_peer_level;
- char   *var_reject_reply_msg_access_denied;
-+int     var_command_maxtime;
- int     var_fault_inj_code;
-
- #define MAIN_CONF_FILE "main.cf"
-@@ -367,6 +370,38 @@
-                 (long) var_sgid_gid);
- }
-+static char *read_file(const char *name)
-+{
-+    char *ret;
-+    VSTRING *why=vstring_alloc(1);
-+    VSTRING *new_name=vstring_alloc(1);
-+    VSTREAM *vp=safe_open(name, O_RDONLY, 0, NULL, -1, -1, why);
-+
-+    /*
-+     * Ugly macros to make complex expressions less unreadable.
-+     */
-+#define SKIP(start, var, cond) \
-+      for (var = start; *var && (cond); var++);
-+
-+#define TRIM(s) { \
-+      char *p; \
-+      for (p = (s) + strlen(s); p > (s) && ISSPACE(p[-1]); p--); \
-+      *p = 0; \
-+    }
-+
-+    if (!vp) {
-+      msg_fatal("%s: unable to open: %s",name,vstring_str(why));
-+    }
-+    vstring_get_nonl(new_name,vp);
-+    vstream_fclose(vp);
-+    SKIP(vstring_str(new_name),ret,ISSPACE(*ret));
-+    ret=mystrdup(ret);
-+    TRIM(ret);
-+    vstring_free(why);
-+    vstring_free(new_name);
-+    return ret;
-+}
-+
- /* mail_params_init - configure built-in parameters */
- void    mail_params_init()
-@@ -481,6 +516,9 @@
-      * Variables that are needed by almost every program.
-      */
-     get_mail_conf_str_table(other_str_defaults);
-+    if (*var_myorigin=='/') {
-+      var_myorigin=read_file(var_myorigin);
-+    }
-     get_mail_conf_int_table(other_int_defaults);
-     get_mail_conf_bool_table(bool_defaults);
-     get_mail_conf_time_table(time_defaults);
---- postfix-1.1.3.orig/src/master/Makefile.in
-+++ postfix-1.1.3/src/master/Makefile.in
-@@ -23,7 +23,7 @@
+diff -durN postfix-2.1.3.orig/src/master/Makefile.in postfix-2.1.3/src/master/Makefile.in
+--- postfix-2.1.3.orig/src/master/Makefile.in  2004-04-22 21:37:35.000000000 +0200
++++ postfix-2.1.3/src/master/Makefile.in       2004-06-22 15:39:24.249859975 +0200
+@@ -20,7 +20,7 @@
  INC_DIR       = ../../include
  BIN_DIR       = ../../libexec
  
  
  all:  $(PROG) $(LIB)
  
-@@ -36,12 +36,10 @@
- test: $(TESTPROG)
+@@ -35,12 +35,10 @@
+ tests:        test
  
  $(LIB):       $(LIB_OBJ)
 -      $(AR) $(ARFL) $(LIB) $?
  
  $(BIN_DIR)/$(PROG): $(PROG)
         cp $(PROG) $(BIN_DIR)
---- postfix-1.1.5.orig/src/util/Makefile.in
-+++ postfix-1.1.5/src/util/Makefile.in
-@@ -3,7 +3,7 @@
-       attr_scan0.c attr_scan64.c base64_code.c basename.c binhash.c \
-       chroot_uid.c clean_env.c close_on_exec.c concatenate.c ctable.c \
-       dict.c dict_alloc.c dict_db.c dict_dbm.c dict_debug.c dict_env.c \
--      dict_ht.c dict_ldap.c dict_mysql.c dict_ni.c dict_nis.c \
-+      dict_ht.c dict_mysql.c dict_ni.c dict_nis.c \
-       dict_nisplus.c dict_open.c dict_pcre.c dict_regexp.c dict_static.c \
-       dict_tcp.c dict_unix.c dir_forest.c doze.c duplex_pipe.c \
-       environ.c events.c exec_command.c fifo_listen.c fifo_trigger.c \
-@@ -26,13 +26,13 @@
-       unix_connect.c unix_listen.c unix_trigger.c unsafe.c username.c \
-       valid_hostname.c vbuf.c vbuf_print.c vstream.c vstream_popen.c \
-       vstring.c vstring_vstream.c watchdog.c writable.c write_buf.c \
--      write_wait.c strcasecmp.c dict_sdbm.c sdbm.c
-+      write_wait.c strcasecmp.c dict_sdbm.c sdbm.c load_lib.c
- OBJS  = alldig.o argv.o argv_split.o attr_print0.o attr_print64.o \
-       attr_scan0.o attr_scan64.o base64_code.o basename.o binhash.o \
-       chroot_uid.o clean_env.o close_on_exec.o concatenate.o ctable.o \
-       dict.o dict_alloc.o dict_db.o dict_dbm.o dict_debug.o dict_env.o \
--      dict_ht.o dict_ldap.o dict_mysql.o dict_ni.o dict_nis.o \
--      dict_nisplus.o dict_open.o dict_pcre.o dict_regexp.o dict_static.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 duplex_pipe.o \
-       environ.o events.o exec_command.o fifo_listen.o fifo_trigger.o \
-       file_limit.o find_inet.o fsspace.o fullname.o get_domainname.o \
-@@ -54,7 +54,7 @@
-       unix_connect.o unix_listen.o unix_trigger.o unsafe.o username.o \
-       valid_hostname.o vbuf.o vbuf_print.o vstream.o vstream_popen.o \
-       vstring.o vstring_vstream.o watchdog.o writable.o write_buf.o \
--      write_wait.o $(STRCASE) dict_sdbm.o sdbm.o
-+      write_wait.o $(STRCASE) dict_sdbm.o sdbm.o load_lib.o
- HDRS  = argv.h attr.h base64_code.h binhash.h chroot_uid.h clean_env.h \
-       connect.h ctable.h dict.h dict_db.h dict_dbm.h dict_env.h \
-       dict_ht.h dict_ldap.h dict_mysql.h dict_ni.h dict_nis.h \
-@@ -71,7 +71,7 @@
-       scan_dir.h set_eugid.h set_ugid.h sigdelay.h spawn_command.h \
-       split_at.h stat_as.h stringops.h sys_defs.h timed_connect.h \
-       timed_wait.h trigger.h username.h valid_hostname.h vbuf.h \
--      vbuf_print.h vstream.h vstring.h vstring_vstream.h watchdog.h \
-+      vbuf_print.h vstream.h vstring.h vstring_vstream.h watchdog.h load_lib.h \
-       dict_sdbm.h sdbm.h
- TESTSRC       = fifo_open.c fifo_rdwr_bug.c fifo_rdonly_bug.c select_bug.c \
-       stream_test.c dup2_pass_on_exec.c
-@@ -81,6 +81,8 @@
- CFLAGS        = $(DEBUG) $(OPT) $(DEFS)
- FILES = Makefile $(SRCS) $(HDRS)
- INCL  =
-+PCRESO  = dict_pcre.so
-+MYSQLSO = dict_mysql.so
- LIB   = libutil.a
- TESTPROG= dict_open dup2_pass_on_exec events exec_command fifo_open \
-       fifo_rdonly_bug fifo_rdwr_bug fifo_trigger fsspace fullname \
-@@ -93,8 +95,9 @@
- LIB_DIR       = ../../lib
- INC_DIR       = ../../include
-+LIBS    = $(LIB_DIR)/$(LIB) $(LIB_DIR)/$(PCRESO) $(LIB_DIR)/$(MYSQLSO)
--.c.o:;        $(CC) $(CFLAGS) -c $*.c
-+.c.o:;        $(CC) -fPIC $(CFLAGS) -c $*.c
- all: $(LIB)
-@@ -103,15 +106,25 @@
- test: $(TESTPROG)
-+$(PCRESO): dict_pcre.o
-+      gcc -shared -Wl,-soname,dict_pcre.so -o $@ $? -lpcre -L. -lutil
-+
-+$(MYSQLSO): dict_mysql.o
-+      gcc -shared -Wl,-soname,dict_mysql.so -o $@ $? -lmysqlclient -L. -lutil
-+
- $(LIB):       $(OBJS)
--      $(AR) $(ARFL) $(LIB) $?
--      $(RANLIB) $(LIB)
-+      gcc -shared -Wl,-soname,libpostfix-util.so.1 -o $(LIB) $(OBJS) -ldl
- $(LIB_DIR)/$(LIB): $(LIB)
-       cp $(LIB) $(LIB_DIR)
--      $(RANLIB) $(LIB_DIR)/$(LIB)
--update: $(LIB_DIR)/$(LIB) $(HDRS)
-+$(LIB_DIR)/$(PCRESO): $(PCRESO)
-+      cp $(PCRESO) $(LIB_DIR)
-+
-+$(LIB_DIR)/$(MYSQLSO): $(MYSQLSO)
-+      cp $(MYSQLSO) $(LIB_DIR)
-+
-+update: $(LIBS) $(HDRS)
-       -for i in $(HDRS); \
-       do \
-         cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
-@@ -133,7 +146,8 @@
-       lint $(SRCS)
- clean:
--      rm -f *.o $(LIB) *core $(TESTPROG) junk $(MAKES) *.tmp
-+      rm -f *.o $(LIB) $(PCRESO) $(MYSQLSO) *core $(TESTPROG) \
-+              junk $(MAKES) *.tmp
-       rm -rf printfck
- tidy: clean
---- postfix-1.1.3.orig/src/util/dict.h
-+++ postfix-1.1.3/src/util/dict.h
-@@ -74,6 +74,20 @@
+diff -durN postfix-2.1.3.orig/src/util/dict.h postfix-2.1.3/src/util/dict.h
+--- postfix-2.1.3.orig/src/util/dict.h 2003-07-03 17:04:13.000000000 +0200
++++ postfix-2.1.3/src/util/dict.h      2004-06-22 15:39:24.253859738 +0200
+@@ -82,6 +82,20 @@
    */
  extern ARGV *dict_mapnames(void);
  
   /*
    * High-level interface, with logical dictionary names.
    */
---- postfix-1.1.3.orig/src/util/dict_open.c
-+++ postfix-1.1.3/src/util/dict_open.c
-@@ -150,6 +150,9 @@
+diff -durN postfix-2.1.3.orig/src/util/dict_open.c postfix-2.1.3/src/util/dict_open.c
+--- postfix-2.1.3.orig/src/util/dict_open.c    2004-06-22 15:38:57.069468247 +0200
++++ postfix-2.1.3/src/util/dict_open.c 2004-06-22 15:39:24.254859679 +0200
+@@ -158,6 +158,9 @@
  #include <strings.h>
  #endif
  
  /* Utility library. */
  
  #include <argv.h>
-@@ -173,6 +176,14 @@
+@@ -181,6 +184,14 @@
  #include <split_at.h>
  #include <htable.h>
  
   /*
    * lookup table for available map types.
    */
-@@ -203,6 +214,7 @@
+@@ -212,9 +223,11 @@
  #ifdef HAS_NETINFO
      DICT_TYPE_NETINFO, dict_ni_open,
  #endif
 +#ifndef MAX_DYNAMIC_MAPS
- #ifdef HAS_LDAP
-     DICT_TYPE_LDAP, dict_ldap_open,
- #endif
-@@ -212,6 +224,7 @@
  #ifdef HAS_PCRE
      DICT_TYPE_PCRE, dict_pcre_open,
  #endif
  #ifdef HAS_POSIX_REGEXP
      DICT_TYPE_REGEXP, dict_regexp_open,
  #endif
-@@ -264,8 +277,38 @@
+@@ -269,8 +282,38 @@
  
      if (dict_open_hash == 0)
        dict_open_init();
      if ((dict = dp->open(dict_name, open_flags, dict_flags)) == 0)
        msg_fatal("opening %s:%s %m", dict_type, dict_name);
      if (msg_verbose)
-@@ -311,6 +354,76 @@
-     argv_terminate(mapnames);
+@@ -317,6 +360,76 @@
      return mapnames;
  }
-+
 +#ifndef NO_DYNAMIC_MAPS
 +static DLINFO  *dict_dlinfo;
 +
 +    return NULL;
 +}
 +#endif /* !NO_DYNAMIC_MAPS */
++
  #ifdef TEST
  
---- postfix-1.1.3.orig/src/util/load_lib.c
-+++ postfix-1.1.3/src/util/load_lib.c
+  /*
+diff -durN postfix-2.1.3.orig/src/util/load_lib.c postfix-2.1.3/src/util/load_lib.c
+--- postfix-2.1.3.orig/src/util/load_lib.c     1970-01-01 01:00:00.000000000 +0100
++++ postfix-2.1.3/src/util/load_lib.c  2004-06-22 15:39:24.257859501 +0200
 @@ -0,0 +1,135 @@
 +/*++
 +/* NAME
 +#endif
 +    return 0;
 +}
---- postfix-1.1.3.orig/src/util/load_lib.h
-+++ postfix-1.1.3/src/util/load_lib.h
+diff -durN postfix-2.1.3.orig/src/util/load_lib.h postfix-2.1.3/src/util/load_lib.h
+--- postfix-2.1.3.orig/src/util/load_lib.h     1970-01-01 01:00:00.000000000 +0100
++++ postfix-2.1.3/src/util/load_lib.h  2004-06-22 15:39:24.257859501 +0200
 @@ -0,0 +1,41 @@
 +#ifndef _LOAD_LIB_H_INCLUDED_
 +#define _LOAD_LIB_H_INCLUDED_
 +/*--*/
 +
 +#endif
---- postfix-1.1.3.orig/src/util/sys_defs.h
-+++ postfix-1.1.3/src/util/sys_defs.h
-@@ -494,6 +494,7 @@
- #define UNIX_DOMAIN_CONNECT_BLOCKS_FOR_ACCEPT
+--- postfix-2.0.16.orig/conf/dynamicmaps.cf    1970-01-01 01:00:00.000000000 +0100
++++ postfix-2.0.16/conf/dynamicmaps.cf 2003-11-08 19:52:14.000000000 +0100
+@@ -0,0 +1,9 @@
++# Postfix dynamic maps configuration file.
++#
++# The first match found is the one that is used.  The only wildcard
++# allowed is '*', which matches everything.  The first %s is expanded
++# to the map type.
++#
++#type location of .so file                    name of open function
++#==== ================================        =====================
++*     /usr/lib/postfix/dict_%s.so             dict_%s_open
+--- postfix-2.3-RC9/src/global/mail_params.c.orig      2006-07-11 19:37:10.708815544 +0200
++++ postfix-2.3-RC9/src/global/mail_params.c   2006-07-11 19:38:56.587719504 +0200
+@@ -148,6 +148,8 @@
+ #ifdef STRCASECMP_IN_STRINGS_H
+ #include <strings.h>
+ #endif
++#include <safe_open.h>
++#include <mymalloc.h>
+ /* Utility library. */
+@@ -248,6 +250,7 @@
+ char   *var_debug_peer_list;
+ int     var_debug_peer_level;
+ char  *var_reject_reply_msg_access_denied;
++int   var_command_maxtime;
+ int     var_fault_inj_code;
+ char   *var_bounce_service;
+ char   *var_cleanup_service;
+@@ -433,6 +436,38 @@
+                 (long) var_sgid_gid);
+ }
++static char *read_file(const char *name)
++{
++    char *ret;
++    VSTRING *why=vstring_alloc(1);
++    VSTRING *new_name=vstring_alloc(1);
++    VSTREAM *vp=safe_open(name, O_RDONLY, 0, NULL, -1, -1, why);
++
++    /*
++     * Ugly macros to make complex expressions less unreadable.
++     */
++#define SKIP(start, var, cond) \
++      for (var = start; *var && (cond); var++);
++
++#define TRIM(s) { \
++      char *p; \
++      for (p = (s) + strlen(s); p > (s) && ISSPACE(p[-1]); p--); \
++      *p = 0; \
++    }
++
++    if (!vp) {
++      msg_fatal("%s: unable to open: %s",name,vstring_str(why));
++    }
++    vstring_get_nonl(new_name,vp);
++    vstream_fclose(vp);
++    SKIP(vstring_str(new_name),ret,ISSPACE(*ret));
++    ret=mystrdup(ret);
++    TRIM(ret);
++    vstring_free(why);
++    vstring_free(new_name);
++    return ret;
++}
++
+ /* mail_params_init - configure built-in parameters */
+ void    mail_params_init()
+diff -durN postfix-2.1.3.orig/src/util/sys_defs.h postfix-2.1.3/src/util/sys_defs.h
+--- postfix-2.1.3.orig/src/util/sys_defs.h     2004-06-22 15:38:57.190461088 +0200
++++ postfix-2.1.3/src/util/sys_defs.h  2004-06-22 15:39:24.255859620 +0200
+@@ -700,6 +700,7 @@
+ #define STATFS_IN_SYS_VFS_H
  #define PREPEND_PLUS_TO_OPTSTRING
  #define HAS_POSIX_REGEXP
 +#define HAS_DLOPEN
- #define DEF_SENDMAIL_PATH "/usr/sbin/sendmail"
- #define DEF_MAILQ_PATH        "/usr/bin/mailq"
- #define DEF_NEWALIAS_PATH "/usr/bin/newaliases"
-@@ -532,6 +533,7 @@
- #define USE_STATFS
+ #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
+ #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
+ #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
+@@ -754,6 +755,7 @@
  #define STATFS_IN_SYS_VFS_H
+ #define PREPEND_PLUS_TO_OPTSTRING
  #define HAS_POSIX_REGEXP
 +#define HAS_DLOPEN
- #define DEF_SENDMAIL_PATH "/usr/sbin/sendmail"
- #define DEF_MAILQ_PATH        "/usr/bin/mailq"
- #define DEF_NEWALIAS_PATH "/usr/bin/newaliases"
-@@ -567,6 +569,7 @@
+ #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
+ #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
+ #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
+@@ -638,6 +640,7 @@
  #define USE_STATFS
  #define STATFS_IN_SYS_VFS_H
  #define HAS_POSIX_REGEXP
 +#define HAS_SHL_LOAD
- #define DEF_SENDMAIL_PATH "/usr/sbin/sendmail"
- #define DEF_MAILQ_PATH        "/usr/bin/mailq"
- #define DEF_NEWALIAS_PATH "/usr/bin/newaliases"
-@@ -604,6 +607,7 @@
+ #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
+ #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
+ #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
+@@ -673,6 +676,7 @@
  #define USE_STATFS
  #define STATFS_IN_SYS_VFS_H
  #define HAS_POSIX_REGEXP
 +#define HAS_SHL_LOAD
- #define DEF_SENDMAIL_PATH "/usr/bin/sendmail"
- #define DEF_MAILQ_PATH        "/usr/bin/mailq"
- #define DEF_NEWALIAS_PATH "/usr/bin/newaliases"
+ #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
+ #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
+ #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
+--- postfix-2.8.3/src/util/Makefile.in~        2011-05-17 13:59:05.580000068 +0200
++++ postfix-2.8.3/src/util/Makefile.in 2011-05-17 14:10:13.870000068 +0200
+@@ -30,7 +30,7 @@
+       username.c valid_hostname.c vbuf.c vbuf_print.c vstream.c \
+       vstream_popen.c vstring.c vstring_vstream.c watchdog.c writable.c \
+       write_buf.c write_wait.c sane_basename.c format_tv.c allspace.c \
+-      allascii.c load_file.c killme_after.c vstream_tweak.c \
++      allascii.c load_file.c killme_after.c vstream_tweak.c load_lib.c \
+       unix_pass_listen.c unix_pass_trigger.c edit_file.c inet_windowsize.c \
+       unix_pass_fd_fix.c dict_cache.c valid_utf_8.c dict_thash.c \
+       ip_match.c nbbio.c stream_pass_connect.c
+@@ -40,7 +40,7 @@
+       chroot_uid.o cidr_match.o clean_env.o close_on_exec.o concatenate.o \
+       ctable.o dict.o dict_alloc.o dict_cdb.o dict_cidr.o dict_db.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_pcre.o dict_regexp.o dict_sdbm.o \
++      dict_nisplus.o dict_open.o dict_regexp.o dict_sdbm.o \
+       dict_static.o dict_tcp.o dict_unix.o dir_forest.o doze.o dummy_read.o \
+       dummy_write.o duplex_pipe.o environ.o events.o exec_command.o \
+       fifo_listen.o fifo_trigger.o file_limit.o find_inet.o fsspace.o \
+@@ -65,7 +65,7 @@
+       username.o valid_hostname.o vbuf.o vbuf_print.o vstream.o \
+       vstream_popen.o vstring.o vstring_vstream.o watchdog.o writable.o \
+       write_buf.o write_wait.o sane_basename.o format_tv.o allspace.o \
+-      allascii.o load_file.o killme_after.o vstream_tweak.o \
++      allascii.o load_file.o killme_after.o vstream_tweak.o load_lib.o \
+       unix_pass_listen.o unix_pass_trigger.o edit_file.o inet_windowsize.o \
+       unix_pass_fd_fix.o dict_cache.o valid_utf_8.o dict_thash.o \
+       ip_match.o nbbio.o stream_pass_connect.o
+@@ -87,7 +87,7 @@
+       sigdelay.h sock_addr.h spawn_command.h split_at.h stat_as.h \
+       stringops.h sys_defs.h timed_connect.h timed_wait.h trigger.h \
+       username.h valid_hostname.h vbuf.h vbuf_print.h vstream.h vstring.h \
+-      vstring_vstream.h watchdog.h format_tv.h load_file.h killme_after.h \
++      vstring_vstream.h watchdog.h format_tv.h load_file.h killme_after.h load_lib.h \
+       edit_file.h dict_cache.h dict_thash.h \
+       ip_match.h nbbio.h
+ TESTSRC       = fifo_open.c fifo_rdwr_bug.c fifo_rdonly_bug.c select_bug.c \
+@@ -96,6 +96,7 @@
+ CFLAGS        = $(DEBUG) $(OPT) $(DEFS)
+ FILES = Makefile $(SRCS) $(HDRS)
+ INCL  =
++PCRESO        = dict_pcre.so
+ LIB   = libutil.a
+ TESTPROG= dict_open dup2_pass_on_exec events exec_command fifo_open \
+       fifo_rdonly_bug fifo_rdwr_bug fifo_trigger fsspace fullname \
+@@ -111,8 +112,9 @@
+ LIB_DIR       = ../../lib
+ INC_DIR       = ../../include
++LIBS    = $(LIB_DIR)/$(LIB) $(LIB_DIR)/$(PCRESO)
+-.c.o:;        $(CC) $(CFLAGS) -c $*.c
++.c.o:; $(CC) -fPIC $(CFLAGS) -c $*.c
+ all: $(LIB)
+@@ -123,15 +125,19 @@
+ test: $(TESTPROG)
++$(PCRESO): dict_pcre.o
++      gcc -shared -Wl,-soname,dict_pcre.so -o $@ $? -lpcre -L. -lutil
++
+ $(LIB):       $(OBJS)
+-      $(AR) $(ARFL) $(LIB) $?
+-      $(RANLIB) $(LIB)
++      gcc -shared -Wl,-soname,libpostfix-util.so.1 -o $(LIB) $(OBJS) -ldl
+ $(LIB_DIR)/$(LIB): $(LIB)
+       cp $(LIB) $(LIB_DIR)
+-      $(RANLIB) $(LIB_DIR)/$(LIB)
+-update: $(LIB_DIR)/$(LIB) $(HDRS)
++$(LIB_DIR)/$(PCRESO): $(PCRESO)
++      cp $(PCRESO) $(LIB_DIR)
++
++update: $(LIBS) $(HDRS)
+       -for i in $(HDRS); \
+       do \
+         cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
+@@ -153,7 +159,8 @@
+       lint $(DEFS) $(SRCS) $(LINTFIX)
+ clean:
+-      rm -f *.o $(LIB) *core $(TESTPROG) junk $(MAKES) *.tmp
++      rm -f *.o $(LIB) $(PCRESO) *core $(TESTPROG) \
++              junk $(MAKES) *.tmp
+       rm -rf printfck
+ tidy: clean
+--- postfix-2.8.3/src/global/mail_dict.c~      2011-05-17 14:11:58.216666735 +0200
++++ postfix-2.8.3/src/global/mail_dict.c       2011-05-17 14:15:04.606666734 +0200
+@@ -46,18 +46,6 @@
+ static const DICT_OPEN_INFO dict_open_info[] = {
+     DICT_TYPE_PROXY, dict_proxy_open,
+-#ifdef HAS_LDAP
+-    DICT_TYPE_LDAP, dict_ldap_open,
+-#endif
+-#ifdef HAS_MYSQL
+-    DICT_TYPE_MYSQL, dict_mysql_open,
+-#endif
+-#ifdef HAS_PGSQL
+-    DICT_TYPE_PGSQL, dict_pgsql_open,
+-#endif
+-#ifdef HAS_SQLITE
+-    DICT_TYPE_SQLITE, dict_sqlite_open,
+-#endif
+     0,
+ };
+--- postfix-2.8.3/src/global/Makefile.in~      2011-05-17 14:11:58.243333401 +0200
++++ postfix-2.8.3/src/global/Makefile.in       2011-05-17 14:27:36.783333538 +0200
+@@ -35,7 +35,7 @@
+       canon_addr.o cfg_parser.o cleanup_strerror.o cleanup_strflags.o \
+       clnt_stream.o conv_time.o db_common.o debug_peer.o debug_process.o \
+       defer.o deliver_completed.o deliver_flock.o deliver_pass.o \
+-      deliver_request.o dict_ldap.o dict_mysql.o dict_pgsql.o \
++      deliver_request.o \
+       dict_proxy.o dict_sqlite.o domain_list.o dot_lockfile.o dot_lockfile_as.o \
+       dsb_scan.o dsn.o dsn_buf.o dsn_mask.o dsn_print.o dsn_util.o \
+       ehlo_mask.o ext_prop.o file_id.o flush_clnt.o header_opts.o \
+@@ -106,8 +106,12 @@
+ LIB_DIR       = ../../lib
+ INC_DIR       = ../../include
+ MAKES =
++LDAPSO  = dict_ldap.so
++MYSQLSO = dict_mysql.so
++PGSQLSO       = dict_pgsql.so
++SQLITESO= dict_sqlite.so
+-.c.o:;        $(CC) $(CFLAGS) -c $*.c
++.c.o:; $(CC) -fPIC $(CFLAGS) -c $*.c
+ all: $(LIB)
+@@ -119,14 +123,36 @@
+ test: $(TESTPROG)
+ $(LIB):       $(OBJS)
+-      $(AR) $(ARFL) $(LIB) $?
+-      $(RANLIB) $(LIB)
++      gcc -shared -Wl,-soname,libpostfix-global.so.1 -o $(LIB) $(OBJS)
++
++$(LDAPSO): dict_ldap.o $(LIB)
++      gcc -shared -Wl,-soname,dict_ldap.so -o $@ $? -lldap -llber -L../../lib -lutil -L. -lglobal
++
++$(MYSQLSO): dict_mysql.o $(LIB)
++      gcc -shared -Wl,-soname,dict_mysql.so -o $@ $? -lmysqlclient -L../../lib -lutil -L. -lglobal
++
++$(PGSQLSO): dict_pgsql.o $(LIB)
++      gcc -shared -Wl,-soname,dict_pgsql.so -o $@ $? -lpq -L../../lib -lutil -L. -lglobal
++
++$(SQLITESO): dict_sqlite.o $(LIB)
++      gcc -shared -Wl,-soname,dict_sqlite.so -o $@ $? -lsqlite3 -L../../lib -lutil -L. -lglobal
+ $(LIB_DIR)/$(LIB): $(LIB)
+       cp $(LIB) $(LIB_DIR)
+-      $(RANLIB) $(LIB_DIR)/$(LIB)
+-update: $(LIB_DIR)/$(LIB) $(HDRS)
++$(LIB_DIR)/$(LDAPSO): $(LDAPSO)
++      cp $(LDAPSO) $(LIB_DIR)
++
++$(LIB_DIR)/$(MYSQLSO): $(MYSQLSO)
++      cp $(MYSQLSO) $(LIB_DIR)
++
++$(LIB_DIR)/$(PGSQLSO): $(PGSQLSO)
++      cp $(PGSQLSO) $(LIB_DIR)
++
++$(LIB_DIR)/$(SQLITESO): $(SQLITESO)
++      cp $(SQLITESO) $(LIB_DIR)
++
++update: $(LIB_DIR)/$(LIB) $(LIB_DIR)/${LDAPSO} $(LIB_DIR)/${MYSQLSO} $(LIB_DIR)/${PGSQLSO} $(LIB_DIR)/${SQLITESO} $(HDRS)
+       -for i in $(HDRS); \
+       do \
+         cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
+@@ -497,7 +523,7 @@
+       lint $(DEFS) $(SRCS) $(LINTFIX)
+ clean:
+-      rm -f *.o $(LIB) *core $(TESTPROG) junk
++      rm -f *.o $(LIB) $(LDAPSO) $(MYSQLSO) $(PGSQLSO) $(SQLITESO) *core $(TESTPROG) junk
+       rm -rf printfck
+ tidy: clean
This page took 0.130495 seconds and 4 git commands to generate.