SOURCES (DEVEL): postfix-conf_msg.patch, postfix-dynamicmaps.patch...

shadzik shadzik at pld-linux.org
Tue Jul 11 20:46:33 CEST 2006


Author: shadzik                      Date: Tue Jul 11 18:46:33 2006 GMT
Module: SOURCES                       Tag: DEVEL
---- Log message:
- updated for postfix 2.3-RC9

---- Files affected:
SOURCES:
   postfix-conf_msg.patch (1.8 -> 1.8.2.1) , postfix-dynamicmaps.patch (1.8 -> 1.8.2.1) , postfix-ident.patch (1.2 -> 1.2.2.1) 

---- Diffs:

================================================================
Index: SOURCES/postfix-conf_msg.patch
diff -u SOURCES/postfix-conf_msg.patch:1.8 SOURCES/postfix-conf_msg.patch:1.8.2.1
--- SOURCES/postfix-conf_msg.patch:1.8	Tue Apr 26 12:35:24 2005
+++ SOURCES/postfix-conf_msg.patch	Tue Jul 11 20:46:28 2006
@@ -1,32 +1,5 @@
---- 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
-@@ -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;
- /*	int	var_fault_inj_code;
- /*	char   *var_bounce_service;
- /*	char   *var_cleanup_service;
-@@ -267,6 +268,7 @@
- char   *var_export_environ;
- char   *var_debug_peer_list;
- int     var_debug_peer_level;
-+char   *var_reject_reply_msg_access_denied;
- int     var_fault_inj_code;
- char   *var_bounce_service;
- char   *var_cleanup_service;
-@@ -510,6 +512,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_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
+--- 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
@@ -41,9 +14,8 @@
  /* 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
+--- 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
 @@ -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,
@@ -52,48 +24,29 @@
  	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 */
+--- 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;
+ /*	int	var_fault_inj_code;
+ /*	char   *var_bounce_service;
+ /*	char   *var_cleanup_service;
+@@ -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;
+ int     var_fault_inj_code;
+ char   *var_bounce_service;
+ char   *var_cleanup_service;
+@@ -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_REJECT_REPLY_MSG_ACCESS_DENIED, DEF_REJECT_REPLY_MSG_ACCESS_DENIED, &var_reject_reply_msg_access_denied, 1, 0,
+ 	0,
+     };
+     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.8.2.1
--- SOURCES/postfix-dynamicmaps.patch:1.8	Tue Apr 26 12:35:24 2005
+++ SOURCES/postfix-dynamicmaps.patch	Tue Jul 11 20:46:28 2006
@@ -93,15 +93,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 +110,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 +136,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 +569,160 @@
 +#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

================================================================
Index: SOURCES/postfix-ident.patch
diff -u SOURCES/postfix-ident.patch:1.2 SOURCES/postfix-ident.patch:1.2.2.1
--- SOURCES/postfix-ident.patch:1.2	Wed Feb 22 16:31:12 2006
+++ SOURCES/postfix-ident.patch	Tue Jul 11 20:46:28 2006
@@ -11,106 +11,6 @@
   /*
    * SMTPD messages
    */
