SOURCES: postfix-config.patch, postfix-conf_msg.patch, postfix-dyn...

shadzik shadzik at pld-linux.org
Mon Jul 17 03:53:38 CEST 2006


Author: shadzik                      Date: Mon Jul 17 01:53:38 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated for postfix-2.3.0 stable

---- Files affected:
SOURCES:
   postfix-config.patch (1.16 -> 1.17) , postfix-conf_msg.patch (1.8 -> 1.9) , postfix-dynamicmaps.patch (1.8 -> 1.9) , postfix-ident.patch (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/postfix-config.patch
diff -u SOURCES/postfix-config.patch:1.16 SOURCES/postfix-config.patch:1.17
--- SOURCES/postfix-config.patch:1.16	Tue Apr 26 12:35:24 2005
+++ SOURCES/postfix-config.patch	Mon Jul 17 03:53:32 2006
@@ -173,15 +173,6 @@
 diff -dur postfix-2.1.3.orig/man/man1/sendmail.1 postfix-2.1.3/man/man1/sendmail.1
 --- postfix-2.1.3.orig/man/man1/sendmail.1	2004-04-14 03:56:07.000000000 +0200
 +++ postfix-2.1.3/man/man1/sendmail.1	2004-06-22 14:25:58.213160652 +0200
-@@ -92,7 +92,7 @@
- This feature is available in Postfix version 2.1 and later.
- .IP "\fB-C \fIconfig_file\fR (ignored)"
- The path name of the \fBsendmail.cf\fR file. Postfix configuration
--files are kept in the \fB/etc/postfix\fR directory.
-+files are kept in the \fB/etc/mail\fR directory.
- .IP "\fB-F \fIfull_name\fR
- Set the sender full name. This is used only with messages that
- have no \fBFrom:\fR message header.
 @@ -325,7 +325,7 @@
  .na
  .nf
@@ -559,15 +550,6 @@
  .fi
  .ad
  .ft R
-@@ -1938,7 +1938,7 @@
- .PP
- When this parameter value is changed you need to re-run "\fBpostfix
- set-permissions\fR" (with Postfix 2.0 and earlier:
--"\fB/etc/postfix/post-install set-permissions\fR".
-+"\fB/etc/mail/post-install set-permissions\fR".
- .SH mail_release_date (default: see "postconf -d" output)
- The Postfix release date, in "YYYYMMDD" format.
- .SH mail_spool_directory (default: see "postconf -d" output)
 @@ -2360,7 +2360,7 @@
  mynetworks = !192.168.0.1, 192.168.0.0/28
  mynetworks = 127.0.0.0/8 168.100.189.0/28 [::1]/128 [2001:240:5c7::]/64
@@ -678,15 +660,6 @@
  .fi
  .ad
  .ft R
-@@ -3125,7 +3125,7 @@
- The group ownership of set-gid Postfix commands and of group-writable
- Postfix directories. When this parameter value is changed you need
- to re-run "\fBpostfix set-permissions\fR" (with Postfix 2.0 and
--earlier: "\fB/etc/postfix/post-install set-permissions\fR".
-+earlier: "\fB/etc/mail/post-install set-permissions\fR".
- .SH show_user_unknown_table_name (default: yes)
- Display the name of the recipient table in the "User unknown"
- responses.  The extra detail makes trouble shooting easier but also
 @@ -3154,7 +3154,7 @@
  .nf
  .na
@@ -732,15 +705,6 @@
  smtp_sasl_mechanism_filter = !gssapi, !login, static:rest
  .fi
  .ad
-@@ -3526,7 +3526,7 @@
- attempt to authenticate to the remote host.
- .PP
- The Postfix SMTP client opens the lookup table before going to
--chroot jail, so you can leave the password file in /etc/postfix.
-+chroot jail, so you can leave the password file in /etc/mail.
- .SH smtp_sasl_security_options (default: noplaintext, noanonymous)
- What authentication mechanisms the Postfix SMTP client is allowed
- to use. The list of available authentication mechanisms is system
 @@ -3603,7 +3603,7 @@
  .nf
  .na
@@ -831,15 +795,6 @@
  .fi
  .ad
  .ft R
-@@ -5004,7 +5004,7 @@
- for example, the permit_tls_clientcerts feature.
- .PP
- Some clients such as Netscape will either complain if no
--certificate is available (for the list of CAs in /etc/postfix/certs)
-+certificate is available (for the list of CAs in /etc/mail/certs)
- or will offer multiple client certificates to choose from. This
- may be annoying, so this option is "off" by default.
- .SH smtpd_tls_auth_only (default: no)
 @@ -5049,7 +5049,7 @@
  .nf
  .na

================================================================
Index: SOURCES/postfix-conf_msg.patch
diff -u SOURCES/postfix-conf_msg.patch:1.8 SOURCES/postfix-conf_msg.patch:1.9
--- SOURCES/postfix-conf_msg.patch:1.8	Tue Apr 26 12:35:24 2005
+++ SOURCES/postfix-conf_msg.patch	Mon Jul 17 03:53:33 2006
@@ -1,99 +1,53 @@
---- postfix-2.2.2/src/global/mail_params.c.orig	2005-01-19 02:22:02.000000000 +0100
-+++ postfix-2.2.2/src/global/mail_params.c	2005-04-26 11:41:23.000000000 +0200
+--- src/global/mail_params.h.orig	2004-06-22 14:32:58.615734426 +0200
++++ src/global/mail_params.h	2004-06-22 14:33:21.260418134 +0200
+@@ -2204,6 +2204,13 @@
+ extern char *var_anvil_service;
+ #endif
+ 
++ /*
++  * SMTPD messages
++  */
++#define VAR_REJECT_REPLY_MSG_ACCESS_DENIED	"smtpd_reject_msg_access_denied"
++#define DEF_REJECT_REPLY_MSG_ACCESS_DENIED	"rejected: Relay access denied."
++extern char *var_reject_reply_msg_access_denied;
++
+ /* LICENSE
+ /* .ad
+ /* .fi
+--- src/smtpd/smtpd.c.orig	2004-06-22 14:32:57.338808646 +0200
++++ src/smtpd/smtpd.c	2004-06-22 14:41:40.372360162 +0200
+@@ -4514,6 +4514,7 @@
+ 	VAR_MILT_DEF_ACTION, DEF_MILT_DEF_ACTION, &var_milt_def_action, 1, 0,
+ 	VAR_MILT_DAEMON_NAME, DEF_MILT_DAEMON_NAME, &var_milt_daemon_name, 1, 0,
+ 	VAR_MILT_V, DEF_MILT_V, &var_milt_v, 1, 0,
++	VAR_REJECT_REPLY_MSG_ACCESS_DENIED, DEF_REJECT_REPLY_MSG_ACCESS_DENIED, &var_reject_reply_msg_access_denied, 1, 0,
+ 	0,
+     };
+     static CONFIG_RAW_TABLE raw_table[] = {
+--- src/global/mail_params.c	2006-06-15 02:50:02.000000000 +0200
++++ src/global/mail_params.c-new	2006-07-11 19:29:07.162325784 +0200
 @@ -78,6 +78,7 @@
  /*	char	*var_debug_peer_list;
  /*	int	var_debug_peer_level;
  /*	int	var_in_flow_delay;
-+/*	char    *var_reject_reply_msg_access_denied;
++/*	char	*var_reject_reply_msg_access_denied;
  /*	int	var_fault_inj_code;
  /*	char   *var_bounce_service;
  /*	char   *var_cleanup_service;
-@@ -267,6 +268,7 @@
+@@ -246,6 +247,7 @@
  char   *var_export_environ;
  char   *var_debug_peer_list;
  int     var_debug_peer_level;
-+char   *var_reject_reply_msg_access_denied;
++char	*var_reject_reply_msg_access_denied;
  int     var_fault_inj_code;
  char   *var_bounce_service;
  char   *var_cleanup_service;
-@@ -510,6 +512,7 @@
+@@ -488,6 +490,7 @@
  	VAR_FLUSH_SERVICE, DEF_FLUSH_SERVICE, &var_flush_service, 1, 0,
  	VAR_VERIFY_SERVICE, DEF_VERIFY_SERVICE, &var_verify_service, 1, 0,
  	VAR_TRACE_SERVICE, DEF_TRACE_SERVICE, &var_trace_service, 1, 0,
+	VAR_INT_FILT_CLASSES, DEF_INT_FILT_CLASSES, &var_int_filt_classes, 0, 0,
 +	VAR_REJECT_REPLY_MSG_ACCESS_DENIED, DEF_REJECT_REPLY_MSG_ACCESS_DENIED, &var_reject_reply_msg_access_denied, 1, 0,
- #ifdef USE_TLS
- 	VAR_TLS_RAND_EXCH_NAME, DEF_TLS_RAND_EXCH_NAME, &var_tls_rand_exch_name, 0, 0,
- 	VAR_SMTPD_TLS_CERT_FILE, DEF_SMTPD_TLS_CERT_FILE, &var_smtpd_tls_cert_file, 0, 0,
-diff -dur postfix-2.1.3.orig/src/global/mail_params.h postfix-2.1.3/src/global/mail_params.h
---- postfix-2.1.3.orig/src/global/mail_params.h	2004-06-22 14:32:58.615734426 +0200
-+++ postfix-2.1.3/src/global/mail_params.h	2004-06-22 14:33:21.260418134 +0200
-@@ -2204,6 +2204,13 @@
- extern char *var_anvil_service;
- #endif
- 
-+ /*
-+  * SMTPD messages
-+  */
-+#define VAR_REJECT_REPLY_MSG_ACCESS_DENIED	"smtpd_reject_msg_access_denied"
-+#define DEF_REJECT_REPLY_MSG_ACCESS_DENIED	"rejected: Relay access denied."
-+extern char *var_reject_reply_msg_access_denied;
-+
- /* LICENSE
- /* .ad
- /* .fi
-diff -dur postfix-2.1.3.orig/src/smtpd/smtpd.c postfix-2.1.3/src/smtpd/smtpd.c
---- postfix-2.1.3.orig/src/smtpd/smtpd.c	2004-06-22 14:32:57.338808646 +0200
-+++ postfix-2.1.3/src/smtpd/smtpd.c	2004-06-22 14:41:40.372360162 +0200
-@@ -3089,6 +3089,7 @@
- 	VAR_RELAY_CCERTS, DEF_RELAY_CCERTS, &var_relay_ccerts, 0, 0,
- 	VAR_SMTPD_SASL_TLS_OPTS, DEF_SMTPD_SASL_TLS_OPTS, &var_smtpd_sasl_tls_opts, 0, 0,
- #endif
-+ 	VAR_REJECT_REPLY_MSG_ACCESS_DENIED, DEF_REJECT_REPLY_MSG_ACCESS_DENIED, &var_reject_reply_msg_access_denied, 1, 0, 
  	0,
      };
-     static CONFIG_RAW_TABLE raw_table[] = {
-diff -dur postfix-2.1.3.orig/src/smtpd/smtpd_check.c postfix-2.1.3/src/smtpd/smtpd_check.c
---- postfix-2.1.3.orig/src/smtpd/smtpd_check.c	2004-06-22 14:32:57.348808065 +0200
-+++ postfix-2.1.3/src/smtpd/smtpd_check.c	2004-06-22 14:33:21.271417494 +0200
-@@ -1103,6 +1103,7 @@
- 			               char *reply_name, char *reply_class)
- {
-     char   *myname = "check_relay_domains";
-+	VSTRING *reply_msg = vstring_alloc(1);
- 
- #if 1
-     static int once;
-@@ -1133,9 +1134,10 @@
-     /*
-      * Deny relaying between sites that both are not in relay_domains.
-      */
-+    vstring_strcat(reply_msg, "%d <%s>: %s ");
-+    vstring_strcat(reply_msg, var_reject_reply_msg_access_denied);
-     return (smtpd_check_reject(state, MAIL_ERROR_POLICY,
--			       "%d <%s>: %s rejected: Relay access denied",
--			       var_relay_code, reply_name, reply_class));
-+			    vstring_export(reply_msg), var_relay_code, reply_name, reply_class));
- }
- 
- /* permit_auth_destination - OK for message relaying */
-@@ -1192,6 +1194,7 @@
- static int reject_unauth_destination(SMTPD_STATE *state, char *recipient)
- {
-     char   *myname = "reject_unauth_destination";
-+	VSTRING *reply_msg = vstring_alloc(1);
- 
-     if (msg_verbose)
- 	msg_info("%s: %s", myname, recipient);
-@@ -1205,9 +1208,10 @@
-     /*
-      * Reject relaying to sites that are not listed in relay_domains.
-      */
-+	vstring_strcat(reply_msg, "%d <%s>: ");
-+	vstring_strcat(reply_msg, var_reject_reply_msg_access_denied);
-     return (smtpd_check_reject(state, MAIL_ERROR_POLICY,
--			       "%d <%s>: Relay access denied",
--			       var_relay_code, recipient));
-+			       vstring_export(reply_msg), var_relay_code, recipient));
- }
- 
- /* reject_unauth_pipelining - reject improper use of SMTP command pipelining */
+     static CONFIG_STR_FN_TABLE function_str_defaults_2[] = {

================================================================
Index: SOURCES/postfix-dynamicmaps.patch
diff -u SOURCES/postfix-dynamicmaps.patch:1.8 SOURCES/postfix-dynamicmaps.patch:1.9
--- SOURCES/postfix-dynamicmaps.patch:1.8	Tue Apr 26 12:35:24 2005
+++ SOURCES/postfix-dynamicmaps.patch	Mon Jul 17 03:53:33 2006
@@ -27,15 +27,6 @@
 diff -durN postfix-2.1.3.orig/src/global/Makefile.in postfix-2.1.3/src/global/Makefile.in
 --- postfix-2.1.3.orig/src/global/Makefile.in	2004-06-22 15:38:56.931476412 +0200
 +++ postfix-2.1.3/src/global/Makefile.in	2004-06-22 15:39:56.167971280 +0200
-@@ -29,7 +29,7 @@
- 	canon_addr.o cfg_parser.o cleanup_strerror.o cleanup_strflags.o \
- 	clnt_stream.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 dict_proxy.o domain_list.o \
-+	dict_proxy.o domain_list.o \
- 	dot_lockfile.o dot_lockfile_as.o ext_prop.o file_id.o flush_clnt.o \
- 	header_opts.o header_token.o hold_message.o input_transp.o \
- 	is_header.o log_adhoc.o mail_addr.o mail_addr_crunch.o \
 @@ -90,8 +90,11 @@
  LIB_DIR	= ../../lib
  INC_DIR	= ../../include
@@ -93,15 +84,6 @@
  	rm -rf printfck
  
  tidy:	clean
-@@ -575,6 +594,8 @@
- dict_proxy.o: mail_params.h
- dict_proxy.o: clnt_stream.h
- dict_proxy.o: dict_proxy.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
 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
@@ -119,75 +101,6 @@
  }
  
  /* mail_conf_eval - expand macros in string */
