SHA256
1
0
forked from pool/postfix

Accepting request 70254 from server:mail

- remove document paths from postfix-files to avoid error messages
  when postfix-doc is not installed

- update to 2.8.3 - VUL-0: postfix memory corruption

OBS-URL: https://build.opensuse.org/request/show/70254
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postfix?expand=0&rev=66
This commit is contained in:
Sascha Peilicke 2011-05-16 07:22:21 +00:00 committed by Git OBS Bridge
commit cd17cfb2a7
8 changed files with 137 additions and 239 deletions

View File

@ -1,6 +1,6 @@
diff -ruN postfix-2.8.2/conf/dynamicmaps.cf postfix-2.8.2-dynamic_maps//conf/dynamicmaps.cf diff -ruN postfix-2.8.3//conf/dynamicmaps.cf postfix-2.8.3-dynamic_maps.patch//conf/dynamicmaps.cf
--- postfix-2.8.2/conf/dynamicmaps.cf 1970-01-01 01:00:00.000000000 +0100 --- postfix-2.8.3//conf/dynamicmaps.cf 1970-01-01 01:00:00.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//conf/dynamicmaps.cf 2011-03-30 16:02:04.352769373 +0200 +++ postfix-2.8.3-dynamic_maps.patch//conf/dynamicmaps.cf 2011-05-10 12:42:04.612116003 +0200
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
+# Postfix dynamic maps configuration file. +# Postfix dynamic maps configuration file.
+# +#
@ -9,9 +9,9 @@ diff -ruN postfix-2.8.2/conf/dynamicmaps.cf postfix-2.8.2-dynamic_maps//conf/dyn
+# +#
+#type location of .so file open function (mkmap func) +#type location of .so file open function (mkmap func)
+#==== ================================ ============= ============ +#==== ================================ ============= ============
diff -ruN postfix-2.8.2/conf/postfix-files postfix-2.8.2-dynamic_maps//conf/postfix-files diff -ruN postfix-2.8.3//conf/postfix-files postfix-2.8.3-dynamic_maps.patch//conf/postfix-files
--- postfix-2.8.2/conf/postfix-files 2010-12-29 22:40:32.000000000 +0100 --- postfix-2.8.3//conf/postfix-files 2010-12-29 22:40:32.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//conf/postfix-files 2011-03-30 16:02:04.353769376 +0200 +++ postfix-2.8.3-dynamic_maps.patch//conf/postfix-files 2011-05-10 12:42:04.613116003 +0200
@@ -65,6 +65,11 @@ @@ -65,6 +65,11 @@
$queue_directory/trace:d:$mail_owner:-:700:ucr $queue_directory/trace:d:$mail_owner:-:700:ucr
$daemon_directory/anvil:f:root:-:755 $daemon_directory/anvil:f:root:-:755
@ -44,9 +44,9 @@ diff -ruN postfix-2.8.2/conf/postfix-files postfix-2.8.2-dynamic_maps//conf/post
$config_directory/cidr_table:f:root:-:644:o $config_directory/cidr_table:f:root:-:644:o
$config_directory/generic:f:root:-:644:p1 $config_directory/generic:f:root:-:644:p1
$config_directory/generics:f:root:-:644:o $config_directory/generics:f:root:-:644:o
diff -ruN postfix-2.8.2/src/dns/Makefile.in postfix-2.8.2-dynamic_maps//src/dns/Makefile.in diff -ruN postfix-2.8.3//src/dns/Makefile.in postfix-2.8.3-dynamic_maps.patch//src/dns/Makefile.in
--- postfix-2.8.2/src/dns/Makefile.in 2011-01-09 23:12:00.000000000 +0100 --- postfix-2.8.3//src/dns/Makefile.in 2011-01-09 23:12:00.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/dns/Makefile.in 2011-03-30 16:02:04.360769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/dns/Makefile.in 2011-05-10 12:42:04.620116003 +0200
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
LIB_DIR = ../../lib LIB_DIR = ../../lib
INC_DIR = ../../include INC_DIR = ../../include
@ -70,9 +70,9 @@ diff -ruN postfix-2.8.2/src/dns/Makefile.in postfix-2.8.2-dynamic_maps//src/dns/
update: $(LIB_DIR)/$(LIB) $(HDRS) update: $(LIB_DIR)/$(LIB) $(HDRS)
-for i in $(HDRS); \ -for i in $(HDRS); \
diff -ruN postfix-2.8.2/src/global/mail_conf.c postfix-2.8.2-dynamic_maps//src/global/mail_conf.c diff -ruN postfix-2.8.3//src/global/mail_conf.c postfix-2.8.3-dynamic_maps.patch//src/global/mail_conf.c
--- postfix-2.8.2/src/global/mail_conf.c 2011-01-08 02:49:33.000000000 +0100 --- postfix-2.8.3//src/global/mail_conf.c 2011-01-08 02:49:33.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/global/mail_conf.c 2011-03-30 16:02:04.361769374 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/global/mail_conf.c 2011-05-10 12:42:04.621116003 +0200
@@ -190,6 +190,13 @@ @@ -190,6 +190,13 @@
path = concatenate(var_config_dir, "/", "main.cf", (char *) 0); path = concatenate(var_config_dir, "/", "main.cf", (char *) 0);
dict_load_file(CONFIG_DICT, path); dict_load_file(CONFIG_DICT, path);
@ -87,9 +87,9 @@ diff -ruN postfix-2.8.2/src/global/mail_conf.c postfix-2.8.2-dynamic_maps//src/g
} }
/* mail_conf_flush - discard configuration dictionary */ /* mail_conf_flush - discard configuration dictionary */
diff -ruN postfix-2.8.2/src/global/mail_dict.c postfix-2.8.2-dynamic_maps//src/global/mail_dict.c diff -ruN postfix-2.8.3//src/global/mail_dict.c postfix-2.8.3-dynamic_maps.patch//src/global/mail_dict.c
--- postfix-2.8.2/src/global/mail_dict.c 2010-06-17 22:48:34.000000000 +0200 --- postfix-2.8.3//src/global/mail_dict.c 2010-06-17 22:48:34.000000000 +0200
+++ postfix-2.8.2-dynamic_maps//src/global/mail_dict.c 2011-03-30 16:02:04.361769374 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/global/mail_dict.c 2011-05-10 12:42:04.622116003 +0200
@@ -46,6 +46,7 @@ @@ -46,6 +46,7 @@
static const DICT_OPEN_INFO dict_open_info[] = { static const DICT_OPEN_INFO dict_open_info[] = {
@ -106,9 +106,9 @@ diff -ruN postfix-2.8.2/src/global/mail_dict.c postfix-2.8.2-dynamic_maps//src/g
0, 0,
}; };
diff -ruN postfix-2.8.2/src/global/mail_params.c postfix-2.8.2-dynamic_maps//src/global/mail_params.c diff -ruN postfix-2.8.3//src/global/mail_params.c postfix-2.8.3-dynamic_maps.patch//src/global/mail_params.c
--- postfix-2.8.2/src/global/mail_params.c 2010-12-06 00:02:15.000000000 +0100 --- postfix-2.8.3//src/global/mail_params.c 2010-12-06 00:02:15.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/global/mail_params.c 2011-03-30 16:02:04.362769375 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/global/mail_params.c 2011-05-10 12:42:04.623116003 +0200
@@ -79,6 +79,7 @@ @@ -79,6 +79,7 @@
/* char *var_export_environ; /* char *var_export_environ;
/* char *var_debug_peer_list; /* char *var_debug_peer_list;
@ -133,9 +133,9 @@ diff -ruN postfix-2.8.2/src/global/mail_params.c postfix-2.8.2-dynamic_maps//src
char *var_trace_service; char *var_trace_service;
char *var_proxymap_service; char *var_proxymap_service;
char *var_proxywrite_service; char *var_proxywrite_service;
diff -ruN postfix-2.8.2/src/global/Makefile.in postfix-2.8.2-dynamic_maps//src/global/Makefile.in diff -ruN postfix-2.8.3//src/global/Makefile.in postfix-2.8.3-dynamic_maps.patch//src/global/Makefile.in
--- postfix-2.8.2/src/global/Makefile.in 2011-01-10 21:28:32.000000000 +0100 --- postfix-2.8.3//src/global/Makefile.in 2011-01-10 21:28:32.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/global/Makefile.in 2011-03-30 16:29:42.254738307 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/global/Makefile.in 2011-05-10 12:42:04.624116003 +0200
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
canon_addr.c cfg_parser.c cleanup_strerror.c cleanup_strflags.c \ canon_addr.c cfg_parser.c cleanup_strerror.c cleanup_strflags.c \
clnt_stream.c conv_time.c db_common.c debug_peer.c debug_process.c \ clnt_stream.c conv_time.c db_common.c debug_peer.c debug_process.c \
@ -214,9 +214,9 @@ diff -ruN postfix-2.8.2/src/global/Makefile.in postfix-2.8.2-dynamic_maps//src/g
rm -rf printfck rm -rf printfck
tidy: clean tidy: clean
diff -ruN postfix-2.8.2/src/global/mkmap_open.c postfix-2.8.2-dynamic_maps//src/global/mkmap_open.c diff -ruN postfix-2.8.3//src/global/mkmap_open.c postfix-2.8.3-dynamic_maps.patch//src/global/mkmap_open.c
--- postfix-2.8.2/src/global/mkmap_open.c 2008-01-08 23:08:45.000000000 +0100 --- postfix-2.8.3//src/global/mkmap_open.c 2008-01-08 23:08:45.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/global/mkmap_open.c 2011-03-30 16:02:04.365769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/global/mkmap_open.c 2011-05-10 12:42:04.625116003 +0200
@@ -81,7 +81,7 @@ @@ -81,7 +81,7 @@
* We use a different table (in dict_open.c) when querying maps. * We use a different table (in dict_open.c) when querying maps.
*/ */
@ -243,9 +243,9 @@ diff -ruN postfix-2.8.2/src/global/mkmap_open.c postfix-2.8.2-dynamic_maps//src/
if (strcmp(type, mp->type) == 0) if (strcmp(type, mp->type) == 0)
break; break;
} }
diff -ruN postfix-2.8.2/src/master/Makefile.in postfix-2.8.2-dynamic_maps//src/master/Makefile.in diff -ruN postfix-2.8.3//src/master/Makefile.in postfix-2.8.3-dynamic_maps.patch//src/master/Makefile.in
--- postfix-2.8.2/src/master/Makefile.in 2011-01-09 23:12:02.000000000 +0100 --- postfix-2.8.3//src/master/Makefile.in 2011-01-09 23:12:02.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/master/Makefile.in 2011-03-30 16:02:04.365769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/master/Makefile.in 2011-05-10 12:42:04.626116003 +0200
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
INC_DIR = ../../include INC_DIR = ../../include
BIN_DIR = ../../libexec BIN_DIR = ../../libexec
@ -269,9 +269,9 @@ diff -ruN postfix-2.8.2/src/master/Makefile.in postfix-2.8.2-dynamic_maps//src/m
$(BIN_DIR)/$(PROG): $(PROG) $(BIN_DIR)/$(PROG): $(PROG)
cp $(PROG) $(BIN_DIR) cp $(PROG) $(BIN_DIR)
diff -ruN postfix-2.8.2/src/milter/Makefile.in postfix-2.8.2-dynamic_maps//src/milter/Makefile.in diff -ruN postfix-2.8.3//src/milter/Makefile.in postfix-2.8.3-dynamic_maps.patch//src/milter/Makefile.in
--- postfix-2.8.2/src/milter/Makefile.in 2011-01-09 23:12:02.000000000 +0100 --- postfix-2.8.3//src/milter/Makefile.in 2011-01-09 23:12:02.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/milter/Makefile.in 2011-03-30 16:02:04.366769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/milter/Makefile.in 2011-05-10 12:42:04.626116003 +0200
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
INC_DIR = ../../include INC_DIR = ../../include
MAKES = MAKES =
@ -295,9 +295,9 @@ diff -ruN postfix-2.8.2/src/milter/Makefile.in postfix-2.8.2-dynamic_maps//src/m
update: $(LIB_DIR)/$(LIB) $(HDRS) update: $(LIB_DIR)/$(LIB) $(HDRS)
-for i in $(HDRS); \ -for i in $(HDRS); \
diff -ruN postfix-2.8.2/src/postconf/postconf.c postfix-2.8.2-dynamic_maps//src/postconf/postconf.c diff -ruN postfix-2.8.3//src/postconf/postconf.c postfix-2.8.3-dynamic_maps.patch//src/postconf/postconf.c
--- postfix-2.8.2/src/postconf/postconf.c 2010-09-12 01:05:00.000000000 +0200 --- postfix-2.8.3//src/postconf/postconf.c 2011-03-29 01:00:58.000000000 +0200
+++ postfix-2.8.2-dynamic_maps//src/postconf/postconf.c 2011-03-30 16:02:04.366769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/postconf/postconf.c 2011-05-10 12:42:04.627116003 +0200
@@ -1013,6 +1013,16 @@ @@ -1013,6 +1013,16 @@
{ {
ARGV *maps_argv; ARGV *maps_argv;
@ -315,9 +315,9 @@ diff -ruN postfix-2.8.2/src/postconf/postconf.c postfix-2.8.2-dynamic_maps//src/
maps_argv = dict_mapnames(); maps_argv = dict_mapnames();
for (i = 0; i < maps_argv->argc; i++) for (i = 0; i < maps_argv->argc; i++)
diff -ruN postfix-2.8.2/src/postmap/postmap.c postfix-2.8.2-dynamic_maps//src/postmap/postmap.c diff -ruN postfix-2.8.3//src/postmap/postmap.c postfix-2.8.3-dynamic_maps.patch//src/postmap/postmap.c
--- postfix-2.8.2/src/postmap/postmap.c 2009-04-17 22:04:00.000000000 +0200 --- postfix-2.8.3//src/postmap/postmap.c 2009-04-17 22:04:00.000000000 +0200
+++ postfix-2.8.2-dynamic_maps//src/postmap/postmap.c 2011-03-30 16:02:04.367769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/postmap/postmap.c 2011-05-10 12:42:04.629116003 +0200
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
/* Postfix lookup table management /* Postfix lookup table management
/* SYNOPSIS /* SYNOPSIS
@ -434,9 +434,9 @@ diff -ruN postfix-2.8.2/src/postmap/postmap.c postfix-2.8.2-dynamic_maps//src/po
} else { /* create/update map(s) */ } else { /* create/update map(s) */
if (optind + 1 > argc) if (optind + 1 > argc)
usage(argv[0]); usage(argv[0]);
diff -ruN postfix-2.8.2/src/tls/Makefile.in postfix-2.8.2-dynamic_maps//src/tls/Makefile.in diff -ruN postfix-2.8.3//src/tls/Makefile.in postfix-2.8.3-dynamic_maps.patch//src/tls/Makefile.in
--- postfix-2.8.2/src/tls/Makefile.in 2011-01-16 00:09:55.000000000 +0100 --- postfix-2.8.3//src/tls/Makefile.in 2011-01-16 00:09:55.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/tls/Makefile.in 2011-03-30 16:02:04.368769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/tls/Makefile.in 2011-05-10 12:42:04.630116003 +0200
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
INC_DIR = ../../include INC_DIR = ../../include
MAKES = MAKES =
@ -460,9 +460,9 @@ diff -ruN postfix-2.8.2/src/tls/Makefile.in postfix-2.8.2-dynamic_maps//src/tls/
update: $(LIB_DIR)/$(LIB) $(HDRS) update: $(LIB_DIR)/$(LIB) $(HDRS)
-for i in $(HDRS); \ -for i in $(HDRS); \
diff -ruN postfix-2.8.2/src/tls/tls_client.c postfix-2.8.2-dynamic_maps//src/tls/tls_client.c diff -ruN postfix-2.8.3//src/tls/tls_client.c postfix-2.8.3-dynamic_maps.patch//src/tls/tls_client.c
--- postfix-2.8.2/src/tls/tls_client.c 2010-12-31 00:02:03.000000000 +0100 --- postfix-2.8.3//src/tls/tls_client.c 2010-12-31 00:02:03.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/tls/tls_client.c 2011-03-30 16:02:04.369769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/tls/tls_client.c 2011-05-10 12:42:04.630116003 +0200
@@ -156,6 +156,8 @@ @@ -156,6 +156,8 @@
#define STR vstring_str #define STR vstring_str
#define LEN VSTRING_LEN #define LEN VSTRING_LEN
@ -472,9 +472,9 @@ diff -ruN postfix-2.8.2/src/tls/tls_client.c postfix-2.8.2-dynamic_maps//src/tls
/* load_clnt_session - load session from client cache (non-callback) */ /* load_clnt_session - load session from client cache (non-callback) */
static SSL_SESSION *load_clnt_session(TLS_SESS_STATE *TLScontext) static SSL_SESSION *load_clnt_session(TLS_SESS_STATE *TLScontext)
diff -ruN postfix-2.8.2/src/tls/tls_server.c postfix-2.8.2-dynamic_maps//src/tls/tls_server.c diff -ruN postfix-2.8.3//src/tls/tls_server.c postfix-2.8.3-dynamic_maps.patch//src/tls/tls_server.c
--- postfix-2.8.2/src/tls/tls_server.c 2011-02-07 16:38:33.000000000 +0100 --- postfix-2.8.3//src/tls/tls_server.c 2011-02-07 16:38:33.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/tls/tls_server.c 2011-03-30 16:02:04.370769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/tls/tls_server.c 2011-05-10 12:42:04.631116003 +0200
@@ -155,6 +155,8 @@ @@ -155,6 +155,8 @@
#define STR(x) vstring_str(x) #define STR(x) vstring_str(x)
#define LEN(x) VSTRING_LEN(x) #define LEN(x) VSTRING_LEN(x)
@ -484,9 +484,9 @@ diff -ruN postfix-2.8.2/src/tls/tls_server.c postfix-2.8.2-dynamic_maps//src/tls
/* Application-specific. */ /* Application-specific. */
/* /*
diff -ruN postfix-2.8.2/src/util/dict_db.c postfix-2.8.2-dynamic_maps//src/util/dict_db.c diff -ruN postfix-2.8.3//src/util/dict_db.c postfix-2.8.3-dynamic_maps.patch//src/util/dict_db.c
--- postfix-2.8.2/src/util/dict_db.c 2010-09-04 20:48:52.000000000 +0200 --- postfix-2.8.3//src/util/dict_db.c 2010-09-04 20:48:52.000000000 +0200
+++ postfix-2.8.2-dynamic_maps//src/util/dict_db.c 2011-03-30 16:02:04.371769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/util/dict_db.c 2011-05-10 12:42:04.632116003 +0200
@@ -676,6 +676,12 @@ @@ -676,6 +676,12 @@
msg_fatal("set DB cache size %d: %m", dict_db_cache_size); msg_fatal("set DB cache size %d: %m", dict_db_cache_size);
if (type == DB_HASH && db->set_h_nelem(db, DICT_DB_NELM) != 0) if (type == DB_HASH && db->set_h_nelem(db, DICT_DB_NELM) != 0)
@ -500,9 +500,9 @@ diff -ruN postfix-2.8.2/src/util/dict_db.c postfix-2.8.2-dynamic_maps//src/util/
#if DB_VERSION_MAJOR == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0) #if DB_VERSION_MAJOR == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0)
if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0) if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0)
msg_fatal("open database %s: %m", db_path); msg_fatal("open database %s: %m", db_path);
diff -ruN postfix-2.8.2/src/util/dict_dbm.c postfix-2.8.2-dynamic_maps//src/util/dict_dbm.c diff -ruN postfix-2.8.3//src/util/dict_dbm.c postfix-2.8.3-dynamic_maps.patch//src/util/dict_dbm.c
--- postfix-2.8.2/src/util/dict_dbm.c 2009-12-24 23:53:04.000000000 +0100 --- postfix-2.8.3//src/util/dict_dbm.c 2009-12-24 23:53:04.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/util/dict_dbm.c 2011-03-30 16:02:04.371769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/util/dict_dbm.c 2011-05-10 12:42:04.633116003 +0200
@@ -409,6 +409,10 @@ @@ -409,6 +409,10 @@
char *dbm_path; char *dbm_path;
int lock_fd; int lock_fd;
@ -514,18 +514,18 @@ diff -ruN postfix-2.8.2/src/util/dict_dbm.c postfix-2.8.2-dynamic_maps//src/util
/* /*
* Note: DICT_FLAG_LOCK is used only by programs that do fine-grained (in * Note: DICT_FLAG_LOCK is used only by programs that do fine-grained (in
* the time domain) locking while accessing individual database records. * the time domain) locking while accessing individual database records.
diff -ruN postfix-2.8.2/src/util/dict.h postfix-2.8.2-dynamic_maps//src/util/dict.h diff -ruN postfix-2.8.3//src/util/dict.h postfix-2.8.3-dynamic_maps.patch//src/util/dict.h
--- postfix-2.8.2/src/util/dict.h 2007-12-03 20:42:26.000000000 +0100 --- postfix-2.8.3//src/util/dict.h 2011-04-15 18:47:44.000000000 +0200
+++ postfix-2.8.2-dynamic_maps//src/util/dict.h 2011-03-30 16:02:04.372769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/util/dict.h 2011-05-10 12:42:04.634116003 +0200
@@ -66,6 +66,7 @@ @@ -66,6 +66,7 @@
#define DICT_FLAG_NO_UNAUTH (1<<13) /* disallow unauthenticated data */ #define DICT_FLAG_NO_UNAUTH (1<<13) /* disallow unauthenticated data */
#define DICT_FLAG_FOLD_FIX (1<<14) /* case-fold key with fixed-case map */ #define DICT_FLAG_FOLD_FIX (1<<14) /* case-fold key with fixed-case map */
#define DICT_FLAG_FOLD_MUL (1<<15) /* case-fold key with multi-case map */ #define DICT_FLAG_FOLD_MUL (1<<15) /* case-fold key with multi-case map */
+#define DICT_FLAG_UPGRADE (1<<30) /* Upgrade the db */ +#define DICT_FLAG_UPGRADE (1<<30) /* Upgrade the db */
#define DICT_FLAG_FOLD_ANY (DICT_FLAG_FOLD_FIX | DICT_FLAG_FOLD_MUL) #define DICT_FLAG_FOLD_ANY (DICT_FLAG_FOLD_FIX | DICT_FLAG_FOLD_MUL)
#define DICT_FLAG_OPEN_LOCK (1<<16) /* open file with exclusive lock */
/* IMPORTANT: Update the dict_mask[] table when the above changes */ @@ -139,6 +140,11 @@
@@ -138,6 +139,11 @@
extern DICT *dict_open(const char *, int, int); extern DICT *dict_open(const char *, int, int);
extern DICT *dict_open3(const char *, const char *, int, int); extern DICT *dict_open3(const char *, const char *, int, int);
extern void dict_open_register(const char *, DICT *(*) (const char *, int, int)); extern void dict_open_register(const char *, DICT *(*) (const char *, int, int));
@ -537,9 +537,9 @@ diff -ruN postfix-2.8.2/src/util/dict.h postfix-2.8.2-dynamic_maps//src/util/dic
#define dict_get(dp, key) ((const char *) (dp)->lookup((dp), (key))) #define dict_get(dp, key) ((const char *) (dp)->lookup((dp), (key)))
#define dict_put(dp, key, val) (dp)->update((dp), (key), (val)) #define dict_put(dp, key, val) (dp)->update((dp), (key), (val))
diff -ruN postfix-2.8.2/src/util/dict_open.c postfix-2.8.2-dynamic_maps//src/util/dict_open.c diff -ruN postfix-2.8.3//src/util/dict_open.c postfix-2.8.3-dynamic_maps.patch//src/util/dict_open.c
--- postfix-2.8.2/src/util/dict_open.c 2010-09-11 23:49:58.000000000 +0200 --- postfix-2.8.3//src/util/dict_open.c 2011-04-11 19:37:49.000000000 +0200
+++ postfix-2.8.2-dynamic_maps//src/util/dict_open.c 2011-03-30 16:02:04.373769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/util/dict_open.c 2011-05-10 12:42:04.635116003 +0200
@@ -44,6 +44,8 @@ @@ -44,6 +44,8 @@
/* DICT *(*open) (const char *, int, int); /* DICT *(*open) (const char *, int, int);
/* /*
@ -549,7 +549,7 @@ diff -ruN postfix-2.8.2/src/util/dict_open.c postfix-2.8.2-dynamic_maps//src/uti
/* DESCRIPTION /* DESCRIPTION
/* This module implements a low-level interface to multiple /* This module implements a low-level interface to multiple
/* physical dictionary types. /* physical dictionary types.
@@ -161,6 +163,9 @@ @@ -165,6 +167,9 @@
/* /*
/* dict_mapnames() returns a sorted list with the names of all available /* dict_mapnames() returns a sorted list with the names of all available
/* dictionary types. /* dictionary types.
@ -559,7 +559,7 @@ diff -ruN postfix-2.8.2/src/util/dict_open.c postfix-2.8.2-dynamic_maps//src/uti
/* DIAGNOSTICS /* DIAGNOSTICS
/* Fatal error: open error, unsupported dictionary type, attempt to /* Fatal error: open error, unsupported dictionary type, attempt to
/* update non-writable dictionary. /* update non-writable dictionary.
@@ -185,6 +190,9 @@ @@ -189,6 +194,9 @@
#include <strings.h> #include <strings.h>
#endif #endif
@ -569,9 +569,9 @@ diff -ruN postfix-2.8.2/src/util/dict_open.c postfix-2.8.2-dynamic_maps//src/uti
/* Utility library. */ /* Utility library. */
#include <argv.h> #include <argv.h>
@@ -211,6 +219,27 @@ @@ -216,6 +224,27 @@
#include <split_at.h>
#include <htable.h> #include <htable.h>
#include <myflock.h>
+#ifndef NO_DYNAMIC_MAPS +#ifndef NO_DYNAMIC_MAPS
+#include <load_lib.h> +#include <load_lib.h>
@ -597,7 +597,7 @@ diff -ruN postfix-2.8.2/src/util/dict_open.c postfix-2.8.2-dynamic_maps//src/uti
/* /*
* lookup table for available map types. * lookup table for available map types.
*/ */
@@ -226,7 +255,9 @@ @@ -231,7 +260,9 @@
DICT_TYPE_ENVIRON, dict_env_open, DICT_TYPE_ENVIRON, dict_env_open,
DICT_TYPE_HT, dict_ht_open, DICT_TYPE_HT, dict_ht_open,
DICT_TYPE_UNIX, dict_unix_open, DICT_TYPE_UNIX, dict_unix_open,
@ -607,7 +607,7 @@ diff -ruN postfix-2.8.2/src/util/dict_open.c postfix-2.8.2-dynamic_maps//src/uti
#ifdef HAS_SDBM #ifdef HAS_SDBM
DICT_TYPE_SDBM, dict_sdbm_open, DICT_TYPE_SDBM, dict_sdbm_open,
#endif #endif
@@ -246,9 +277,11 @@ @@ -251,9 +282,11 @@
#ifdef HAS_NETINFO #ifdef HAS_NETINFO
DICT_TYPE_NETINFO, dict_ni_open, DICT_TYPE_NETINFO, dict_ni_open,
#endif #endif
@ -619,7 +619,7 @@ diff -ruN postfix-2.8.2/src/util/dict_open.c postfix-2.8.2-dynamic_maps//src/uti
#ifdef HAS_POSIX_REGEXP #ifdef HAS_POSIX_REGEXP
DICT_TYPE_REGEXP, dict_regexp_open, DICT_TYPE_REGEXP, dict_regexp_open,
#endif #endif
@@ -307,8 +340,31 @@ @@ -312,8 +345,31 @@
dict_type, dict_name); dict_type, dict_name);
if (dict_open_hash == 0) if (dict_open_hash == 0)
dict_open_init(); dict_open_init();
@ -653,7 +653,7 @@ diff -ruN postfix-2.8.2/src/util/dict_open.c postfix-2.8.2-dynamic_maps//src/uti
if ((dict = dp->open(dict_name, open_flags, dict_flags)) == 0) if ((dict = dp->open(dict_name, open_flags, dict_flags)) == 0)
msg_fatal("opening %s:%s %m", dict_type, dict_name); msg_fatal("opening %s:%s %m", dict_type, dict_name);
if (msg_verbose) if (msg_verbose)
@@ -316,6 +372,36 @@ @@ -331,6 +387,36 @@
return (dict); return (dict);
} }
@ -690,7 +690,7 @@ diff -ruN postfix-2.8.2/src/util/dict_open.c postfix-2.8.2-dynamic_maps//src/uti
/* dict_open_register - register dictionary type */ /* dict_open_register - register dictionary type */
void dict_open_register(const char *type, void dict_open_register(const char *type,
@@ -349,6 +435,9 @@ @@ -364,6 +450,9 @@
HTABLE_INFO **ht; HTABLE_INFO **ht;
DICT_OPEN_INFO *dp; DICT_OPEN_INFO *dp;
ARGV *mapnames; ARGV *mapnames;
@ -700,7 +700,7 @@ diff -ruN postfix-2.8.2/src/util/dict_open.c postfix-2.8.2-dynamic_maps//src/uti
if (dict_open_hash == 0) if (dict_open_hash == 0)
dict_open_init(); dict_open_init();
@@ -357,6 +446,13 @@ @@ -372,6 +461,13 @@
dp = (DICT_OPEN_INFO *) ht[0]->value; dp = (DICT_OPEN_INFO *) ht[0]->value;
argv_add(mapnames, dp->type, ARGV_END); argv_add(mapnames, dp->type, ARGV_END);
} }
@ -714,7 +714,7 @@ diff -ruN postfix-2.8.2/src/util/dict_open.c postfix-2.8.2-dynamic_maps//src/uti
qsort((void *) mapnames->argv, mapnames->argc, sizeof(mapnames->argv[0]), qsort((void *) mapnames->argv, mapnames->argc, sizeof(mapnames->argv[0]),
dict_sort_alpha_cpp); dict_sort_alpha_cpp);
myfree((char *) ht_info); myfree((char *) ht_info);
@@ -364,6 +460,87 @@ @@ -379,6 +475,87 @@
return mapnames; return mapnames;
} }
@ -802,9 +802,9 @@ diff -ruN postfix-2.8.2/src/util/dict_open.c postfix-2.8.2-dynamic_maps//src/uti
#ifdef TEST #ifdef TEST
/* /*
diff -ruN postfix-2.8.2/src/util/load_lib.c postfix-2.8.2-dynamic_maps//src/util/load_lib.c diff -ruN postfix-2.8.3//src/util/load_lib.c postfix-2.8.3-dynamic_maps.patch//src/util/load_lib.c
--- postfix-2.8.2/src/util/load_lib.c 1970-01-01 01:00:00.000000000 +0100 --- postfix-2.8.3//src/util/load_lib.c 1970-01-01 01:00:00.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/util/load_lib.c 2011-03-30 16:02:04.374769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/util/load_lib.c 2011-05-10 12:42:04.635116003 +0200
@@ -0,0 +1,135 @@ @@ -0,0 +1,135 @@
+/*++ +/*++
+/* NAME +/* NAME
@ -941,9 +941,9 @@ diff -ruN postfix-2.8.2/src/util/load_lib.c postfix-2.8.2-dynamic_maps//src/util
+#endif +#endif
+ return 0; + return 0;
+} +}
diff -ruN postfix-2.8.2/src/util/load_lib.h postfix-2.8.2-dynamic_maps//src/util/load_lib.h diff -ruN postfix-2.8.3//src/util/load_lib.h postfix-2.8.3-dynamic_maps.patch//src/util/load_lib.h
--- postfix-2.8.2/src/util/load_lib.h 1970-01-01 01:00:00.000000000 +0100 --- postfix-2.8.3//src/util/load_lib.h 1970-01-01 01:00:00.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/util/load_lib.h 2011-03-30 16:02:04.374769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/util/load_lib.h 2011-05-10 12:42:04.636116003 +0200
@@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
+#ifndef _LOAD_LIB_H_INCLUDED_ +#ifndef _LOAD_LIB_H_INCLUDED_
+#define _LOAD_LIB_H_INCLUDED_ +#define _LOAD_LIB_H_INCLUDED_
@ -986,9 +986,9 @@ diff -ruN postfix-2.8.2/src/util/load_lib.h postfix-2.8.2-dynamic_maps//src/util
+/*--*/ +/*--*/
+ +
+#endif +#endif
diff -ruN postfix-2.8.2/src/util/Makefile.in postfix-2.8.2-dynamic_maps//src/util/Makefile.in diff -ruN postfix-2.8.3//src/util/Makefile.in postfix-2.8.3-dynamic_maps.patch//src/util/Makefile.in
--- postfix-2.8.2/src/util/Makefile.in 2011-01-10 21:14:50.000000000 +0100 --- postfix-2.8.3//src/util/Makefile.in 2011-04-15 18:52:47.000000000 +0200
+++ postfix-2.8.2-dynamic_maps//src/util/Makefile.in 2011-03-30 16:28:24.508739763 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/util/Makefile.in 2011-05-10 12:42:04.637116003 +0200
@@ -33,15 +33,16 @@ @@ -33,15 +33,16 @@
allascii.c load_file.c killme_after.c vstream_tweak.c \ allascii.c load_file.c killme_after.c vstream_tweak.c \
unix_pass_listen.c unix_pass_trigger.c edit_file.c inet_windowsize.c \ unix_pass_listen.c unix_pass_trigger.c edit_file.c inet_windowsize.c \
@ -1091,9 +1091,9 @@ diff -ruN postfix-2.8.2/src/util/Makefile.in postfix-2.8.2-dynamic_maps//src/uti
rm -rf printfck rm -rf printfck
tidy: clean tidy: clean
diff -ruN postfix-2.8.2/src/util/sdbm.c postfix-2.8.2-dynamic_maps//src/util/sdbm.c diff -ruN postfix-2.8.3//src/util/sdbm.c postfix-2.8.3-dynamic_maps.patch//src/util/sdbm.c
--- postfix-2.8.2/src/util/sdbm.c 1970-01-01 01:00:00.000000000 +0100 --- postfix-2.8.3//src/util/sdbm.c 1970-01-01 01:00:00.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/util/sdbm.c 2011-03-30 16:02:04.377769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/util/sdbm.c 2011-05-10 12:42:04.638116003 +0200
@@ -0,0 +1,972 @@ @@ -0,0 +1,972 @@
+/*++ +/*++
+/* NAME +/* NAME
@ -2067,9 +2067,9 @@ diff -ruN postfix-2.8.2/src/util/sdbm.c postfix-2.8.2-dynamic_maps//src/util/sdb
+ return db; + return db;
+} +}
+ +
diff -ruN postfix-2.8.2/src/util/sdbm.h postfix-2.8.2-dynamic_maps//src/util/sdbm.h diff -ruN postfix-2.8.3//src/util/sdbm.h postfix-2.8.3-dynamic_maps.patch//src/util/sdbm.h
--- postfix-2.8.2/src/util/sdbm.h 1970-01-01 01:00:00.000000000 +0100 --- postfix-2.8.3//src/util/sdbm.h 1970-01-01 01:00:00.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/util/sdbm.h 2011-03-30 16:02:04.378769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/util/sdbm.h 2011-05-10 12:42:04.639116003 +0200
@@ -0,0 +1,97 @@ @@ -0,0 +1,97 @@
+/*++ +/*++
+/* NAME +/* NAME
@ -2168,9 +2168,9 @@ diff -ruN postfix-2.8.2/src/util/sdbm.h postfix-2.8.2-dynamic_maps//src/util/sdb
+#define BADMESS /* generate a message for worst case: +#define BADMESS /* generate a message for worst case:
+ cannot make room after SPLTMAX splits */ + cannot make room after SPLTMAX splits */
+#endif /* UTIL_SDBM_H */ +#endif /* UTIL_SDBM_H */
diff -ruN postfix-2.8.2/src/util/sys_defs.h postfix-2.8.2-dynamic_maps//src/util/sys_defs.h diff -ruN postfix-2.8.3//src/util/sys_defs.h postfix-2.8.3-dynamic_maps.patch//src/util/sys_defs.h
--- postfix-2.8.2/src/util/sys_defs.h 2011-03-01 20:10:46.000000000 +0100 --- postfix-2.8.3//src/util/sys_defs.h 2011-03-01 20:10:46.000000000 +0100
+++ postfix-2.8.2-dynamic_maps//src/util/sys_defs.h 2011-03-30 16:02:04.379769372 +0200 +++ postfix-2.8.3-dynamic_maps.patch//src/util/sys_defs.h 2011-05-10 12:42:04.640116003 +0200
@@ -720,6 +720,7 @@ @@ -720,6 +720,7 @@
#define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
#define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */ #define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */

