Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 834600 Details for
Bug 1038388
spampd cannot run perl with -T flag
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Convert to systemd, untaint some varilables to please new Perl, dispose of PID file
spampd-systemd.patch (text/plain), 5.21 KB, created by
Bojan Smojver
on 2013-12-09 23:55:41 UTC
(
hide
)
Description:
Convert to systemd, untaint some varilables to please new Perl, dispose of PID file
Filename:
MIME Type:
Creator:
Bojan Smojver
Created:
2013-12-09 23:55:41 UTC
Size:
5.21 KB
patch
obsolete
> README.systemd | 13 +++++++++++++ > spampd-2.30-no-pid-file.patch | 11 +++++++++++ > spampd-2.30-untaint.patch | 25 +++++++++++++++++++++++++ > spampd.service | 11 +++++++++++ > spampd.spec | 43 ++++++++++++++++++++++++++----------------- > 5 files changed, 86 insertions(+), 17 deletions(-) > >diff --git a/README.systemd b/README.systemd >new file mode 100644 >index 0000000..7e3e78b >--- /dev/null >+++ b/README.systemd >@@ -0,0 +1,13 @@ >+As of spampd-2.30-16, the software has been converted to systemd. >+ >+The PID file is no longer created, because spampd does not background itself. >+ >+To enable and start the service, use the usual: >+ >+systemctl enable spampd.service >+systemctl start spampd.service >+ >+The environment file, /etc/sysconfig/spampd, now has a slighly different >+format. Instead of using options, use SPAMPD_OPTIONS. For instance: >+ >+SPAMPD_OPTIONS="--host=127.0.0.1:10026 --relayhost=127.0.0.1:10027" >diff --git a/spampd-2.30-no-pid-file.patch b/spampd-2.30-no-pid-file.patch >new file mode 100644 >index 0000000..4b60b87 >--- /dev/null >+++ b/spampd-2.30-no-pid-file.patch >@@ -0,0 +1,11 @@ >+--- spampd.orig 2013-12-09 21:05:43.757669743 +1100 >++++ spampd 2013-12-10 05:39:13.299825730 +1100 >+@@ -898,7 +898,7 @@ >+ syslog_facility => 'mail', >+ background => $background, >+ # setsid => 1, >+- pid_file => $pidfile, >++ pid_file => $background ? $pidfile : undef, >+ user => $user, >+ group => $group, >+ max_servers => $children, >diff --git a/spampd-2.30-untaint.patch b/spampd-2.30-untaint.patch >new file mode 100644 >index 0000000..6d29723 >--- /dev/null >+++ b/spampd-2.30-untaint.patch >@@ -0,0 +1,25 @@ >+--- spampd 2013-11-04 16:03:52.000000000 +0100 >++++ /usr/sbin/spampd 2013-11-04 16:05:05.000000000 +0100 >+@@ -900,6 +900,22 @@ >+ usage(0); >+ } >+ >++# Untaint some options provided by admin command line. >++$pidfile =~ /^(.*)$/; >++$pidfile = $1; >++ >++$relayhost =~ /^(.*)$/; >++$relayhost = $1; >++ >++$relayport =~ /^(.*)$/; >++$relayport = $1; >++ >++$host =~ /^(.*)$/; >++$host = $1; >++ >++$port =~ /^(.*)$/; >++$port = $1; >++ >+ if ( $options{tagall} ) { $tagall = 1; } >+ if ( $options{'log-rules-hit'} ) { $rh = 1; } >+ if ( $options{debug} ) { $debug = 1; $nsloglevel = 4; } >diff --git a/spampd.service b/spampd.service >new file mode 100644 >index 0000000..5fb540c >--- /dev/null >+++ b/spampd.service >@@ -0,0 +1,11 @@ >+[Unit] >+Description=spampd daemon >+After=syslog.target network.target >+ >+[Service] >+EnvironmentFile=/etc/sysconfig/spampd >+ExecStart=/usr/sbin/spampd --nodetach \ >+ --user=spampd --group=spampd --tagall --local-only $SPAMPD_OPTIONS >+ >+[Install] >+WantedBy=multi-user.target >diff --git a/spampd.spec b/spampd.spec >index f4649e4..8f073c0 100644 >--- a/spampd.spec >+++ b/spampd.spec >@@ -1,19 +1,26 @@ > Summary: Transparent SMTP/LMTP proxy filter using spamassassin > Name: spampd > Version: 2.30 >-Release: 15 >+Release: 16 > License: GPLv2+ > Group: System Environment/Daemons > URL: http://www.worlddesign.com/index.cfm/rd/mta/spampd.htm > Source0: http://www.worlddesign.com/Content/rd/mta/spampd/spampd-%{version}.tar.gz >-Source1: spampd.init >+Source1: spampd.service >+Source2: README.systemd > # Fix POD errors, <https://github.com/mpaperno/spampd/issues/1> > Patch0: spampd-2.30-Fix-POD-errors.patch >+Patch1: spampd-2.30-untaint.patch >+Patch2: spampd-2.30-no-pid-file.patch > BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root >+ >+BuildRequires: systemd-units >+ > Requires(pre): /usr/sbin/useradd >-Requires(post): /sbin/chkconfig >-Requires(preun): /sbin/service, /sbin/chkconfig >-Requires(postun): /sbin/service >+Requires(post): systemd >+Requires(preun): systemd >+Requires(postun): systemd >+ > BuildArch: noarch > > %description >@@ -29,8 +36,11 @@ indicating it's spam and why. > %prep > %setup -q > %patch0 -p1 >+%patch1 -p0 -b .untaint >+%patch2 -p0 -b .no-pid-file > %{__rm} -f spampd.html > %{__chmod} -x changelog.txt >+%{__cp} %{SOURCE2} . > > > %build >@@ -48,7 +58,7 @@ indicating it's spam and why. > %{buildroot}%{_mandir}/man8/spampd.8 > # Init script > %{__install} -D -p -m 0755 %{SOURCE1} \ >- %{buildroot}%{_sysconfdir}/rc.d/init.d/spampd >+ %{buildroot}%{_unitdir}/spampd.service > # Home directory > %{__mkdir_p} %{buildroot}/var/spool/spampd > >@@ -62,30 +72,29 @@ indicating it's spam and why. > spampd &>/dev/null || : > > %post >-/sbin/chkconfig --add spampd >+%systemd_post spampd.service > > %preun >-if [ $1 -eq 0 ]; then >- /sbin/service spampd stop &>/dev/null || : >- /sbin/chkconfig --del spampd >-fi >+%systemd_preun spampd.service > > %postun >-if [ $1 -ge 1 ]; then >- /sbin/service spampd condrestart &>/dev/null || : >-fi >- >+%systemd_postun_with_restart spampd.service > > %files > %defattr(-,root,root,-) >-%doc changelog.txt spampd.html >-%{_sysconfdir}/rc.d/init.d/spampd >+%doc changelog.txt spampd.html README.systemd >+%{_unitdir}/spampd.service > %{_sbindir}/spampd > %{_mandir}/man8/spampd.8* > %attr(0750,spampd,spampd) /var/spool/spampd/ > > > %changelog >+* Mon Dec 09 2013 Bojan Smojver <bojan@rexursive.com> - 2.30-16 >+- convert to systemd >+- untaint some variables (Perl 5.18) >+- do not create PID file if not detaching >+ > * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.30-15 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild > - Fix POD errors
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 1038388
: 834600