FreeBSD Bugzilla – Attachment 238459 Details for
Bug 268087
security/maia: Update to patch upstream code for UTF-8 and other local patch cleanup.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
security/maia patch diff for version 1.0.4_11
maia-1.0.4_11-port.diff (text/plain), 14.73 KB, created by
ek
on 2022-11-30 19:05:42 UTC
(
hide
)
Description:
security/maia patch diff for version 1.0.4_11
Filename:
MIME Type:
Creator:
ek
Created:
2022-11-30 19:05:42 UTC
Size:
14.73 KB
patch
obsolete
>diff -Naur maia.orig/Makefile maia/Makefile >--- maia.orig/Makefile 2022-11-30 11:29:02.706518000 -0700 >+++ maia/Makefile 2022-11-30 11:42:12.337815000 -0700 >@@ -1,6 +1,6 @@ > PORTNAME= maia > DISTVERSION= 1.0.4 >-PORTREVISION= 10 >+PORTREVISION= 11 > CATEGORIES= security > > MAINTAINER= ek@purplehat.org >diff -Naur maia.orig/files/patch-maia.conf.dist maia/files/patch-maia.conf.dist >--- maia.orig/files/patch-maia.conf.dist 2022-05-02 09:40:10.545275000 -0600 >+++ maia/files/patch-maia.conf.dist 2022-11-30 11:41:07.170800000 -0700 >@@ -1,6 +1,43 @@ >---- maia.conf.dist.orig 2022-04-25 16:08:35 UTC >+--- maia.conf.dist.orig 2022-03-02 01:05:20 UTC > +++ maia.conf.dist >-@@ -52,7 +52,7 @@ $local_cf_dir = undef; # default: let the script find >+@@ -1,7 +1,7 @@ >+ ################################################################### >+ # Maia Mailguard Script Configuration File # >+ # # >+-# This file (/etc/maia.conf) contains configuration information # >++# This file (/usr/local/etc/maia/maia.conf) contains configuration information # >+ # used by Maia Mailguard's Perl maintenance scripts. # >+ ################################################################### >+ >+@@ -9,16 +9,16 @@ >+ $dsn = 'DBI:mysql:maia:localhost:3306'; >+ >+ # Your Maia database user's login name >+-$username = 'maia'; >++$username = 'vscan'; >+ >+ # Your Maia database user's password >+ $password = 'password'; >+ >+ # The directory where Maia's Perl scripts can be found. >+-$script_dir = '/var/lib/maia/scripts'; >++$script_dir = '/usr/local/share/maia/scripts'; >+ >+ # Location of your sa-learn script >+-$sa_learn = '/usr/bin/sa-learn'; >++$sa_learn = '/usr/local/bin/sa-learn'; >+ >+ # Address rewriting type [0..5] (see config.php) >+ $address_rewriting_type = 0; >+@@ -45,19 +45,19 @@ $preserve_case = 0; >+ # The directory where SpamAssassin's local.cf file can be found. >+ #$local_cf_dir = '/etc/mail/spamassassin'; >+ #$local_cf_dir = '/etc/spamassassin'; >+-$local_cf_dir = undef; # default: let the script find it >++$local_cf_dir = '/usr/local/etc/mail/spamassassin'; # default: let the script find it >+ >+ # The directory where SpamAssassin's core rules can be found. >+ # If you wish to specify the directory yourself, you can use the > # %%VERSION%% macro to replace the actual SpamAssassin version number. > #$system_rules_dir = '/usr/share/spamassassin'; > #$system_rules_dir = '/var/lib/spamassassin/%%VERSION%%'; # sa-update >@@ -8,4 +45,29 @@ > +$system_rules_dir = '/var/db/spamassassin'; # default: let the script find it > > # The directory where your amavis user's user_prefs file can be found. >- #$user_rules_dir = '/var/lib/maia/.spamassassin'; >+-#$user_rules_dir = '/var/lib/maia/.spamassassin'; >++#$user_rules_dir = '/usr/local/share/maia/.spamassassin'; >+ #$user_rules_dur = '~/.spamassassin'; >+-$user_rules_dir = undef; # default: let the script find it >++$user_rules_dir = '/var/maiad/.spamassassin'; # default: let the script find it >+ >+ >+ ### process-quarantine.pl >+@@ -96,7 +96,7 @@ $log_dir = '/var/log/maia'; >+ $workers = 10; >+ >+ # Location of your encryption key file, or undef to disable >+-#$key_file = '/var/lib/maia/blowfish.key'; >++#$key_file = '/usr/local/share/maia/blowfish.key'; >+ $key_file = undef; >+ >+ # Items larger than this size (in bytes) will not be learned/reported. >+@@ -156,7 +156,7 @@ $mail_types = 1 + 2 + 4 + 8 + 16; >+ $base_url = 'http://example.com/'; >+ >+ # Template directory >+-$template_dir = '/etc/maia/templates/'; >++$template_dir = '/usr/local/etc/maia/templates/'; >+ >+ # How you want the digest sorted (choose one per cache type) >+ # (note: non spam/ham caches don't have score to sort by) >diff -Naur maia.orig/files/patch-maiad maia/files/patch-maiad >--- maia.orig/files/patch-maiad 1969-12-31 17:00:00.000000000 -0700 >+++ maia/files/patch-maiad 2022-11-30 11:41:07.172601000 -0700 >@@ -0,0 +1,12 @@ >+--- maiad.orig 2022-11-30 18:39:52 UTC >++++ maiad >+@@ -3833,9 +3833,6 @@ sub maia_store_mail($$$$$@) { >+ $subject = substr($subject, 0, 255) if length($subject) > 255; >+ $subject = untaint($subject); >+ $sender = substr($sender, 0, 255) if length($sender) > 255; >+- if ($document_charset ne "") { >+- from_to($contents, $document_charset, 'UTF-8'); >+- } >+ >+ if (!$oversized) { >+ if ($dbtype =~ /^mysql$/si) { # MySQL >diff -Naur maia.orig/files/patch-maiad.conf.dist maia/files/patch-maiad.conf.dist >--- maia.orig/files/patch-maiad.conf.dist 2022-05-02 09:40:10.545463000 -0600 >+++ maia/files/patch-maiad.conf.dist 2022-11-30 11:41:07.175175000 -0700 >@@ -1,5 +1,29 @@ >---- maiad.conf.dist.orig 2022-04-25 17:16:14 UTC >+--- maiad.conf.dist.orig 2022-03-02 01:05:20 UTC > +++ maiad.conf.dist >+@@ -21,20 +21,20 @@ $max_servers = 2; >+ # Maiad will run as user ($daemon_user) >+ # * Typically 'maia'; sometimes 'amavis' or 'vscan' >+ >+-$daemon_user = 'maia'; >++$daemon_user = 'vscan'; >+ >+ >+ # Maiad will run as group ($daemon_group) >+ # * Typically 'maia'; sometimes 'amavis' or 'vscan' >+ >+-$daemon_group = 'maia'; >++$daemon_group = 'vscan'; >+ >+ >+ # Maiad's home directory ($MYHOME) >+ # * Where maiad expects to find supporting files >+ # * Should be owned by $daemon_user, group $daemon_group >+ >+-$MYHOME = '/var/lib/maia'; >++$MYHOME = '/var/maiad'; >+ $TEMPBASE = "$MYHOME/tmp"; >+ >+ ########################################################################### > @@ -55,8 +55,8 @@ $daemon_chroot_dir = undef; > # Path overrides for chrooted environments > # * Uncomment and adjust as necessary if using chroot >diff -Naur maia.orig/files/patch-scripts_configtest.pl maia/files/patch-scripts_configtest.pl >--- maia.orig/files/patch-scripts_configtest.pl 2022-05-02 09:40:10.546042000 -0600 >+++ maia/files/patch-scripts_configtest.pl 2022-11-30 11:41:07.177733000 -0700 >@@ -6,3 +6,14 @@ > > # $Id: configtest.pl 1570 2011-07-01 19:09:55Z rjl $ > >+@@ -94,8 +94,8 @@ >+ # name of this script >+ my $script_name = "configtest"; >+ >+- # read configuration file (/etc/maia/maia.conf) >+- my $config_file = "/etc/maia/maia.conf"; >++ # read configuration file (/usr/local/etc/maia/maia.conf) >++ my $config_file = "/usr/local/etc/maia/maia.conf"; >+ unless (my $rv = do $config_file) { >+ die("Maia: [$script_name] Couldn't parse $config_file: $@\n") if $@; >+ die("Maia: [$script_name] Couldn't open $config_file\n") if (!defined($rv) || !$rv); >diff -Naur maia.orig/files/patch-scripts_expire-quarantine-cache.pl maia/files/patch-scripts_expire-quarantine-cache.pl >--- maia.orig/files/patch-scripts_expire-quarantine-cache.pl 2022-05-02 09:40:10.546400000 -0600 >+++ maia/files/patch-scripts_expire-quarantine-cache.pl 2022-11-30 11:41:07.182886000 -0700 >@@ -6,3 +6,23 @@ > > # $Id: expire-quarantine-cache.pl 1528 2011-05-31 10:09:15Z rjl $ > >+@@ -128,8 +128,8 @@ >+ # name of this script >+ my $script_name = "expire-quarantine-cache"; >+ >+- # read configuration file (/etc/maia/maia.conf) >+- my $config_file = "/etc/maia/maia.conf"; >++ # read configuration file (/usr/local/etc/maia/maia.conf) >++ my $config_file = "/usr/local/etc/maia/maia.conf"; >+ unless (my $rv = do $config_file) { >+ fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@; >+ fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv); >+@@ -168,7 +168,7 @@ >+ close(PID_FILE); >+ >+ >+- # defaults (overridden by settings in /etc/maia/maia.conf) >++ # defaults (overridden by settings in /usr/local/etc/maia/maia.conf) >+ $mail_types = (ALL - CONFIRMED_NONSPAM - CONFIRMED_SPAM) >+ if !defined($mail_types); >+ >diff -Naur maia.orig/files/patch-scripts_load-sa-rules.pl maia/files/patch-scripts_load-sa-rules.pl >--- maia.orig/files/patch-scripts_load-sa-rules.pl 2022-05-02 09:40:10.546854000 -0600 >+++ maia/files/patch-scripts_load-sa-rules.pl 2022-11-30 11:41:07.185445000 -0700 >@@ -6,3 +6,23 @@ > > # $Id: load-sa-rules.pl 1528 2011-05-31 10:09:15Z rjl $ > >+@@ -118,8 +118,8 @@ >+ # name of this script >+ my $script_name = "load-sa-rules"; >+ >+- # read configuration file (/etc/maia/maia.conf) >+- my $config_file = "/etc/maia/maia.conf"; >++ # read configuration file (/usr/local/etc/maia/maia.conf) >++ my $config_file = "/usr/local/etc/maia/maia.conf"; >+ unless (my $rv = do $config_file) { >+ fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@; >+ fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv); >+@@ -162,7 +162,7 @@ >+ my $sa_version = $sa->VERSION; >+ my $sa_prefix = $sa->{PREFIX}; >+ >+- # defaults (overridden by values in /etc/maia/maia.conf) >++ # defaults (overridden by values in /usr/local/etc/maia/maia.conf) >+ if (defined($local_cf_dir)) { >+ $local_cf_dir = expand_macros($sa_version, $sa_prefix, $local_cf_dir); >+ fatal(sprintf("Directory %s does not exist!", $local_cf_dir)) >diff -Naur maia.orig/files/patch-scripts_maiadbtool.pl maia/files/patch-scripts_maiadbtool.pl >--- maia.orig/files/patch-scripts_maiadbtool.pl 2022-05-02 09:40:10.546961000 -0600 >+++ maia/files/patch-scripts_maiadbtool.pl 2022-11-30 11:41:07.188010000 -0700 >@@ -6,3 +6,21 @@ > > # $Id: $ > >+@@ -130,14 +130,14 @@ sub export_wblist_csv($$$$); >+ # name of this script >+ my $script_name = "maiadbtool"; >+ >+-# read configuration file (/etc/maia/maia.conf) >+-my $config_file = "/etc/maia/maia.conf"; >++# read configuration file (/usr/local/etc/maia/maia.conf) >++my $config_file = "/usr/local/etc/maia/maia.conf"; >+ unless (my $rv = do $config_file) { >+ fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@; >+ fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv); >+ }; >+ >+-# defaults (overridden by settings in /etc/maia/maia.conf) >++# defaults (overridden by settings in /usr/local/etc/maia/maia.conf) >+ $sa_learn = "sa-learn" if !defined($sa_learn); >+ $address_rewriting_type = 0 if !defined($address_rewriting_type); >+ $routing_domain = "" if !defined($routing_domain); >diff -Naur maia.orig/files/patch-scripts_process-quarantine.pl maia/files/patch-scripts_process-quarantine.pl >--- maia.orig/files/patch-scripts_process-quarantine.pl 2022-05-02 09:40:10.547071000 -0600 >+++ maia/files/patch-scripts_process-quarantine.pl 2022-11-30 11:41:07.190578000 -0700 >@@ -6,3 +6,23 @@ > > package Maia::ProcessQuarantine; > >+@@ -51,7 +51,7 @@ Mail::SpamAssassin::Message->import(); >+ use Mail::SpamAssassin::PerMsgLearner; >+ use Mail::SpamAssassin::Reporter; >+ >+-# config file variables from /etc/maia/maia.conf >++# config file variables from /usr/local/etc/maia/maia.conf >+ use vars qw( $key_file $default_max_size $pq_log_level $log_dir >+ $learning_options $report_options $pid_dir >+ $autolearn_ham_threshold $autolearn_spam_threshold >+@@ -150,8 +150,8 @@ if ($0 =~ /^(.*\/)*(.+)\.pl$/i) { >+ $script_name = 'process-quarantine'; # sane default; >+ } >+ >+-# read configuration file (/etc/maia/maia.conf) >+-load_config_file('/etc/maia/maia.conf'); >++# read configuration file (/usr/local/etc/maia/maia.conf) >++load_config_file('/usr/local/etc/maia/maia.conf'); >+ >+ # defaults (overridden by settings in maia.conf) >+ $default_workers = NWORKERS if !defined($default_workers); >diff -Naur maia.orig/files/patch-scripts_resend.pl maia/files/patch-scripts_resend.pl >--- maia.orig/files/patch-scripts_resend.pl 2022-05-02 09:40:10.547178000 -0600 >+++ maia/files/patch-scripts_resend.pl 2022-11-30 11:41:07.193116000 -0700 >@@ -6,3 +6,14 @@ > > # $Id: $ > >+@@ -89,8 +89,8 @@ sub resend_mail($$$$$$); >+ # name of this script >+ my $script_name = "resend"; >+ >+-# read configuration file (/etc/maia/maia.conf) >+-my $config_file = "/etc/maia/maia.conf"; >++# read configuration file (/usr/local/etc/maia/maia.conf) >++my $config_file = "/usr/local/etc/maia/maia.conf"; >+ unless (my $rv = do $config_file) { >+ fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@; >+ fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv); >diff -Naur maia.orig/files/patch-scripts_send-quarantine-digests.pl maia/files/patch-scripts_send-quarantine-digests.pl >--- maia.orig/files/patch-scripts_send-quarantine-digests.pl 2022-05-02 09:40:10.547281000 -0600 >+++ maia/files/patch-scripts_send-quarantine-digests.pl 2022-11-30 11:41:07.195641000 -0700 >@@ -6,3 +6,23 @@ > > # $Id$ > >+@@ -91,8 +91,8 @@ sub generate_confirm_token($$); >+ # name of this script >+ my $script_name = "send-quarantine-digests"; >+ >+-# read configuration file (/etc/maia/maia.conf) >+-my $config_file = "/etc/maia/maia.conf"; >++# read configuration file (/usr/local/etc/maia/maia.conf) >++my $config_file = "/usr/local/etc/maia/maia.conf"; >+ unless (my $rv = do $config_file) { >+ fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@; >+ fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv); >+@@ -131,7 +131,7 @@ print PID_FILE "$$"; >+ close(PID_FILE); >+ >+ >+-# defaults (overridden by settings in /etc/maia/maia.conf) >++# defaults (overridden by settings in /usr/local/etc/maia/maia.conf) >+ $base_url = "http://example.com/" if !defined($base_url); >+ $template_dir = "/var/lib/maia/templates" if !defined($template_dir); >+ >diff -Naur maia.orig/files/patch-scripts_send-quarantine-reminders.pl maia/files/patch-scripts_send-quarantine-reminders.pl >--- maia.orig/files/patch-scripts_send-quarantine-reminders.pl 2022-05-02 09:40:10.547374000 -0600 >+++ maia/files/patch-scripts_send-quarantine-reminders.pl 2022-11-30 11:41:07.198175000 -0700 >@@ -6,3 +6,14 @@ > > # $Id: send-quarantine-reminders.pl 1528 2011-05-31 10:09:15Z rjl $ > >+@@ -89,8 +89,8 @@ >+ # name of this script >+ my $script_name = "send-quarantine-reminders"; >+ >+- # read configuration file (/etc/maia/maia.conf) >+- my $config_file = "/etc/maia/maia.conf"; >++ # read configuration file (/usr/local/etc/maia/maia.conf) >++ my $config_file = "/usr/local/etc/maia/maia.conf"; >+ unless (my $rv = do $config_file) { >+ fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@; >+ fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv); >diff -Naur maia.orig/files/patch-scripts_stats-snapshot.pl maia/files/patch-scripts_stats-snapshot.pl >--- maia.orig/files/patch-scripts_stats-snapshot.pl 2022-05-02 09:40:10.547463000 -0600 >+++ maia/files/patch-scripts_stats-snapshot.pl 2022-11-30 11:41:07.200726000 -0700 >@@ -6,3 +6,14 @@ > > # $Id: stats-snapshot.pl 1528 2011-05-31 10:09:15Z rjl $ > >+@@ -86,8 +86,8 @@ >+ # name of this script >+ my $script_name = "stats-snapshot"; >+ >+- # read configuration file (/etc/maia/maia.conf) >+- my $config_file = "/etc/maia/maia.conf"; >++ # read configuration file (/usr/local/etc/maia/maia.conf) >++ my $config_file = "/usr/local/etc/maia/maia.conf"; >+ unless (my $rv = do $config_file) { >+ fatal(sprintf("Couldn't parse %s: %s", $config_file, $@)) if $@; >+ fatal(sprintf("Couldn't open %s", $config_file)) if (!defined($rv) || !$rv);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 268087
:
238459
|
238476
|
238477
|
238482