-diff -urN -x '*~' postfix-2.2.5/src/smtpd/Makefile.in postfix-2.2.5-ident/src/smtpd/Makefile.in
---- postfix-2.2.5/src/smtpd/Makefile.in	2005-04-29 23:12:28.000000000 +0200
-+++ postfix-2.2.5-ident/src/smtpd/Makefile.in	2006-02-22 15:56:31.000000000 +0100
-@@ -1,10 +1,10 @@
- SHELL	= /bin/sh
- SRCS	= smtpd.c smtpd_token.c smtpd_check.c smtpd_chat.c smtpd_state.c \
- 	smtpd_peer.c smtpd_sasl_proto.c smtpd_sasl_glue.c smtpd_proxy.c \
--	smtpd_xforward.c
-+	smtpd_xforward.c smtpd_ident.c
- OBJS	= smtpd.o smtpd_token.o smtpd_check.o smtpd_chat.o smtpd_state.o \
- 	smtpd_peer.o smtpd_sasl_proto.o smtpd_sasl_glue.o smtpd_proxy.o \
--	smtpd_xforward.o
-+	smtpd_xforward.o smtpd_ident.o
- HDRS	= smtpd_token.h smtpd_check.h smtpd_chat.h smtpd_sasl_proto.h \
- 	smtpd_sasl_glue.h smtpd_proxy.h
- TESTSRC	= smtpd_token_test.c
-diff -urN -x '*~' postfix-2.2.5/src/smtpd/smtpd.c postfix-2.2.5-ident/src/smtpd/smtpd.c
---- postfix-2.2.5/src/smtpd/smtpd.c	2006-02-22 16:20:15.000000000 +0100
-+++ postfix-2.2.5-ident/src/smtpd/smtpd.c	2006-02-22 16:17:23.000000000 +0100
-@@ -900,6 +900,7 @@
- char   *var_local_rwr_clients;
- char   *var_smtpd_ehlo_dis_words;
- char   *var_smtpd_ehlo_dis_maps;
-+char   *var_smtpd_ident_lookup;
- 
- bool    var_smtpd_use_tls;
- bool    var_smtpd_enforce_tls;
-@@ -961,6 +962,11 @@
- int     smtpd_input_transp_mask;
- 
-  /*
-+  * Hosts that should be ident-queried
-+  */
-+NAMADR_LIST *smtpd_ident_lookup;
-+
-+ /*
-   * Forward declarations.
-   */
- static void helo_reset(SMTPD_STATE *);
-@@ -1951,10 +1957,18 @@
-      * intermediate proxy.
-      */
-     if (!state->proxy || state->xforward.flags == 0) {
--	out_fprintf(out_stream, REC_TYPE_NORM,
--		    "Received: from %s (%s [%s])",
--		    state->helo_name ? state->helo_name : state->name,
--		    state->name, state->rfc_addr);
-+	if (namadr_list_match(smtpd_ident_lookup, state->name, state->addr)) {
-+		out_fprintf(out_stream, REC_TYPE_NORM,
-+			    "Received: from %s (%s [%s] ident=%s)",
-+			    state->helo_name ? state->helo_name : state->name,
-+			    state->name, state->rfc_addr,
-+			    state->ident_user);
-+	} else {
-+		out_fprintf(out_stream, REC_TYPE_NORM,
-+			    "Received: from %s (%s [%s])",
-+			    state->helo_name ? state->helo_name : state->name,
-+			    state->name, state->rfc_addr);
-+	}
- #ifdef USE_TLS
- 	if (var_smtpd_tls_received_header && state->tls_context) {
- 	    out_fprintf(out_stream, REC_TYPE_NORM,
-@@ -3229,6 +3243,9 @@
-     xclient_hosts = namadr_list_init(MATCH_FLAG_NONE, var_xclient_hosts);
-     xforward_hosts = namadr_list_init(MATCH_FLAG_NONE, var_xforward_hosts);
-     hogger_list = namadr_list_init(MATCH_FLAG_NONE, var_smtpd_hoggers);
-+    smtpd_ident_lookup =
-+	namadr_list_init(match_parent_style(VAR_SMTPD_IDENT_LOOKUP),
-+			 var_smtpd_ident_lookup);
-     if (getuid() == 0 || getuid() == var_owner_uid)
- 	smtpd_check_init();
-     debug_peer_init();
-@@ -3430,6 +3447,7 @@
- 	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, 
-+	VAR_SMTPD_IDENT_LOOKUP, DEF_SMTPD_IDENT_LOOKUP, &var_smtpd_ident_lookup, 0, 0,
- 	0,
-     };
-     static CONFIG_RAW_TABLE raw_table[] = {
-diff -urN -x '*~' postfix-2.2.5/src/smtpd/smtpd.h postfix-2.2.5-ident/src/smtpd/smtpd.h
---- postfix-2.2.5/src/smtpd/smtpd.h	2005-01-30 22:45:31.000000000 +0100
-+++ postfix-2.2.5-ident/src/smtpd/smtpd.h	2006-02-22 15:56:31.000000000 +0100
-@@ -75,6 +75,7 @@
-     char   *addr;			/* client host address string */
-     char   *namaddr;			/* combined name and address */
-     char   *rfc_addr;			/* address for RFC 2821 */
-+    char   *ident_user;			/* user name returned by ident RFC 1413 */
-     struct sockaddr_storage sockaddr;	/* binary client endpoint */
-     int     peer_code;			/* 2=ok, 4=soft, 5=hard */
-     int     error_count;		/* reset after DOT */
-@@ -232,6 +233,8 @@
- extern void smtpd_peer_init(SMTPD_STATE *state);
- extern void smtpd_peer_reset(SMTPD_STATE *state);
- 
-+extern char *smtpd_ident(struct sockaddr_in *peer_addr, struct sockaddr_in *smtpd_addr);
-+
- #define	SMTPD_PEER_CODE_OK	2
- #define SMTPD_PEER_CODE_TEMP	4
- #define SMTPD_PEER_CODE_PERM	5
 diff -urN -x '*~' postfix-2.2.5/src/smtpd/smtpd_ident.c postfix-2.2.5-ident/src/smtpd/smtpd_ident.c
 --- postfix-2.2.5/src/smtpd/smtpd_ident.c	1970-01-01 01:00:00.000000000 +0100
 +++ postfix-2.2.5-ident/src/smtpd/smtpd_ident.c	2006-02-22 15:56:31.000000000 +0100
@@ -253,10 +153,106 @@
 +    return_val = mystrdup(ident_user);
 +    return return_val;
 +}
-diff -urN -x '*~' postfix-2.2.5/src/smtpd/smtpd_peer.c postfix-2.2.5-ident/src/smtpd/smtpd_peer.c
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/postfix-conf_msg.patch?r1=1.8&r2=1.8.2.1&f=u
    http://cvs.pld-linux.org/SOURCES/postfix-dynamicmaps.patch?r1=1.8&r2=1.8.2.1&f=u
    http://cvs.pld-linux.org/SOURCES/postfix-ident.patch?r1=1.2&r2=1.2.2.1&f=u



More information about the pld-cvs-commit mailing list