-diff -durN postfix-2.1.3.orig/src/global/mail_params.c postfix-2.1.3/src/global/mail_params.c
---- postfix-2.1.3.orig/src/global/mail_params.c	2004-06-22 15:38:57.219459372 +0200
-+++ postfix-2.1.3/src/global/mail_params.c	2004-06-22 15:39:24.248860034 +0200
-@@ -154,6 +154,8 @@
- #ifdef HAS_DB
- #include <dict_db.h>
- #endif
-+#include <safe_open.h>
-+#include <mymalloc.h>
- 
- /* Global library. */
- 
-@@ -270,6 +272,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;
-@@ -456,6 +459,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()
-@@ -632,6 +667,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);
 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
@@ -214,94 +127,6 @@
  
  $(BIN_DIR)/$(PROG): $(PROG)
  	 cp $(PROG) $(BIN_DIR)
---- postfix-2.2.2/src/util/Makefile.in.orig	2005-03-11 16:14:00.000000000 +0100
-+++ postfix-2.2.2/src/util/Makefile.in	2005-04-26 11:45:19.000000000 +0200
-@@ -30,13 +30,13 @@
- 	attr_print_plain.c sane_connect.c neuter.c name_code.c \
- 	uppercase.c unix_recv_fd.c stream_recv_fd.c unix_send_fd.c \
- 	stream_send_fd.c dict_sdbm.c hex_code.c dummy_read.c dummy_write.c \
--	myaddrinfo.c sock_addr.c inet_proto.c cidr_match.c mask_addr.c
-+	myaddrinfo.c sock_addr.c inet_proto.c cidr_match.c mask_addr.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_cdb.o dict_dbm.o dict_debug.o dict_env.o \
- 	dict_cidr.o dict_ht.o dict_ni.o dict_nis.o \
--	dict_nisplus.o dict_open.o dict_pcre.o dict_regexp.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 \
-@@ -62,7 +62,7 @@
- 	attr_print_plain.o sane_connect.o $(STRCASE) neuter.o name_code.o \
- 	uppercase.o unix_recv_fd.o stream_recv_fd.o unix_send_fd.o \
- 	stream_send_fd.o dict_sdbm.o hex_code.o dummy_read.o dummy_write.o \
--	myaddrinfo.o sock_addr.o inet_proto.o cidr_match.o mask_addr.o
-+	myaddrinfo.o sock_addr.o inet_proto.o cidr_match.o mask_addr.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_cdb.h dict_dbm.h dict_env.h \
- 	dict_cidr.h dict_ht.h dict_ni.h dict_nis.h \
-@@ -83,13 +83,14 @@
- 	vbuf_print.h vstream.h vstring.h vstring_vstream.h watchdog.h \
- 	auto_clnt.h attr_clnt.h sane_connect.h name_code.h dict_sdbm.h \
- 	hex_code.h myaddrinfo.h sock_addr.h inet_proto.h cidr_match.h \
--	mask_addr.h
-+	mask_addr.h load_lib.h
- TESTSRC	= fifo_open.c fifo_rdwr_bug.c fifo_rdonly_bug.c select_bug.c \
- 	stream_test.c dup2_pass_on_exec.c
- DEFS	= -I. -D$(SYSTYPE)
- 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 \
-@@ -104,8 +105,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)
- 
-@@ -114,15 +116,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); \
-@@ -144,7 +150,8 @@
- 	lint $(SRCS)
- 
- 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
 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