View File

@ -10,8 +10,8 @@ diff -ruN postfix-2.7.1-orig/conf/main.cf postfix-2.7.1/conf/main.cf
+############################################################ +############################################################
+# Start MySQL from postfixwiki.org +# Start MySQL from postfixwiki.org
+############################################################ +############################################################
+relay_domains = $mydestination, hash:/etc/postfix/relay +#relay_domains = $mydestination, hash:/etc/postfix/relay
+virtual_alias_maps = hash:/etc/postfix/virtual +#virtual_alias_maps = hash:/etc/postfix/virtual
+#virtual_uid_maps = static:303 +#virtual_uid_maps = static:303
+#virtual_gid_maps = static:303 +#virtual_gid_maps = static:303
+#virtual_minimum_uid = 303 +#virtual_minimum_uid = 303

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:88c165c1ae0627bf094e97cbea93269f6cd4461992d202eb3b7c4b1e413ada08
size 2705977

3
postfix-2.8.3.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a1cecf39698f952c102aca086c6fc4872cee4dcc5fa97a2b5e2bc13f4a55a6a
size 2707899

View File

@ -1,69 +0,0 @@
diff -ruN postfix-SuSE-orig/ldap_aliases.cf postfix-SuSE/ldap_aliases.cf
--- postfix-SuSE-orig/ldap_aliases.cf 1970-01-01 01:00:00.000000000 +0100
+++ postfix-SuSE/ldap_aliases.cf 2011-01-17 10:43:12.000000000 +0100
@@ -0,0 +1,4 @@
+server_host = 127.0.0.1
+search_base = dc=mail,dc=net
+query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))(objectClass=posixAccount))
+result_attribute = uid
diff -ruN postfix-SuSE-orig/SuSEconfig.postfix postfix-SuSE/SuSEconfig.postfix
--- postfix-SuSE-orig/SuSEconfig.postfix 2010-11-25 16:15:29.000000000 +0100
+++ postfix-SuSE/SuSEconfig.postfix 2011-01-17 11:39:32.000000000 +0100
@@ -231,6 +231,8 @@
TMPDIR=$(mktemp -d /tmp/SuSEconfig.postfix.XXXXXX) || exit 1
PCONF="/usr/sbin/postconf -c $TMPDIR"
+ # needed when for WITH_LDAP
+ export POSTFIX_WITH_LDAP
# needed when for WITH_MYSQL
export POSTFIX_WITH_MYSQL
MCF_DIR=$TMPDIR
@@ -623,6 +625,11 @@
my $mncf = "$ENV{MCF_DIR}/main.cf";
my $line;
+my $with_ldap =
+ defined $ENV{POSTFIX_WITH_LDAP} ? $ENV{POSTFIX_WITH_LDAP} : "no";
+
+$with_ldap = lc($with_ldap);
+
my $with_mysql =
defined $ENV{POSTFIX_WITH_MYSQL} ? $ENV{POSTFIX_WITH_MYSQL} : "no";
@@ -634,10 +641,14 @@
chomp;
if( /\#?(virtual_alias_maps\s=\s).*/ ) {
- if ($with_mysql ne "yes") {
- $line = $1."hash:/etc/postfix/virtual";
- } else {
+ if ($with_mysql ne "yes" && $with_ldap ne "yes") {
+ $line = $1."hash:/etc/postfix/virtual";
+ } elsif ($with_ldap eq "yes" && $with_mysql ne "yes") {
+ $line = $1."hash:/etc/postfix/virtual ldap:/etc/postfix/ldap_aliases.cf";
+ } elsif ($with_mysql eq "yes" && $with_ldap ne "yes") {
$line = $1."hash:/etc/postfix/virtual mysql:/etc/postfix/mysql_virtual_alias_maps.cf";
+ } elsif ($with_mysql eq "yes" && $with_ldap eq "yes") {
+ $line = $1."hash:/etc/postfix/virtual ldap:/etc/postfix/ldap_aliases.cf mysql:/etc/postfix/mysql_virtual_alias_maps.cf";
}
} elsif( /\#?(virtual_uid_maps\s=.*)/ ) {
if ($with_mysql ne "yes") {
diff -ruN postfix-SuSE-orig/sysconfig.postfix postfix-SuSE/sysconfig.postfix
--- postfix-SuSE-orig/sysconfig.postfix 2010-07-06 16:57:01.000000000 +0200
+++ postfix-SuSE/sysconfig.postfix 2011-01-17 10:40:19.000000000 +0100
@@ -125,6 +125,15 @@
## Default: no
## Config: postfix
#
+# Set this to yes, if SuSEconfig should activate ldap stuff in main.cf
+# This extends virtual_alias_maps with "ldap:/etc/postfix/ldap_aliases.cf"
+#
+POSTFIX_WITH_LDAP="no"
+
+## Type: yesno
+## Default: no
+## Config: postfix
+#
# Set this to yes, if SuSEconfig should activate mysql stuff in main.cf
# and having 'mysql.sock' inside chroot jail
# Note: When POSTFIX_CHROOT="yes" then 'mysql.sock' will be available

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:ce162d907a42604876eb3b7a64efdd368bdcc7e731a3d38026fda11207f9c388 oid sha256:b2a6a65d1fe33601fecd140073059da2676114aa446b93bb9305a6e8e9b143cd
size 22188 size 22762

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed May 11 08:23:56 UTC 2011 - varkoly@novell.com
- remove document paths from postfix-files to avoid error messages
when postfix-doc is not installed
-------------------------------------------------------------------
Tue May 10 09:20:23 UTC 2011 - varkoly@novell.com
- update to 2.8.3 - VUL-0: postfix memory corruption
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Apr 10 07:00:18 UTC 2011 - varkoly@novell.com Sun Apr 10 07:00:18 UTC 2011 - varkoly@novell.com

View File

@ -17,11 +17,9 @@
# norootforbuild # norootforbuild
%define usetls 1
Name: postfix Name: postfix
Summary: A fast, secure, and flexible mailer Summary: A fast, secure, and flexible mailer
Version: 2.8.2 Version: 2.8.3
Release: 5 Release: 5
License: IBM Public License .. License: IBM Public License ..
Group: Productivity/Networking/Email/Servers Group: Productivity/Networking/Email/Servers
@ -38,7 +36,6 @@ Patch2: pointer_to_literals.patch
Patch3: ipv6_disabled.patch Patch3: ipv6_disabled.patch
Patch10: %{name}-2.7.1-main.cf.patch Patch10: %{name}-2.7.1-main.cf.patch
Patch11: %{name}-vda-2.7.1.patch Patch11: %{name}-vda-2.7.1.patch
Patch12: %{name}-SuSE-ldap.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %insserv_prereq %fillup_prereq PreReq: %insserv_prereq %fillup_prereq
PreReq: /usr/bin/getent PreReq: /usr/bin/getent
@ -63,7 +60,6 @@ Provides: smtp_daemon
# Some defines # Some defines
# #
%define pf_docdir %{_docdir}/%{name}-doc %define pf_docdir %{_docdir}/%{name}-doc
%define postfixfiles %{name}.filelist
%define pf_config_directory /etc/%{name} %define pf_config_directory /etc/%{name}
%define pf_daemon_directory /usr/lib/%{name} %define pf_daemon_directory /usr/lib/%{name}
%define pf_command_directory /usr/sbin %define pf_command_directory /usr/sbin
@ -171,7 +167,6 @@ Authors:
%patch3 -p1 %patch3 -p1
%patch10 -p1 %patch10 -p1
%patch11 -p1 %patch11 -p1
%patch12 -p0
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
%build %build
@ -182,12 +177,8 @@ export CCARGS="$CCARGS -DHAS_PGSQL -I/usr/include/pgsql"
export CCARGS="$CCARGS -DUSE_CYRUS_SASL" export CCARGS="$CCARGS -DUSE_CYRUS_SASL"
export AUXLIBS="-lldap -llber -lpcre" export AUXLIBS="-lldap -llber -lpcre"
export AUXLIBS="$AUXLIBS -lsasl2" export AUXLIBS="$AUXLIBS -lsasl2"
%if %{usetls}
export AUXLIBS="$AUXLIBS -lssl -lcrypto" export AUXLIBS="$AUXLIBS -lssl -lcrypto"
%endif
%if %{usetls}
export CCARGS="$CCARGS -DUSE_TLS" export CCARGS="$CCARGS -DUSE_TLS"
%endif
export CCARGS="$CCARGS $RPM_OPT_FLAGS -Wno-comments" export CCARGS="$CCARGS $RPM_OPT_FLAGS -Wno-comments"
export PIE=-pie export PIE=-pie
make makefiles DEBUG="" make makefiles DEBUG=""
@ -239,6 +230,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_libdir}/sasl2
mkdir -p $RPM_BUILD_ROOT/usr/sbin mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/%{conf_backup_dir} mkdir -p $RPM_BUILD_ROOT/%{conf_backup_dir}
mkdir -p $RPM_BUILD_ROOT/%{pf_sample_directory} mkdir -p $RPM_BUILD_ROOT/%{pf_sample_directory}
mkdir -p $RPM_BUILD_ROOT/%{pf_html_directory}
mkdir -p $RPM_BUILD_ROOT/usr/include/%{name} mkdir -p $RPM_BUILD_ROOT/usr/include/%{name}
mkdir -p $RPM_BUILD_ROOT/etc/pam.d mkdir -p $RPM_BUILD_ROOT/etc/pam.d
install -m 644 %{name}-SuSE/smtp $RPM_BUILD_ROOT/etc/pam.d/smtp install -m 644 %{name}-SuSE/smtp $RPM_BUILD_ROOT/etc/pam.d/smtp
@ -263,7 +255,6 @@ sed -e 's;@lib@;%{_lib};g' \
-e 's;@mailq_path@;%{pf_mailq_path};' %{name}-SuSE/SuSEconfig.%{name} \ -e 's;@mailq_path@;%{pf_mailq_path};' %{name}-SuSE/SuSEconfig.%{name} \
> $RPM_BUILD_ROOT/sbin/conf.d/SuSEconfig.%{name} > $RPM_BUILD_ROOT/sbin/conf.d/SuSEconfig.%{name}
chmod 755 $RPM_BUILD_ROOT/sbin/conf.d/SuSEconfig.%{name} chmod 755 $RPM_BUILD_ROOT/sbin/conf.d/SuSEconfig.%{name}
install -m 644 %{name}-SuSE/master.cf $RPM_BUILD_ROOT/etc/%{name}/master.cf
install -m 644 %{name}-SuSE/dynamicmaps.cf $RPM_BUILD_ROOT/etc/%{name}/dynamicmaps.cf install -m 644 %{name}-SuSE/dynamicmaps.cf $RPM_BUILD_ROOT/etc/%{name}/dynamicmaps.cf
install -m 644 %{name}-SuSE/ldap_aliases.cf $RPM_BUILD_ROOT/etc/%{name}/ldap_aliases.cf install -m 644 %{name}-SuSE/ldap_aliases.cf $RPM_BUILD_ROOT/etc/%{name}/ldap_aliases.cf
install -m 644 %{name}-SuSE/helo_access $RPM_BUILD_ROOT/etc/postfix/helo_access install -m 644 %{name}-SuSE/helo_access $RPM_BUILD_ROOT/etc/postfix/helo_access
@ -276,12 +267,10 @@ mkdir -p $RPM_BUILD_ROOT/etc/sasl2
install -m 600 %{name}-SuSE/smtpd.conf $RPM_BUILD_ROOT/etc/sasl2/smtpd.conf install -m 600 %{name}-SuSE/smtpd.conf $RPM_BUILD_ROOT/etc/sasl2/smtpd.conf
install -m 644 %{name}-SuSE/openssl_%{name}.conf.in $RPM_BUILD_ROOT/etc/%{name}/openssl_%{name}.conf.in install -m 644 %{name}-SuSE/openssl_%{name}.conf.in $RPM_BUILD_ROOT/etc/%{name}/openssl_%{name}.conf.in
install -m 755 %{name}-SuSE/mk%{name}cert $RPM_BUILD_ROOT/usr/sbin/mk%{name}cert install -m 755 %{name}-SuSE/mk%{name}cert $RPM_BUILD_ROOT/usr/sbin/mk%{name}cert
rm -rf $RPM_BUILD_ROOT/%{pf_queue_directory}
install -m 644 %{name}-SuSE/master.cf $RPM_BUILD_ROOT/%{conf_backup_dir}/master.cf
mkdir -p $RPM_BUILD_ROOT/%{omc_dir} mkdir -p $RPM_BUILD_ROOT/%{omc_dir}
install -m 644 %{name}-SuSE/%{name}.xml $RPM_BUILD_ROOT/%{omc_dir} install -m 644 %{name}-SuSE/%{name}.xml $RPM_BUILD_ROOT/%{omc_dir}
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/ mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/
install -m 644 %{name}-SuSE/%{name}-fw $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/%{name} install -m 644 %{name}-SuSE/%{name}-fw $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/%{name}
{ {
cat<<EOF cat<<EOF
# #
@ -307,49 +296,11 @@ $RPM_BUILD_ROOT/usr/sbin/postconf -c $RPM_BUILD_ROOT/etc/%{name} \
"daemon_directory = %{pf_daemon_directory}" \ "daemon_directory = %{pf_daemon_directory}" \
"biff = no" \ "biff = no" \
"inet_protocols = all" "inet_protocols = all"
install -m 644 $RPM_BUILD_ROOT/etc/%{name}/main.cf $RPM_BUILD_ROOT/%{conf_backup_dir}/main.cf #Set Permissions
# ----------------------------------------------------------------------- install -m 644 %{name}-SuSE/%{name}-files $RPM_BUILD_ROOT/usr/lib/postfix/postfix-files
# preparing /etc/postfix/postfix-files to be able to use postfix
# own upgrade script. Unfortunately it looks in postfix-files and
# expects aliases file at /etc/postfix/aliases and it expects to have
# unzipped manpages
# also remove the both sql dictionary libs as they will not be installed
# per default
# -----------------------------------------------------------------------
rm -f $RPM_BUILD_ROOT/etc/%{name}/aliases
rm -f $RPM_BUILD_ROOT/etc/%{name}/%{name}-files
sed 's;^$config_directory/aliases\(.*\);/etc/aliases\1;' conf/%{name}-files \
| grep -v '^$manpage_directory' | grep -Ev 'dict_(mysql|pgsql)' > $RPM_BUILD_ROOT/etc/%{name}/%{name}-files
rm -f %{postfixfiles}
test -f conf/%{name}-files || {
echo "conf/%{name}-files does not exist!"
exit 1
}
echo "%defattr(-,root,root)" >> %{postfixfiles}
exec <conf/%{name}-files
while IFS=: read path type owner group mode flags junk; do
owner=${owner/\$mail_owner/postfix}
group=${group/\$setgid_group/%{pf_setgid_group}}
case $path in
\$queue_directory*)
path=${path/\$queue_directory/\/var\/spool\/postfix}
group=${group/-/root}
echo "%dir %attr($mode,$owner,$group) $path/" >> %{postfixfiles}
mkdir -m $mode -p $RPM_BUILD_ROOT/$path
printf '%%-38s %%-18s %%04d\n' $path "${owner}.${group}" $mode >> $RPM_BUILD_ROOT/etc/permissions.d/%{name}
;;
\$command_directory/*)
path=${path/\$command_directory/\/usr\/sbin}
group=${group/-/root}
echo "%attr($mode,$owner,$group) $path" >> %{postfixfiles}
printf '%%-38s %%-18s %%04d\n' $path "${owner}.${group}" $mode >> $RPM_BUILD_ROOT/etc/permissions.d/%{name}
;;
*) continue;;
esac
done
# postfix-mysql # postfix-mysql
install -m 644 %{name}-mysql/main.cf-mysql $RPM_BUILD_ROOT/etc/%{name}/main.cf-mysql install -m 644 %{name}-mysql/main.cf-mysql $RPM_BUILD_ROOT/etc/%{name}/main.cf-mysql
install -m 640 %{name}-mysql/*_maps.cf $RPM_BUILD_ROOT/etc/%{name}/ install -m 640 %{name}-mysql/*_maps.cf $RPM_BUILD_ROOT/etc/%{name}/
# create paranoid permissions file # create paranoid permissions file
printf '%%-38s %%-18s %%s\n' /usr/sbin/postdrop "root.%{pf_setgid_group}" "0755" >> $RPM_BUILD_ROOT/etc/permissions.d/%{name}.paranoid printf '%%-38s %%-18s %%s\n' /usr/sbin/postdrop "root.%{pf_setgid_group}" "0755" >> $RPM_BUILD_ROOT/etc/permissions.d/%{name}.paranoid
printf '%%-38s %%-18s %%s\n' /usr/sbin/postqueue "root.%{pf_setgid_group}" "0755" >> $RPM_BUILD_ROOT/etc/permissions.d/%{name}.paranoid printf '%%-38s %%-18s %%s\n' /usr/sbin/postqueue "root.%{pf_setgid_group}" "0755" >> $RPM_BUILD_ROOT/etc/permissions.d/%{name}.paranoid
@ -359,17 +310,10 @@ install -m 644 include/*.h $RPM_BUILD_ROOT/usr/include/%{name}/
for example in AIX42 BSDI* F* HPUX* IRIX* NETBSD1 NEXTSTEP3 OPENSTEP4 OSF1 Solaris*; do for example in AIX42 BSDI* F* HPUX* IRIX* NETBSD1 NEXTSTEP3 OPENSTEP4 OSF1 Solaris*; do
%{__rm} examples/chroot-setup/${example} %{__rm} examples/chroot-setup/${example}
done done
# files-duplicate /usr/share/doc/packages/postfix-doc/html/ cp -a examples/* $RPM_BUILD_ROOT%{pf_sample_directory}
# so we copy all docs to a postfix-doc to do fdupes :) cp -a html/* $RPM_BUILD_ROOT%{pf_html_directory}
%{__install} -d $RPM_BUILD_ROOT%{pf_docdir}/html
for doc in AAAREADME COMPATIBILITY COPYRIGHT HISTORY INSTALL IPv6-ChangeLog LICENSE PORTING RELEASE_NOTES* US_PATENT_6321267 TLS_LICENSE README_FILES auxiliary examples html %{name}-SuSE/README.SuSE %{name}-SuSE/SPAMASSASSIN+POSTFIX.SuSE; do
%{__cp} -rv ${doc} $RPM_BUILD_ROOT%{pf_docdir}/
done
%if 0%{?suse_version} >= 1100
%fdupes $RPM_BUILD_ROOT%{pf_docdir} %fdupes $RPM_BUILD_ROOT%{pf_docdir}
# files-duplicate /usr/share/man/man?
%fdupes $RPM_BUILD_ROOT%{_mandir} %fdupes $RPM_BUILD_ROOT%{_mandir}
%endif
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
install -m 755 %{SOURCE11} $RPM_BUILD_ROOT/usr/sbin/ install -m 755 %{SOURCE11} $RPM_BUILD_ROOT/usr/sbin/
@ -384,7 +328,7 @@ if [ -z "$VERSIONTEST" -a -f %{pf_queue_directory}/pid/master.pid ]; then
fi fi
/usr/sbin/groupadd -g %{pf_gid} -o -r %{name} 2> /dev/null || : /usr/sbin/groupadd -g %{pf_gid} -o -r %{name} 2> /dev/null || :
/usr/sbin/groupadd -g %{maildrop_gid} -o -r maildrop 2> /dev/null || : /usr/sbin/groupadd -g %{maildrop_gid} -o -r maildrop 2> /dev/null || :
/usr/sbin/useradd -r -o -g %{name} -u %{pf_uid} -s /bin/false -c "Postfix Daemon" -d /%{pf_queue_directory} %{name} 2> /dev/null || : /usr/sbin/useradd -r -o -g %{name} -u %{pf_uid} -s /bin/false -c "Postfix Daemon" -d /%{pf_queue_directory} %{name} 2> /dev/null || :
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
%pre mysql %pre mysql
@ -446,6 +390,10 @@ fi
%post %post
# We never have to run suseconfig for postfix after installation # We never have to run suseconfig for postfix after installation
# We only start postfix own upgrade-configuration by update # We only start postfix own upgrade-configuration by update
/usr/sbin/postfix set-permissions
if [ ${1:-0} -gt 1 ]; then
/usr/sbin/postfix upgrade-configuration || :
fi
%{fillup_and_insserv -y postfix} %{fillup_and_insserv -y postfix}
%{fillup_only -an mail} %{fillup_only -an mail}
/sbin/ldconfig /sbin/ldconfig
@ -476,7 +424,7 @@ fi
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%files -f %{postfixfiles} %files
%defattr(-,root,root) %defattr(-,root,root)
%doc LICENSE %doc LICENSE
%config /etc/pam.d/* %config /etc/pam.d/*
@ -485,13 +433,13 @@ rm -rf $RPM_BUILD_ROOT
/sbin/conf.d/SuSEconfig.%{name} /sbin/conf.d/SuSEconfig.%{name}
%config(noreplace) %{omc_dir}/%{name}.xml %config(noreplace) %{omc_dir}/%{name}.xml
%dir /etc/%{name} %dir /etc/%{name}
%config /etc/%{name}/main.cf.default
%config(noreplace) /etc/%{name}/access %config(noreplace) /etc/%{name}/access
%config(noreplace) /etc/%{name}/aliases
%config(noreplace) /etc/%{name}/generic %config(noreplace) /etc/%{name}/generic
%config(noreplace) /etc/%{name}/helo_access %config(noreplace) /etc/%{name}/helo_access
%config(noreplace) /etc/%{name}/canonical %config(noreplace) /etc/%{name}/canonical
#%config(noreplace) /etc/%{name}/cidr_table
%config(noreplace) /etc/%{name}/main.cf %config(noreplace) /etc/%{name}/main.cf
%config /etc/%{name}/main.cf.default
%config(noreplace) /etc/%{name}/master.cf %config(noreplace) /etc/%{name}/master.cf
%config(noreplace) /etc/%{name}/openssl_%{name}.conf.in %config(noreplace) /etc/%{name}/openssl_%{name}.conf.in
%config(noreplace) /etc/%{name}/relocated %config(noreplace) /etc/%{name}/relocated
@ -499,9 +447,6 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) /etc/%{name}/virtual %config(noreplace) /etc/%{name}/virtual
%config(noreplace) /etc/%{name}/sasl_passwd %config(noreplace) /etc/%{name}/sasl_passwd
%config(noreplace) /etc/%{name}/sender_canonical %config(noreplace) /etc/%{name}/sender_canonical
#%config(noreplace) /etc/%{name}/tcp_table
#%config(noreplace) /etc/%{name}/pcre_table
#%config(noreplace) /etc/%{name}/regexp_table
%config(noreplace) /etc/%{name}/relay %config(noreplace) /etc/%{name}/relay
%config(noreplace) /etc/%{name}/relay_ccerts %config(noreplace) /etc/%{name}/relay_ccerts
%config(noreplace) /etc/%{name}/header_checks %config(noreplace) /etc/%{name}/header_checks
@ -512,13 +457,10 @@ rm -rf $RPM_BUILD_ROOT
%dir /etc/sasl2/ %dir /etc/sasl2/
%config(noreplace) /etc/sasl2/smtpd.conf %config(noreplace) /etc/sasl2/smtpd.conf
%config /etc/%{name}/LICENSE %config /etc/%{name}/LICENSE
%if %{usetls}
%config /etc/%{name}/TLS_LICENSE %config /etc/%{name}/TLS_LICENSE
%endif
%config /etc/permissions.d/%{name} %config /etc/permissions.d/%{name}
%config /etc/permissions.d/%{name}.paranoid %config /etc/permissions.d/%{name}.paranoid
%attr(0644, root, root) %config /etc/%{name}/makedefs.out %attr(0644, root, root) %config /etc/%{name}/makedefs.out
%attr(0644, root, root) %config /etc/%{name}/%{name}-files
/usr/lib/%{name}/%{name}-files /usr/lib/%{name}/%{name}-files
%config %attr(0755,root,root) /etc/init.d/%{name} %config %attr(0755,root,root) /etc/init.d/%{name}
/usr/bin/mailq /usr/bin/mailq
@ -529,6 +471,7 @@ rm -rf $RPM_BUILD_ROOT
/usr/sbin/smtp-source /usr/sbin/smtp-source
/usr/sbin/mk%{name}cert /usr/sbin/mk%{name}cert
/usr/sbin/check_mail_queue /usr/sbin/check_mail_queue
%verify(not mode group) /usr/sbin/post*
/sbin/rc%{name} /sbin/rc%{name}
%{_libdir}/lib* %{_libdir}/lib*
/usr/lib/sendmail /usr/lib/sendmail
@ -540,6 +483,20 @@ rm -rf $RPM_BUILD_ROOT
%{conf_backup_dir} %{conf_backup_dir}
%dir %attr(0700,%{name},root) %{pf_data_directory} %dir %attr(0700,%{name},root) %{pf_data_directory}
%{_mandir}/man?/*.gz %{_mandir}/man?/*.gz
%dir %attr(0755,%{name},root) /%{pf_queue_directory}
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/active
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/bounce
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/corrupt
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/defer
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/deferred
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/flush
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/hold
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/incoming
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/private
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/saved
%dir %attr(0700,%{name},root) /%{pf_queue_directory}/trace
%dir %attr(0730,%{name},maildrop) /%{pf_queue_directory}/maildrop
%dir %attr(0710,%{name},maildrop) /%{pf_queue_directory}/public
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
@ -547,7 +504,6 @@ rm -rf $RPM_BUILD_ROOT
%files doc %files doc
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%dir %{pf_docdir}/
%{pf_docdir}/ %{pf_docdir}/
%files mysql %files mysql