comment out unnecessary PageLogFormat from cups-files.conf (#1148995)

This commit is contained in:
Jiri Popelka 2014-10-03 14:09:59 +02:00
parent 86c3b85e5a
commit e469187dca

View File

@ -11,7 +11,7 @@ Summary: CUPS printing system
Name: cups Name: cups
Epoch: 1 Epoch: 1
Version: 2.0.0 Version: 2.0.0
Release: 2%{?dist} Release: 3%{?dist}
License: GPLv2 License: GPLv2
Url: http://www.cups.org/ Url: http://www.cups.org/
Source: http://www.cups.org/software/%{version}/cups-%{version}-source.tar.bz2 Source: http://www.cups.org/software/%{version}/cups-%{version}-source.tar.bz2
@ -407,41 +407,11 @@ s:.*\('%{_datadir}'/\)\([^/_]\+\)\(.*\.po$\):%lang(\2) \1\2\3:
rm -rf %{_sysconfdir}/cups/certs rm -rf %{_sysconfdir}/cups/certs
rm -f %{_localstatedir}/cache/cups/*.ipp %{_localstatedir}/cache/cups/*.cache rm -f %{_localstatedir}/cache/cups/*.ipp %{_localstatedir}/cache/cups/*.cache
# Deal with config migration due to CVE-2012-5519 (STR #4223) # Previous migration script unnecessarily put PageLogFormat into cups-files.conf
IN=%{_sysconfdir}/cups/cupsd.conf # (see bug #1148995)
OUT=%{_sysconfdir}/cups/cups-files.conf FILE=%{_sysconfdir}/cups/cups-files.conf
copiedany=no for keyword in PageLogFormat; do
for keyword in AccessLog CacheDir ConfigFilePerm \ /bin/sed -i -e "s,^$keyword,#$keyword,i" "$FILE" || :
DataDir DocumentRoot ErrorLog FatalErrors \
FileDevice FontPath Group LogFilePerm \
LPDConfigFile PageLog Printcap PrintcapFormat \
RemoteRoot RequestRoot ServerBin ServerCertificate \
ServerKey ServerRoot SMBConfigFile StateDir \
SystemGroup SystemGroupAuthKey TempDir User; do
if ! [ -f "$IN" ] || ! /bin/grep -iq ^$keyword "$IN"; then continue; fi
copy=yes
if /bin/grep -iq ^$keyword "$OUT"; then
if [ "`/bin/grep -i ^$keyword "$IN"`" == \
"`/bin/grep -i ^$keyword "$OUT"`" ]; then
copy=no
else
/bin/sed -i -e "s,^$keyword,#$keyword,i" "$OUT" || :
fi
fi
if [ "$copy" == "yes" ]; then
if [ "$copiedany" == "no" ]; then
(cat >> "$OUT" <<EOF
# Settings automatically moved from cupsd.conf by RPM package:
EOF
) || :
fi
(/bin/grep -i ^$keyword "$IN" >> "$OUT") || :
copiedany=yes
fi
/bin/sed -i -e "s,^$keyword,#$keyword,i" "$IN" || :
done done
exit 0 exit 0
@ -640,6 +610,9 @@ rm -f %{cups_serverbin}/backend/smb
%{_mandir}/man5/ipptoolfile.5.gz %{_mandir}/man5/ipptoolfile.5.gz
%changelog %changelog
* Fri Oct 03 2014 Jiri Popelka <jpopelka@redhat.com> - 1:2.0.0-3
- comment out unnecessary PageLogFormat from cups-files.conf (#1148995)
* Fri Oct 03 2014 Jiri Popelka <jpopelka@redhat.com> - 1:2.0.0-2 * Fri Oct 03 2014 Jiri Popelka <jpopelka@redhat.com> - 1:2.0.0-2
- s/org.cups.cupsd/cups/ cups.service - s/org.cups.cupsd/cups/ cups.service