]> git.pld-linux.org Git - packages/postfix.git/blame - postfix-dynamicmaps.patch
up to 2.7.16
[packages/postfix.git] / postfix-dynamicmaps.patch
CommitLineData
d1e849db 1diff -durN postfix-2.1.3.orig/src/dns/Makefile.in postfix-2.1.3/src/dns/Makefile.in
2--- postfix-2.1.3.orig/src/dns/Makefile.in 2004-04-22 21:37:34.000000000 +0200
3+++ postfix-2.1.3/src/dns/Makefile.in 2004-06-22 15:39:24.242860389 +0200
4@@ -12,7 +12,7 @@
5 LIB_DIR = ../../lib
6 INC_DIR = ../../include
7
8-.c.o:; $(CC) $(CFLAGS) -c $*.c
9+.c.o:; $(CC) -fPIC $(CFLAGS) -c $*.c
10
11 all: $(LIB)
12
13@@ -24,12 +24,10 @@
14 tests: test
15
16 $(LIB): $(OBJS)
17- $(AR) $(ARFL) $(LIB) $?
18- $(RANLIB) $(LIB)
19+ gcc -shared -Wl,-soname,libpostfix-dns.so.1 -o $(LIB) $(OBJS)
20
21 $(LIB_DIR)/$(LIB): $(LIB)
22 cp $(LIB) $(LIB_DIR)
23- $(RANLIB) $(LIB_DIR)/$(LIB)
24
25 update: $(LIB_DIR)/$(LIB) $(HDRS)
26 -for i in $(HDRS); \
27diff -durN postfix-2.1.3.orig/src/global/Makefile.in postfix-2.1.3/src/global/Makefile.in
28--- postfix-2.1.3.orig/src/global/Makefile.in 2004-06-22 15:38:56.931476412 +0200
29+++ postfix-2.1.3/src/global/Makefile.in 2004-06-22 15:39:56.167971280 +0200
30@@ -90,8 +90,11 @@
31 LIB_DIR = ../../lib
32 INC_DIR = ../../include
33 MAKES =
34+LDAPSO = dict_ldap.so
35+MYSQLSO = dict_mysql.so
36+PGSQLSO = dict_pgsql.so
37
38-.c.o:; $(CC) $(CFLAGS) -c $*.c
39+.c.o:; $(CC) -fPIC $(CFLAGS) -c $*.c
40
41 all: $(LIB)
42
43@@ -101,14 +104,30 @@
44 test: $(TESTPROG)
45
46 $(LIB): $(OBJS)
47- $(AR) $(ARFL) $(LIB) $?
48- $(RANLIB) $(LIB)
49+ gcc -shared -Wl,-soname,libpostfix-global.so.1 -o $(LIB) $(OBJS)
50+
51+$(LDAPSO): dict_ldap.o $(LIB)
52+ gcc -shared -Wl,-soname,dict_ldap.so -o $@ $? -lldap -llber -L../../lib -lutil -L. -lglobal
53+
54+$(MYSQLSO): dict_mysql.o $(LIB)
55+ gcc -shared -Wl,-soname,dict_mysql.so -o $@ $? -lmysqlclient -L../../lib -lutil -L. -lglobal
56+
57+$(PGSQLSO): dict_pgsql.o $(LIB)
58+ gcc -shared -Wl,-soname,dict_pgsql.so -o $@ $? -lpq -L../../lib -lutil -L. -lglobal
59
60 $(LIB_DIR)/$(LIB): $(LIB)
61 cp $(LIB) $(LIB_DIR)
62- $(RANLIB) $(LIB_DIR)/$(LIB)
63
64-update: $(LIB_DIR)/$(LIB) $(HDRS)
65+$(LIB_DIR)/$(LDAPSO): $(LDAPSO)
66+ cp $(LDAPSO) $(LIB_DIR)
67+
68+$(LIB_DIR)/$(MYSQLSO): $(MYSQLSO)
69+ cp $(MYSQLSO) $(LIB_DIR)
70+
71+$(LIB_DIR)/$(PGSQLSO): $(PGSQLSO)
72+ cp $(PGSQLSO) $(LIB_DIR)
73+
74+update: $(LIB_DIR)/$(LIB) $(LIB_DIR)/${LDAPSO} $(LIB_DIR)/${MYSQLSO} $(LIB_DIR)/${PGSQLSO} $(HDRS)
75 -for i in $(HDRS); \
76 do \
77 cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
78@@ -360,7 +379,7 @@
79 lint $(DEFS) $(SRCS) $(LINTFIX)
80
81 clean:
82- rm -f *.o $(LIB) *core $(TESTPROG) junk
83+ rm -f *.o $(LIB) $(LDAPSO) $(MYSQLSO) $(PGSQLSO) *core $(TESTPROG) junk
84 rm -rf printfck
85
86 tidy: clean
87diff -durN postfix-2.1.3.orig/src/global/mail_conf.c postfix-2.1.3/src/global/mail_conf.c
88--- postfix-2.1.3.orig/src/global/mail_conf.c 2004-04-10 16:52:51.000000000 +0200
89+++ postfix-2.1.3/src/global/mail_conf.c 2004-06-22 15:39:24.247860093 +0200
90@@ -175,6 +175,13 @@
91 path = concatenate(var_config_dir, "/", "main.cf", (char *) 0);
92 dict_load_file(CONFIG_DICT, path);
93 myfree(path);
94+
95+#ifndef NO_DYNAMIC_MAPS
96+ path = concatenate(var_config_dir, "/", "dynamicmaps.cf", (char *) 0);
97+ dict_open_dlinfo(path);
98+ myfree(path);
99+#endif
100+
101 }
102
103 /* mail_conf_eval - expand macros in string */
104diff -durN postfix-2.1.3.orig/src/master/Makefile.in postfix-2.1.3/src/master/Makefile.in
105--- postfix-2.1.3.orig/src/master/Makefile.in 2004-04-22 21:37:35.000000000 +0200
106+++ postfix-2.1.3/src/master/Makefile.in 2004-06-22 15:39:24.249859975 +0200
107@@ -20,7 +20,7 @@
108 INC_DIR = ../../include
109 BIN_DIR = ../../libexec
110
111-.c.o:; $(CC) $(CFLAGS) -c $*.c
112+.c.o:; $(CC) `for i in $(LIB_OBJ); do [ $$i = $@ ] && echo -fPIC; done` $(CFLAGS) -c $*.c
113
114 all: $(PROG) $(LIB)
115
116@@ -35,12 +35,10 @@
117 tests: test
118
119 $(LIB): $(LIB_OBJ)
120- $(AR) $(ARFL) $(LIB) $?
121- $(RANLIB) $(LIB)
122+ gcc -shared -Wl,-soname,libpostfix-master.so.1 -o $(LIB) $(LIB_OBJ)
123
124 $(LIB_DIR)/$(LIB): $(LIB)
125 cp $(LIB) $(LIB_DIR)/$(LIB)
126- $(RANLIB) $(LIB_DIR)/$(LIB)
127
128 $(BIN_DIR)/$(PROG): $(PROG)
129 cp $(PROG) $(BIN_DIR)
130diff -durN postfix-2.1.3.orig/src/util/dict.h postfix-2.1.3/src/util/dict.h
131--- postfix-2.1.3.orig/src/util/dict.h 2003-07-03 17:04:13.000000000 +0200
132+++ postfix-2.1.3/src/util/dict.h 2004-06-22 15:39:24.253859738 +0200
133@@ -82,6 +82,20 @@
134 */
135 extern ARGV *dict_mapnames(void);
136
137+#ifndef NO_DYNAMIC_MAPS
138+ /*
139+ * Interface for dynamic map loading.
140+ */
141+typedef struct {
142+ const char *pattern;
143+ const char *soname;
144+ const char *openfunc;
145+} DLINFO;
146+
147+extern void dict_open_dlinfo(const char *path);
148+extern DLINFO *dict_open_dlfind(const char *type);
149+#endif
150+
151 /*
152 * High-level interface, with logical dictionary names.
153 */
154diff -durN postfix-2.1.3.orig/src/util/dict_open.c postfix-2.1.3/src/util/dict_open.c
155--- postfix-2.1.3.orig/src/util/dict_open.c 2004-06-22 15:38:57.069468247 +0200
156+++ postfix-2.1.3/src/util/dict_open.c 2004-06-22 15:39:24.254859679 +0200
157@@ -158,6 +158,9 @@
158 #include <strings.h>
159 #endif
160
161+#include <sys/stat.h>
162+#include <unistd.h>
163+
164 /* Utility library. */
165
166 #include <argv.h>
167@@ -181,6 +184,14 @@
168 #include <split_at.h>
169 #include <htable.h>
170
171+#ifndef NO_DYNAMIC_MAPS
172+#include <load_lib.h>
173+#include <vstring.h>
174+#include <vstream.h>
175+#include <vstring_vstream.h>
176+#include <mvect.h>
177+#endif
178+
179 /*
180 * lookup table for available map types.
181 */
182@@ -212,9 +223,11 @@
183 #ifdef HAS_NETINFO
184 DICT_TYPE_NETINFO, dict_ni_open,
185 #endif
186+#ifndef MAX_DYNAMIC_MAPS
187 #ifdef HAS_PCRE
188 DICT_TYPE_PCRE, dict_pcre_open,
189 #endif
190+#endif /* MAX_DYNAMIC_MAPS */
191 #ifdef HAS_POSIX_REGEXP
192 DICT_TYPE_REGEXP, dict_regexp_open,
193 #endif
194@@ -269,8 +282,38 @@
195
196 if (dict_open_hash == 0)
197 dict_open_init();
198- if ((dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type)) == 0)
199- msg_fatal("unsupported dictionary type: %s", dict_type);
200+ if ((dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type)) == 0) {
201+#ifndef NO_DYNAMIC_MAPS
202+ struct stat st;
203+ VSTRING *lib, *func;
204+ LIB_FN fn[2];
205+ DICT *(*open) (const char *, int, int);
206+ DLINFO *dl=dict_open_dlfind(dict_type);
207+ if (!dl)
208+#endif
209+ msg_fatal("%s: unsupported dictionary type: %s", myname, dict_type);
210+#ifndef NO_DYNAMIC_MAPS
211+ lib=vstring_alloc(1);
212+ vstring_sprintf(lib,dl->soname,dict_type);
213+ if (stat(vstring_str(lib),&st) < 0) {
214+ msg_fatal("%s: unsupported dictionary type: %s (%s not found. Is the postfix-%s package installed?)",
215+ myname, dict_type, vstring_str(lib), dict_type);
216+ }
217+ func=vstring_alloc(1);
218+ vstring_sprintf(func,dl->openfunc,dict_type);
219+ fn[0].name = vstring_str(func);
220+ fn[0].ptr = (void**)&open;
221+ fn[1].name = NULL;
222+ load_library_symbols(vstring_str(lib), fn, NULL);
223+ dict_open_register(dict_type, open);
224+ dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type);
225+ vstring_free(lib);
226+ vstring_free(func);
227+#endif
228+ }
229+ if (msg_verbose>1) {
230+ msg_info("%s: calling %s open routine",myname,dict_type);
231+ }
232 if ((dict = dp->open(dict_name, open_flags, dict_flags)) == 0)
233 msg_fatal("opening %s:%s %m", dict_type, dict_name);
234 if (msg_verbose)
235@@ -317,6 +360,76 @@
236 return mapnames;
237 }
238
239+#ifndef NO_DYNAMIC_MAPS
240+static DLINFO *dict_dlinfo;
241+
242+void dict_open_dlinfo(const char *path)
243+{
244+ char *myname="dict_open_dlinfo";
245+ VSTREAM *conf_fp=vstream_fopen(path,O_RDONLY,0);
246+ VSTRING *buf = vstring_alloc(100);
247+ char *cp;
248+ ARGV *argv;
249+ MVECT vector;
250+ int nelm=0;
251+ int linenum=0;
252+
253+ dict_dlinfo=(DLINFO*)mvect_alloc(&vector,sizeof(DLINFO),3,NULL,NULL);
254+
255+ if (!conf_fp) {
256+ msg_warn("%s: cannot open %s. No dynamic maps will be allowed.",
257+ myname, path);
258+ } else {
259+ while (vstring_get_nonl(buf,conf_fp) != VSTREAM_EOF) {
260+ cp = vstring_str(buf);
261+ linenum++;
262+ if (*cp == '#' || *cp == '\0')
263+ continue;
264+ argv = argv_split(cp, " \t");
265+ if (argv->argc != 3) {
266+ msg_fatal("%s: Expected \"pattern .so-name function\" at line %d",
267+ myname, linenum);
268+ }
269+ if (argv->argv[1][0] != '/') {
270+ msg_fatal("%s: .so name must begin with a \"/\" at line %d",
271+ myname, linenum);
272+ }
273+ if (nelm >= vector.nelm) {
274+ dict_dlinfo=(DLINFO*)mvect_realloc(&vector,vector.nelm+3);
275+ }
276+ dict_dlinfo[nelm].pattern = mystrdup(argv->argv[0]);
277+ dict_dlinfo[nelm].soname = mystrdup(argv->argv[1]);
278+ dict_dlinfo[nelm].openfunc = mystrdup(argv->argv[2]);
279+ nelm++;
280+ argv_free(argv);
281+ }
282+ }
283+ if (nelm >= vector.nelm) {
284+ dict_dlinfo=(DLINFO*)mvect_realloc(&vector,vector.nelm+1);
285+ }
286+ dict_dlinfo[nelm].pattern = NULL;
287+ dict_dlinfo[nelm].soname = NULL;
288+ dict_dlinfo[nelm].openfunc = NULL;
289+ if (conf_fp)
290+ vstream_fclose(conf_fp);
291+ vstring_free(buf);
292+}
293+
294+DLINFO *dict_open_dlfind(const char *type)
295+{
296+ DLINFO *dp;
297+
298+ if (!dict_dlinfo)
299+ return NULL;
300+
301+ for (dp=dict_dlinfo; dp->pattern; dp++) {
302+ if (strcmp(dp->pattern,type)==0 || strcmp(dp->pattern,"*")==0)
303+ return dp;
304+ }
305+ return NULL;
306+}
307+#endif /* !NO_DYNAMIC_MAPS */
308+
309 #ifdef TEST
310
311 /*
312diff -durN postfix-2.1.3.orig/src/util/load_lib.c postfix-2.1.3/src/util/load_lib.c
313--- postfix-2.1.3.orig/src/util/load_lib.c 1970-01-01 01:00:00.000000000 +0100
314+++ postfix-2.1.3/src/util/load_lib.c 2004-06-22 15:39:24.257859501 +0200
315@@ -0,0 +1,135 @@
316+/*++
317+/* NAME
318+/* load_lib 3
319+/* SUMMARY
320+/* library loading wrappers
321+/* SYNOPSIS
322+/* #include <load_lib.h>
323+/*
324+/* extern int load_library_symbols(const char *, LIB_FN *, LIB_FN *);
325+/* const char *libname;
326+/* LIB_FN *libfuncs;
327+/* LIB_FN *libdata;
328+/*
329+/* DESCRIPTION
330+/* This module loads functions from libraries, returnine pointers
331+/* to the named functions.
332+/*
333+/* load_library_symbols() loads all of the desired functions, and
334+/* returns zero for success, or exits via msg_fatal().
335+/*
336+/* SEE ALSO
337+/* msg(3) diagnostics interface
338+/* DIAGNOSTICS
339+/* Problems are reported via the msg(3) diagnostics routines:
340+/* library not found, symbols not found, other fatal errors.
341+/* LICENSE
342+/* .ad
343+/* .fi
344+/* The Secure Mailer license must be distributed with this software.
345+/* AUTHOR(S)
346+/* LaMont Jones
347+/* Hewlett-Packard Company
348+/* 3404 Harmony Road
349+/* Fort Collins, CO 80528, USA
350+/*
351+/* Wietse Venema
352+/* IBM T.J. Watson Research
353+/* P.O. Box 704
354+/* Yorktown Heights, NY 10598, USA
355+/*--*/
356+
357+/* System libraries. */
358+
359+#include "sys_defs.h"
360+#include <stdlib.h>
361+#include <stddef.h>
362+#include <string.h>
363+#if defined(HAS_DLOPEN)
364+#include <dlfcn.h>
365+#elif defined(HAS_SHL_LOAD)
366+#include <dl.h>
367+#endif
368+
369+/* Application-specific. */
370+
371+#include "msg.h"
372+#include "load_lib.h"
373+
374+extern int load_library_symbols(const char * libname, LIB_FN * libfuncs, LIB_FN * libdata)
375+{
376+ char *myname = "load_library_symbols";
377+ LIB_FN *fn;
378+
379+#if defined(HAS_DLOPEN)
380+ void *handle;
381+ char *emsg;
382+
383+ handle=dlopen(libname,RTLD_NOW);
384+ emsg=dlerror();
385+ if (emsg) {
386+ msg_fatal("%s: dlopen failure loading %s: %s", myname, libname, emsg);
387+ }
388+
389+ if (libfuncs) {
390+ for (fn=libfuncs; fn->name; fn++) {
391+ *(fn->ptr) = dlsym(handle,fn->name);
392+ emsg=dlerror();
393+ if (emsg) {
394+ msg_fatal("%s: dlsym failure looking up %s in %s: %s", myname,
395+ fn->name, libname, emsg);
396+ }
397+ if (msg_verbose>1) {
398+ msg_info("loaded %s = %lx",fn->name, *((long*)(fn->ptr)));
399+ }
400+ }
401+ }
402+
403+ if (libdata) {
404+ for (fn=libdata; fn->name; fn++) {
405+ *(fn->ptr) = dlsym(handle,fn->name);
406+ emsg=dlerror();
407+ if (emsg) {
408+ msg_fatal("%s: dlsym failure looking up %s in %s: %s", myname,
409+ fn->name, libname, emsg);
410+ }
411+ if (msg_verbose>1) {
412+ msg_info("loaded %s = %lx",fn->name, *((long*)(fn->ptr)));
413+ }
414+ }
415+ }
416+#elif defined(HAS_SHL_LOAD)
417+ shl_t handle;
418+
419+ handle = shl_load(libname,BIND_IMMEDIATE,0);
420+
421+ if (libfuncs) {
422+ for (fn=libfuncs; fn->name; fn++) {
423+ if (shl_findsym(&handle,fn->name,TYPE_PROCEDURE,fn->ptr) != 0) {
424+ msg_fatal("%s: shl_findsym failure looking up %s in %s: %m",
425+ myname, fn->name, libname);
426+ }
427+ if (msg_verbose>1) {
428+ msg_info("loaded %s = %x",fn->name, *((long*)(fn->ptr)));
429+ }
430+ }
431+ }
432+
433+ if (libdata) {
434+ for (fn=libdata; fn->name; fn++) {
435+ if (shl_findsym(&handle,fn->name,TYPE_DATA,fn->ptr) != 0) {
436+ msg_fatal("%s: shl_findsym failure looking up %s in %s: %m",
437+ myname, fn->name, libname);
438+ }
439+ if (msg_verbose>1) {
440+ msg_info("loaded %s = %x",fn->name, *((long*)(fn->ptr)));
441+ }
442+ }
443+ }
444+
445+#else
446+ msg_fatal("%s: need dlopen or shl_load support for dynamic libraries",
447+ myname);
448+#endif
449+ return 0;
450+}
451diff -durN postfix-2.1.3.orig/src/util/load_lib.h postfix-2.1.3/src/util/load_lib.h
452--- postfix-2.1.3.orig/src/util/load_lib.h 1970-01-01 01:00:00.000000000 +0100
453+++ postfix-2.1.3/src/util/load_lib.h 2004-06-22 15:39:24.257859501 +0200
454@@ -0,0 +1,41 @@
455+#ifndef _LOAD_LIB_H_INCLUDED_
456+#define _LOAD_LIB_H_INCLUDED_
457+
458+/*++
459+/* NAME
460+/* load_lib 3h
461+/* SUMMARY
462+/* library loading wrappers
463+/* SYNOPSIS
464+/* #include "load_lib.h"
465+/* DESCRIPTION
466+/* .nf
467+
468+ /*
469+ * External interface.
470+ */
471+/* NULL name terminates list */
472+typedef struct LIB_FN {
473+ const char *name;
474+ void **ptr;
475+} LIB_FN;
476+
477+extern int load_library_symbols(const char *, LIB_FN *, LIB_FN *);
478+
479+/* LICENSE
480+/* .ad
481+/* .fi
482+/* The Secure Mailer license must be distributed with this software.
483+/* AUTHOR(S)
484+/* LaMont Jones
485+/* Hewlett-Packard Company
486+/* 3404 Harmony Road
487+/* Fort Collins, CO 80528, USA
488+/*
489+/* Wietse Venema
490+/* IBM T.J. Watson Research
491+/* P.O. Box 704
492+/* Yorktown Heights, NY 10598, USA
493+/*--*/
494+
495+#endif
496diff -dur postfix-2.1.3.orig/src/global/mail_dict.c postfix-2.1.3/src/global/mail_dict.c
497--- postfix-2.1.3.orig/src/global/mail_dict.c 2004-01-04 19:53:27.000000000 +0100
498+++ postfix-2.1.3/src/global/mail_dict.c 2004-06-22 15:47:45.259202712 +0200
499@@ -45,15 +45,6 @@
500
501 static DICT_OPEN_INFO dict_open_info[] = {
502 DICT_TYPE_PROXY, dict_proxy_open,
503-#ifdef HAS_LDAP
504- DICT_TYPE_LDAP, dict_ldap_open,
505-#endif
506-#ifdef HAS_MYSQL
507- DICT_TYPE_MYSQL, dict_mysql_open,
508-#endif
509-#ifdef HAS_PGSQL
510- DICT_TYPE_PGSQL, dict_pgsql_open,
511-#endif
512 0,
513 };
514
515
516--- postfix-2.0.16.orig/conf/dynamicmaps.cf 1970-01-01 01:00:00.000000000 +0100
517+++ postfix-2.0.16/conf/dynamicmaps.cf 2003-11-08 19:52:14.000000000 +0100
518@@ -0,0 +1,9 @@
519+# Postfix dynamic maps configuration file.
520+#
521+# The first match found is the one that is used. The only wildcard
522+# allowed is '*', which matches everything. The first %s is expanded
523+# to the map type.
524+#
525+#type location of .so file name of open function
526+#==== ================================ =====================
527+* /usr/lib/postfix/dict_%s.so dict_%s_open
528--- postfix-2.3-RC9/src/global/mail_params.c.orig 2006-07-11 19:37:10.708815544 +0200
529+++ postfix-2.3-RC9/src/global/mail_params.c 2006-07-11 19:38:56.587719504 +0200
530@@ -148,6 +148,8 @@
531 #ifdef STRCASECMP_IN_STRINGS_H
532 #include <strings.h>
533 #endif
534+#include <safe_open.h>
535+#include <mymalloc.h>
536
537 /* Utility library. */
538
539@@ -248,6 +250,7 @@
540 char *var_debug_peer_list;
541 int var_debug_peer_level;
542 char *var_reject_reply_msg_access_denied;
543+int var_command_maxtime;
544 int var_fault_inj_code;
545 char *var_bounce_service;
546 char *var_cleanup_service;
547@@ -433,6 +436,38 @@
548 (long) var_sgid_gid);
549 }
550
551+static char *read_file(const char *name)
552+{
553+ char *ret;
554+ VSTRING *why=vstring_alloc(1);
555+ VSTRING *new_name=vstring_alloc(1);
556+ VSTREAM *vp=safe_open(name, O_RDONLY, 0, NULL, -1, -1, why);
557+
558+ /*
559+ * Ugly macros to make complex expressions less unreadable.
560+ */
561+#define SKIP(start, var, cond) \
562+ for (var = start; *var && (cond); var++);
563+
564+#define TRIM(s) { \
565+ char *p; \
566+ for (p = (s) + strlen(s); p > (s) && ISSPACE(p[-1]); p--); \
567+ *p = 0; \
568+ }
569+
570+ if (!vp) {
571+ msg_fatal("%s: unable to open: %s",name,vstring_str(why));
572+ }
573+ vstring_get_nonl(new_name,vp);
574+ vstream_fclose(vp);
575+ SKIP(vstring_str(new_name),ret,ISSPACE(*ret));
576+ ret=mystrdup(ret);
577+ TRIM(ret);
578+ vstring_free(why);
579+ vstring_free(new_name);
580+ return ret;
581+}
582+
583 /* mail_params_init - configure built-in parameters */
584
585 void mail_params_init()
586--- postfix-2.3.0/src/global/Makefile.in 2006-07-17 03:28:25.732653648 +0200
587+++ postfix-2.3.0/src/global/Makefile.in-new 2006-07-17 03:29:31.805609032 +0200
588@@ -32,7 +32,7 @@
589 canon_addr.o cfg_parser.o cleanup_strerror.o cleanup_strflags.o \
590 clnt_stream.o conv_time.o db_common.o debug_peer.o debug_process.o \
591 defer.o deliver_completed.o deliver_flock.o deliver_pass.o \
592- deliver_request.o dict_ldap.o dict_mysql.o dict_pgsql.o \
593+ deliver_request.o \
594 dict_proxy.o domain_list.o dot_lockfile.o dot_lockfile_as.o \
595 dsb_scan.o dsn.o dsn_buf.o dsn_mask.o dsn_print.o dsn_util.o \
596 ehlo_mask.o ext_prop.o file_id.o flush_clnt.o header_opts.o \
597--- postfix-2.6.1/src/util/Makefile.in.orig 2009-05-25 19:21:45.370180069 +0200
598+++ postfix-2.6.1/src/util/Makefile.in 2009-05-25 19:25:49.971166764 +0200
599@@ -30,7 +30,7 @@
600 username.c valid_hostname.c vbuf.c vbuf_print.c vstream.c \
601 vstream_popen.c vstring.c vstring_vstream.c watchdog.c writable.c \
602 write_buf.c write_wait.c sane_basename.c format_tv.c allspace.c \
603- allascii.c load_file.c killme_after.c vstream_tweak.c upass_connect.c \
604+ allascii.c load_file.c killme_after.c vstream_tweak.c upass_connect.c load_lib.c \
605 upass_listen.c upass_trigger.c edit_file.c inet_windowsize.c \
606 unix_pass_fd_fix.c dict_cache.c
607 OBJS = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
608@@ -38,7 +38,7 @@
609 chroot_uid.o cidr_match.o clean_env.o close_on_exec.o concatenate.o \
610 ctable.o dict.o dict_alloc.o dict_cdb.o dict_cidr.o dict_db.o \
611 dict_dbm.o dict_debug.o dict_env.o dict_ht.o dict_ni.o dict_nis.o \
612- dict_nisplus.o dict_open.o dict_pcre.o dict_regexp.o dict_sdbm.o \
613+ dict_nisplus.o dict_open.o dict_regexp.o dict_sdbm.o \
614 dict_static.o dict_tcp.o dict_unix.o dir_forest.o doze.o dummy_read.o \
615 dummy_write.o duplex_pipe.o environ.o events.o exec_command.o \
616 fifo_listen.o fifo_trigger.o file_limit.o find_inet.o fsspace.o \
617@@ -63,7 +63,7 @@
618 username.o valid_hostname.o vbuf.o vbuf_print.o vstream.o \
619 vstream_popen.o vstring.o vstring_vstream.o watchdog.o writable.o \
620 write_buf.o write_wait.o sane_basename.o format_tv.o allspace.o \
621- allascii.o load_file.o killme_after.o vstream_tweak.o upass_connect.o \
622+ allascii.o load_file.o killme_after.o vstream_tweak.o upass_connect.o load_lib.o \
623 upass_listen.o upass_trigger.o edit_file.o inet_windowsize.o \
624 unix_pass_fd_fix.o dict_cache.o
625 HDRS = argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.h \
626@@ -83,7 +83,7 @@
627 sigdelay.h sock_addr.h spawn_command.h split_at.h stat_as.h \
628 stringops.h sys_defs.h timed_connect.h timed_wait.h trigger.h \
629 username.h valid_hostname.h vbuf.h vbuf_print.h vstream.h vstring.h \
630- vstring_vstream.h watchdog.h format_tv.h load_file.h killme_after.h \
631+ vstring_vstream.h watchdog.h format_tv.h load_file.h killme_after.h load_lib.h \
632 edit_file.h dict_cache.h
633 TESTSRC = fifo_open.c fifo_rdwr_bug.c fifo_rdonly_bug.c select_bug.c \
634 stream_test.c dup2_pass_on_exec.c test_send_fd test_recv_fd
635@@ -91,6 +91,7 @@
636 CFLAGS = $(DEBUG) $(OPT) $(DEFS)
637 FILES = Makefile $(SRCS) $(HDRS)
638 INCL =
639+PCRESO = dict_pcre.so
640 LIB = libutil.a
641 TESTPROG= dict_open dup2_pass_on_exec events exec_command fifo_open \
642 fifo_rdonly_bug fifo_rdwr_bug fifo_trigger fsspace fullname \
643@@ -105,8 +106,9 @@
644
645 LIB_DIR = ../../lib
646 INC_DIR = ../../include
647+LIBS = $(LIB_DIR)/$(LIB) $(LIB_DIR)/$(PCRESO)
648
649-.c.o:; $(CC) $(CFLAGS) -c $*.c
650+.c.o:; $(CC) -fPIC $(CFLAGS) -c $*.c
651
652 all: $(LIB)
653
654@@ -117,15 +119,19 @@
655
656 test: $(TESTPROG)
657
658+$(PCRESO): dict_pcre.o
659+ gcc -shared -Wl,-soname,dict_pcre.so -o $@ $? -lpcre -L. -lutil
660+
661 $(LIB): $(OBJS)
662- $(AR) $(ARFL) $(LIB) $?
663- $(RANLIB) $(LIB)
664+ gcc -shared -Wl,-soname,libpostfix-util.so.1 -o $(LIB) $(OBJS) -ldl
665
666 $(LIB_DIR)/$(LIB): $(LIB)
667 cp $(LIB) $(LIB_DIR)
668- $(RANLIB) $(LIB_DIR)/$(LIB)
669
670-update: $(LIB_DIR)/$(LIB) $(HDRS)
671+$(LIB_DIR)/$(PCRESO): $(PCRESO)
672+ cp $(PCRESO) $(LIB_DIR)
673+
674+update: $(LIBS) $(HDRS)
675 -for i in $(HDRS); \
676 do \
677 cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
678@@ -147,7 +153,8 @@
679 lint $(SRCS)
680
681 clean:
682- rm -f *.o $(LIB) *core $(TESTPROG) junk $(MAKES) *.tmp
683+ rm -f *.o $(LIB) $(PCRESO) *core $(TESTPROG) \
684+ junk $(MAKES) *.tmp
685 rm -rf printfck
686
687 tidy: clean
688diff -durN postfix-2.1.3.orig/src/util/sys_defs.h postfix-2.1.3/src/util/sys_defs.h
689--- postfix-2.1.3.orig/src/util/sys_defs.h 2004-06-22 15:38:57.190461088 +0200
690+++ postfix-2.1.3/src/util/sys_defs.h 2004-06-22 15:39:24.255859620 +0200
691@@ -700,6 +700,7 @@
692 #define STATFS_IN_SYS_VFS_H
693 #define PREPEND_PLUS_TO_OPTSTRING
694 #define HAS_POSIX_REGEXP
695+#define HAS_DLOPEN
696 #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
697 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
698 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
699@@ -754,6 +755,7 @@
700 #define STATFS_IN_SYS_VFS_H
701 #define PREPEND_PLUS_TO_OPTSTRING
702 #define HAS_POSIX_REGEXP
703+#define HAS_DLOPEN
704 #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
705 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
706 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
707@@ -638,6 +640,7 @@
708 #define USE_STATFS
709 #define STATFS_IN_SYS_VFS_H
710 #define HAS_POSIX_REGEXP
711+#define HAS_SHL_LOAD
712 #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
713 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
714 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
715@@ -673,6 +676,7 @@
716 #define USE_STATFS
717 #define STATFS_IN_SYS_VFS_H
718 #define HAS_POSIX_REGEXP
719+#define HAS_SHL_LOAD
720 #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
721 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
722 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
This page took 1.28643 seconds and 4 git commands to generate.