diff options
author | martti <martti> | 2008-10-16 09:56:58 +0000 |
---|---|---|
committer | martti <martti> | 2008-10-16 09:56:58 +0000 |
commit | 84f3624ecdb642ab286b1c2005342a4ca65f9db7 (patch) | |
tree | 8679a4e6f490bdf0efc0268589341f904993d926 /mail/postfix-current | |
parent | 6d4583fc9723e70f62d83dedd09206ada0f41da7 (diff) | |
download | pkgsrc-84f3624ecdb642ab286b1c2005342a4ca65f9db7.tar.gz |
Use the correct patch set for postfix-2.6-xxxxxxxx.
Diffstat (limited to 'mail/postfix-current')
-rw-r--r-- | mail/postfix-current/distinfo | 8 | ||||
-rw-r--r-- | mail/postfix-current/patches/patch-as | 12 | ||||
-rw-r--r-- | mail/postfix-current/patches/patch-at | 62 | ||||
-rw-r--r-- | mail/postfix-current/patches/patch-av | 10 |
4 files changed, 58 insertions, 34 deletions
diff --git a/mail/postfix-current/distinfo b/mail/postfix-current/distinfo index 8f59b8c642a..bb1d90ab200 100644 --- a/mail/postfix-current/distinfo +++ b/mail/postfix-current/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.48 2008/10/16 09:45:12 martti Exp $ +$NetBSD: distinfo,v 1.49 2008/10/16 09:56:58 martti Exp $ SHA1 (postfix/postfix-2.6-20081012.tar.gz) = 7136abfd30557b3faf8bfa1ec754e304100fca91 RMD160 (postfix/postfix-2.6-20081012.tar.gz) = c7249bac4c21f29a11a7e9f46016e4ff7007f393 @@ -6,7 +6,7 @@ Size (postfix/postfix-2.6-20081012.tar.gz) = 3183572 bytes SHA1 (patch-aa) = 5b4923402c80957e47b8a4e16c897287b88544bb SHA1 (patch-ag) = b77081a61bc2b95a40963fb1d3ac5818d55a778b SHA1 (patch-ai) = aedee357d43321d2c3557679d796814455ae0ea6 -SHA1 (patch-as) = 531d372fd2e51781616202b9c704b621b96770c4 -SHA1 (patch-at) = b0abf2c49bfe94153f7a3845b5709ff8e0027a03 +SHA1 (patch-as) = b70ce22b253a011f4917ed170db29da2c92f675b +SHA1 (patch-at) = cb8a292f56c985a68e112e7fad8b05b482886251 SHA1 (patch-au) = 60396f5f182e0f247b06974dc5cf912dbcf84bbf -SHA1 (patch-av) = 98073186738e1a4fcd0f620096f4be83a9ff9e73 +SHA1 (patch-av) = b1569145f8ff0d81351ca6b94a1172260ba6b932 diff --git a/mail/postfix-current/patches/patch-as b/mail/postfix-current/patches/patch-as index 9d0251da49c..06b7ce9d100 100644 --- a/mail/postfix-current/patches/patch-as +++ b/mail/postfix-current/patches/patch-as @@ -1,10 +1,10 @@ -$NetBSD: patch-as,v 1.3 2008/10/16 09:45:12 martti Exp $ +$NetBSD: patch-as,v 1.4 2008/10/16 09:56:58 martti Exp $ Support for sqlite. --- src/global/Makefile.in.orig 2007-12-06 14:49:03.000000000 +0100 +++ src/global/Makefile.in -@@ -4,7 +4,7 @@ SRCS = abounce.c anvil_clnt.c been_here. +@@ -4,7 +4,7 @@ clnt_stream.c conv_time.c db_common.c debug_peer.c debug_process.c \ defer.c deliver_completed.c deliver_flock.c deliver_pass.c \ deliver_request.c dict_ldap.c dict_mysql.c dict_pgsql.c \ @@ -13,7 +13,7 @@ Support for sqlite. dsb_scan.c dsn.c dsn_buf.c dsn_mask.c dsn_print.c dsn_util.c \ ehlo_mask.c ext_prop.c file_id.c flush_clnt.c header_opts.c \ header_token.c input_transp.c int_filt.c is_header.c log_adhoc.c \ -@@ -34,7 +34,7 @@ OBJS = abounce.o anvil_clnt.o been_here. +@@ -34,7 +34,7 @@ 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 \ @@ -22,7 +22,7 @@ Support for sqlite. 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 \ header_token.o input_transp.o int_filt.o is_header.o log_adhoc.o \ -@@ -63,7 +63,7 @@ HDRS = abounce.h anvil_clnt.h been_here. +@@ -63,7 +63,7 @@ canon_addr.h cfg_parser.h cleanup_user.h clnt_stream.h config.h \ conv_time.h db_common.h debug_peer.h debug_process.h defer.h \ deliver_completed.h deliver_flock.h deliver_pass.h deliver_request.h \ @@ -31,7 +31,7 @@ Support for sqlite. dot_lockfile.h dot_lockfile_as.h dsb_scan.h dsn.h dsn_buf.h \ dsn_mask.h dsn_print.h dsn_util.h ehlo_mask.h ext_prop.h \ file_id.h flush_clnt.h header_opts.h header_token.h input_transp.h \ -@@ -860,6 +860,13 @@ dict_proxy.o: dict_proxy.c +@@ -860,6 +860,13 @@ dict_proxy.o: dict_proxy.h dict_proxy.o: mail_params.h dict_proxy.o: mail_proto.h @@ -45,7 +45,7 @@ Support for sqlite. domain_list.o: ../../include/match_list.h domain_list.o: ../../include/match_ops.h domain_list.o: ../../include/sys_defs.h -@@ -1219,6 +1226,7 @@ mail_dict.o: dict_ldap.h +@@ -1219,6 +1226,7 @@ mail_dict.o: dict_mysql.h mail_dict.o: dict_pgsql.h mail_dict.o: dict_proxy.h diff --git a/mail/postfix-current/patches/patch-at b/mail/postfix-current/patches/patch-at index 5aa3645ae3c..16d93b25087 100644 --- a/mail/postfix-current/patches/patch-at +++ b/mail/postfix-current/patches/patch-at @@ -1,10 +1,10 @@ -$NetBSD: patch-at,v 1.3 2008/10/16 09:45:12 martti Exp $ +$NetBSD: patch-at,v 1.4 2008/10/16 09:56:58 martti Exp $ Support for sqlite. --- src/global/dict_sqlite.c.orig 2008-10-17 00:40:21.000000000 +0200 +++ src/global/dict_sqlite.c -@@ -0,0 +1,254 @@ +@@ -0,0 +1,278 @@ +/*++ +/* NAME +/* dict_sqlite 3 @@ -46,18 +46,15 @@ Support for sqlite. +/* Configuration parameters: +/* +/* The parameters encodes a number of pieces of information: -+/* dbpath, query, table, select_field and where_field: ++/* dbpath, query, result_format and expansion_limit: +/* .IP \fIdbpath\fR +/* Path to SQLite database +/* .IP \fIquery\fR -+/* Query template, before the query is actually issued, variable -+/* substitutions are performed. See sqlite_table(5) for details. If -+/* No query is specified, the legacy variables \fItable\fR, -+/* \fIselect_field\fR, \fIwhere_field\fR and \fIadditional_conditions\fR -+/* are used to construct the query template. ++/* Query template, before the query is actually issued, variable ++/* substitutions are performed. See sqlite_table(5) for details. +/* .IP \fIresult_format\fR -+/* The format used to expand results from queries. Substitutions -+/* are performed as described in sqlite_table(5). Defaults to returning ++/* The format used to expand results from queries. Substitutions ++/* are performed as described in sqlite_table(5). Defaults to returning +/* the lookup result unchanged. +/* .IP expansion_limit +/* Limit (if any) on the total number of lookup result values. Lookups which @@ -78,12 +75,17 @@ Support for sqlite. +#ifdef HAS_SQLITE +#include <sqlite3.h> + ++#if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER < 3005004) ++#error "Your SQLite version is too old" ++#endif ++ +/* Utility library. */ + +#include "msg.h" +#include "dict.h" +#include "vstring.h" +#include "stringops.h" ++#include "mymalloc.h" + +/* Global library. */ + @@ -114,6 +116,24 @@ Support for sqlite. +static void dict_sqlite_close(DICT *); +static void sqlite_parse_config(DICT_SQLITE *, const char *); + ++/* dict_sqlite_quote - escape SQL metacharacters in input string */ ++ ++static void dict_sqlite_quote(DICT *dict, const char *name, VSTRING *result) { ++ DICT_SQLITE *dict_sqlite = (DICT_SQLITE *) dict; ++ int len = strlen(name); ++ int buflen = 2*len + 1; ++ char *q; ++ ++ if (buflen < len) ++ msg_panic("dict_sqlite_quote: integer overflow in 2*%d+1", len); ++ ++ VSTRING_SPACE(result, buflen); ++ q = sqlite3_mprintf("%q",name); ++ vstring_strncat(result,q, strlen(q)); ++ sqlite3_free(q); ++ VSTRING_SKIP(result); ++} ++ + +/* dict_sqlite_close - close the database */ + @@ -126,6 +146,11 @@ Support for sqlite. + if (sqlite3_close(dict_sqlite->db) != SQLITE_OK) + msg_fatal("%s: DB close failed", myname); + cfg_parser_free(dict_sqlite->parser); ++ myfree(dict_sqlite->dbpath); ++ myfree(dict_sqlite->query); ++ myfree(dict_sqlite->result_format); ++ if (dict_sqlite->ctx) ++ db_common_free_ctx(dict_sqlite->ctx); + if (dict->fold_buf) + vstring_free(dict->fold_buf); + dict_free(dict); @@ -147,7 +172,9 @@ Support for sqlite. + /* + * Optionally fold the key. + */ -+ if (dict->fold_buf) { ++ if (dict->flags & DICT_FLAG_FOLD_FIX) { ++ if (dict->fold_buf == 0) ++ dict->fold_buf = vstring_alloc(10); + vstring_strcpy(dict->fold_buf, name); + name = lowercase(vstring_str(dict->fold_buf)); + } @@ -168,7 +195,7 @@ Support for sqlite. + INIT_VSTR(query, 10); + + if (!db_common_expand(dict_sqlite->ctx, dict_sqlite->query, -+ name, 0, query, NULL)) ++ name, 0, query, dict_sqlite_quote)) + return (0); + + if (msg_verbose) @@ -224,14 +251,10 @@ Support for sqlite. + (void) db_common_parse(0, &dict_sqlite->ctx, dict_sqlite->result_format, 0); + + db_common_parse_domain(p, dict_sqlite->ctx); -+ -+ if (db_common_dict_partial(dict_sqlite->ctx)) -+ dict_sqlite->dict.flags |= DICT_FLAG_PATTERN; -+ else -+ dict_sqlite->dict.flags |= DICT_FLAG_FIXED; -+ ++ + if (dict_sqlite->dict.flags & DICT_FLAG_FOLD_FIX) -+ dict_sqlite->dict.fold_buf = vstring_alloc(10); ++ dict_sqlite->dict.fold_buf = vstring_alloc(10); ++ +} + +/* dict_sqlite_open - open sqlite database */ @@ -249,6 +272,7 @@ Support for sqlite. + dict_sqlite->dict.lookup = dict_sqlite_lookup; + dict_sqlite->dict.close = dict_sqlite_close; + dict_sqlite->dict.flags = dict_flags; ++ dict_sqlite->dict.flags |= DICT_FLAG_FIXED; + sqlite_parse_config(dict_sqlite, name); + + if (sqlite3_open(dict_sqlite->dbpath, &dict_sqlite->db)) { diff --git a/mail/postfix-current/patches/patch-av b/mail/postfix-current/patches/patch-av index 59cf0c054e0..7bcd7b3d036 100644 --- a/mail/postfix-current/patches/patch-av +++ b/mail/postfix-current/patches/patch-av @@ -1,4 +1,4 @@ -$NetBSD: patch-av,v 1.3 2008/10/16 09:45:12 martti Exp $ +$NetBSD: patch-av,v 1.4 2008/10/16 09:56:58 martti Exp $ Support for sqlite. @@ -12,13 +12,13 @@ Support for sqlite. #include <mail_dict.h> typedef struct { -@@ -54,6 +55,9 @@ static const DICT_OPEN_INFO dict_open_in +@@ -53,6 +54,9 @@ + #endif #ifdef HAS_PGSQL DICT_TYPE_PGSQL, dict_pgsql_open, - #endif ++#endif +#ifdef HAS_SQLITE + DICT_TYPE_SQLITE, dict_sqlite_open, -+#endif + #endif 0, }; - |