summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mail-mta/postfix/files/postfix-2.5.1-strncmp.patch')
-rw-r--r--mail-mta/postfix/files/postfix-2.5.1-strncmp.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/mail-mta/postfix/files/postfix-2.5.1-strncmp.patch b/mail-mta/postfix/files/postfix-2.5.1-strncmp.patch
new file mode 100644
index 0000000..7673a98
--- /dev/null
+++ b/mail-mta/postfix/files/postfix-2.5.1-strncmp.patch
@@ -0,0 +1,48 @@
+diff -uNr -r postfix-2.5.1-orig/src/sendmail/sendmail.c postfix-2.5.1/src/sendmail/sendmail.c
+--- postfix-2.5.1-orig/src/sendmail/sendmail.c 2008-01-09 14:59:40.000000000 +0100
++++ postfix-2.5.1/src/sendmail/sendmail.c 2008-03-14 19:23:25.405275019 +0100
+@@ -1046,7 +1046,7 @@
+ mode = SM_MODE_MAILQ;
+ } else if (strcmp(argv[0], "newaliases") == 0) {
+ mode = SM_MODE_NEWALIAS;
+- } else if (strcmp(argv[0], "smtpd") == 0) {
++ } else if (strncmp(argv[0], "smtpd", 5) == 0) {
+ mode = SM_MODE_DAEMON;
+ } else {
+ mode = SM_MODE_ENQUEUE;
+diff -uNr -r postfix-2.5.1-orig/src/smtp/smtp.c postfix-2.5.1/src/smtp/smtp.c
+--- postfix-2.5.1-orig/src/smtp/smtp.c 2008-01-15 01:41:46.000000000 +0100
++++ postfix-2.5.1/src/smtp/smtp.c 2008-03-14 19:23:25.405275019 +0100
+@@ -962,7 +962,7 @@
+ TLS_CLIENT_INIT(&props,
+ log_level = var_smtp_tls_loglevel,
+ verifydepth = var_smtp_tls_scert_vd,
+- cache_type = strcmp(var_procname, "smtp") == 0 ?
++ cache_type = strncmp(var_procname, "smtp", 4) == 0 ?
+ TLS_MGR_SCACHE_SMTP : TLS_MGR_SCACHE_LMTP,
+ cert_file = var_smtp_tls_cert_file,
+ key_file = var_smtp_tls_key_file,
+@@ -1058,7 +1058,7 @@
+ /*
+ * XXX At this point, var_procname etc. are not initialized.
+ */
+- smtp_mode = (strcmp(sane_basename((VSTRING *) 0, argv[0]), "smtp") == 0);
++ smtp_mode = (strncmp(sane_basename((VSTRING *) 0, argv[0]), "smtp", 4) == 0);
+
+ /*
+ * Initialize with the LMTP or SMTP parameter name space.
+diff -uNr -r postfix-2.5.1-orig/src/smtp/smtp_state.c postfix-2.5.1/src/smtp/smtp_state.c
+--- postfix-2.5.1-orig/src/smtp/smtp_state.c 2006-01-06 01:07:36.000000000 +0100
++++ postfix-2.5.1/src/smtp/smtp_state.c 2008-03-14 19:23:44.896995323 +0100
+@@ -86,9 +86,9 @@
+ * form, and then to transform from the internal form to external forms Y
+ * and Z.
+ */
+- if (strcmp(var_procname, "lmtp") == 0) {
++ if (strncmp(var_procname, "lmtp", 4) == 0) {
+ state->misc_flags |= SMTP_MISC_FLAG_USE_LMTP;
+- } else if (strcmp(var_procname, "smtp") == 0) {
++ } else if (strncmp(var_procname, "smtp", 4) == 0) {
+ /* void */
+ } else {
+ msg_fatal("unexpected process name \"%s\" - "