@@ -735,3 +560,171 @@
 +#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()
+@@ -584,6 +619,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-2.3-RC9/src/util/Makefile.in.orig	2006-07-09 19:45:23.000000000 +0200
++++ postfix-2.3-RC9/src/util/Makefile.in	2006-07-11 19:49:15.792586056 +0200
+@@ -30,14 +30,14 @@
+ 	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
++	allascii.c load_file.c load_lib.c
+ 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_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 \
+@@ -62,7 +62,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
++	allascii.o load_file.o load_lib.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_env.h dict_ht.h \
+@@ -81,13 +81,14 @@
+ 	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
++	vstring_vstream.h watchdog.h format_tv.h load_file.h load_lib.h
+ TESTSRC	= fifo_open.c fifo_rdwr_bug.c fifo_rdonly_bug.c select_bug.c \
+ 	stream_test.c dup2_pass_on_exec.c
+ DEFS	= -I. -D$(SYSTYPE)
+ 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 \
+@@ -102,8 +103,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)
+ 
+@@ -114,15 +116,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); \
+@@ -144,7 +150,8 @@
+ 	lint $(SRCS)
+ 
+ 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.3.0/src/global/Makefile.in	2006-07-17 03:28:25.732653648 +0200
++++ postfix-2.3.0/src/global/Makefile.in-new	2006-07-17 03:29:31.805609032 +0200
+@@ -32,7 +32,7 @@
+ 	canon_addr.o cfg_parser.o cleanup_strerror.o cleanup_strflags.o \
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/postfix-config.patch?r1=1.16&r2=1.17&f=u
    http://cvs.pld-linux.org/SOURCES/postfix-conf_msg.patch?r1=1.8&r2=1.9&f=u
    http://cvs.pld-linux.org/SOURCES/postfix-dynamicmaps.patch?r1=1.8&r2=1.9&f=u
    http://cvs.pld-linux.org/SOURCES/postfix-ident.patch?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list