From 819a05aa3ab2c4d9cae22d6111e819ab7e33321c Mon Sep 17 00:00:00 2001 From: Jiri Skala Date: Fri, 11 Feb 2011 07:54:58 +0100 Subject: [PATCH 1/6] - fixes unused varable and coparison of different var types --- acpid-2.0.7-unused.patch | 29 +++++++++++++++++++++++++++++ acpid.spec | 7 ++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 acpid-2.0.7-unused.patch diff --git a/acpid-2.0.7-unused.patch b/acpid-2.0.7-unused.patch new file mode 100644 index 0000000..3d7e7d3 --- /dev/null +++ b/acpid-2.0.7-unused.patch @@ -0,0 +1,29 @@ +diff -up acpid-2.0.7/libnetlink.c.unused acpid-2.0.7/libnetlink.c +--- acpid-2.0.7/libnetlink.c.unused 2011-02-09 16:57:55.922298993 +0100 ++++ acpid-2.0.7/libnetlink.c 2011-02-09 16:59:02.927298890 +0100 +@@ -441,7 +441,7 @@ int rtnl_from_file(FILE *rtnl, rtnl_filt + nladdr.nl_groups = 0; + + while (1) { +- int err, len, type; ++ int err, len; + int l; + + status = fread(&buf, 1, sizeof(*h), rtnl); +@@ -456,7 +456,6 @@ int rtnl_from_file(FILE *rtnl, rtnl_filt + return 0; + + len = h->nlmsg_len; +- type= h->nlmsg_type; + l = len - sizeof(*h); + + if (l<0 || (unsigned)len>sizeof(buf)) { +@@ -518,7 +517,7 @@ int addattr_l(struct nlmsghdr *n, int ma + + int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len) + { +- if ((int)NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len) > maxlen) { ++ if ((int)NLMSG_ALIGN(n->nlmsg_len) + (int)NLMSG_ALIGN(len) > maxlen) { + fprintf(stderr, "addraw_l ERROR: message exceeded bound of %d\n",maxlen); + return -1; + } diff --git a/acpid.spec b/acpid.spec index 7a1f606..7e981e7 100644 --- a/acpid.spec +++ b/acpid.spec @@ -1,7 +1,7 @@ Summary: ACPI Event Daemon Name: acpid Version: 2.0.7 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Daemons Source: http://tedfelix.com/linux/acpid-%{version}.tar.gz @@ -13,6 +13,7 @@ Source5: acpid.service Source6: acpid.sysconfig Patch1: acpid-2.0.2-makefile.patch +Patch2: acpid-2.0.7-unused.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: ia64 x86_64 %{ix86} @@ -31,6 +32,7 @@ acpid is a daemon that dispatches ACPI events to user-space programs. %setup -q %patch1 -p1 -b .makefile +%patch2 -p1 -b .unused %build make %{?_smp_mflags} @@ -116,6 +118,9 @@ if [ "$1" -ge "1" ]; then fi %changelog +* Wed Feb 09 2011 Jiri Skala - 2.0.7-3 +- fixes unused varable and coparison of different var types + * Mon Feb 07 2011 Fedora Release Engineering - 2.0.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 05975bc8b7f3f4272da603ae6679d382180eaa2d Mon Sep 17 00:00:00 2001 From: Jiri Skala Date: Tue, 3 May 2011 09:17:44 +0200 Subject: [PATCH 2/6] fixes #701340 - CVE-2011-1159 acpid: blocked writes can lead to acpid daemon hang update to latest upstream 2.0.9 --- .gitignore | 1 + acpid-2.0.7-unused.patch | 29 ----------------------------- acpid.spec | 8 +++++--- sources | 2 +- 4 files changed, 7 insertions(+), 33 deletions(-) delete mode 100644 acpid-2.0.7-unused.patch diff --git a/.gitignore b/.gitignore index 0ffbf49..b9db971 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ acpid-2.0.5.tar.gz /acpid-2.0.7.tar.gz +/acpid-2.0.9.tar.gz diff --git a/acpid-2.0.7-unused.patch b/acpid-2.0.7-unused.patch deleted file mode 100644 index 3d7e7d3..0000000 --- a/acpid-2.0.7-unused.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -up acpid-2.0.7/libnetlink.c.unused acpid-2.0.7/libnetlink.c ---- acpid-2.0.7/libnetlink.c.unused 2011-02-09 16:57:55.922298993 +0100 -+++ acpid-2.0.7/libnetlink.c 2011-02-09 16:59:02.927298890 +0100 -@@ -441,7 +441,7 @@ int rtnl_from_file(FILE *rtnl, rtnl_filt - nladdr.nl_groups = 0; - - while (1) { -- int err, len, type; -+ int err, len; - int l; - - status = fread(&buf, 1, sizeof(*h), rtnl); -@@ -456,7 +456,6 @@ int rtnl_from_file(FILE *rtnl, rtnl_filt - return 0; - - len = h->nlmsg_len; -- type= h->nlmsg_type; - l = len - sizeof(*h); - - if (l<0 || (unsigned)len>sizeof(buf)) { -@@ -518,7 +517,7 @@ int addattr_l(struct nlmsghdr *n, int ma - - int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len) - { -- if ((int)NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len) > maxlen) { -+ if ((int)NLMSG_ALIGN(n->nlmsg_len) + (int)NLMSG_ALIGN(len) > maxlen) { - fprintf(stderr, "addraw_l ERROR: message exceeded bound of %d\n",maxlen); - return -1; - } diff --git a/acpid.spec b/acpid.spec index 7e981e7..90be15d 100644 --- a/acpid.spec +++ b/acpid.spec @@ -1,6 +1,6 @@ Summary: ACPI Event Daemon Name: acpid -Version: 2.0.7 +Version: 2.0.9 Release: 3%{?dist} License: GPLv2+ Group: System Environment/Daemons @@ -13,7 +13,6 @@ Source5: acpid.service Source6: acpid.sysconfig Patch1: acpid-2.0.2-makefile.patch -Patch2: acpid-2.0.7-unused.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: ia64 x86_64 %{ix86} @@ -32,7 +31,6 @@ acpid is a daemon that dispatches ACPI events to user-space programs. %setup -q %patch1 -p1 -b .makefile -%patch2 -p1 -b .unused %build make %{?_smp_mflags} @@ -118,6 +116,10 @@ if [ "$1" -ge "1" ]; then fi %changelog +* Tue May 03 2011 Jiri Skala - 2.0.9-1 +- fixes #701340 - CVE-2011-1159 acpid: blocked writes can lead to acpid daemon hang +- update to latest upstream 2.0.9 + * Wed Feb 09 2011 Jiri Skala - 2.0.7-3 - fixes unused varable and coparison of different var types diff --git a/sources b/sources index e9810f3..7597217 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -84832448304e0b19c8cf566fe5b64be0 acpid-2.0.7.tar.gz +8b30aa1b31f607161745a4ac7a19699b acpid-2.0.9.tar.gz From 71dcd3339f011119be72a670aa38d74f9614d3c7 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 5 May 2011 16:41:56 -0400 Subject: [PATCH 3/6] Fix systemd-related scriptlets. 1) Add a trigger to migrate state on upgrade from prior versions 2) Don't try to stop/disable a acpid.socket unit that doesn't exist. --- acpid.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/acpid.spec b/acpid.spec index 90be15d..9e6be8d 100644 --- a/acpid.spec +++ b/acpid.spec @@ -102,8 +102,8 @@ if [ "$1" = "0" ]; then /sbin/service acpid stop >/dev/null 2>&1 /sbin/chkconfig --del acpid - /bin/systemctl disable %{name}.service %{name}.socket > /dev/null 2>&1 || : - /bin/systemctl stop %{name}.service %{name}.socket > /dev/null 2>&1 || : + /bin/systemctl disable %{name}.service > /dev/null 2>&1 || : + /bin/systemctl stop %{name}.service > /dev/null 2>&1 || : fi @@ -115,6 +115,11 @@ if [ "$1" -ge "1" ]; then /bin/systemctl try-restart %{name}.service > /dev/null 2>&1 || : fi +%triggerun -- acpid < 2.0.9 +if /sbin/chkconfig --level 3 acpid ; then + /bin/systemctl enable acpid.service >/dev/null 2>&1 || : +fi + %changelog * Tue May 03 2011 Jiri Skala - 2.0.9-1 - fixes #701340 - CVE-2011-1159 acpid: blocked writes can lead to acpid daemon hang From 777ab6a93408d1ba4f415ae8997794df84623876 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 6 May 2011 12:00:37 -0400 Subject: [PATCH 4/6] Bump release, add changelog. --- acpid.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acpid.spec b/acpid.spec index 9e6be8d..d66bbdd 100644 --- a/acpid.spec +++ b/acpid.spec @@ -1,7 +1,7 @@ Summary: ACPI Event Daemon Name: acpid Version: 2.0.9 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: System Environment/Daemons Source: http://tedfelix.com/linux/acpid-%{version}.tar.gz @@ -121,6 +121,9 @@ if /sbin/chkconfig --level 3 acpid ; then fi %changelog +* Fri May 06 2011 Bill Nottingham - 2.0.9-4 +- fix systemd scriptlets to properly handle upgrade + * Tue May 03 2011 Jiri Skala - 2.0.9-1 - fixes #701340 - CVE-2011-1159 acpid: blocked writes can lead to acpid daemon hang - update to latest upstream 2.0.9 From 7449877b822c42ea680f728aa259744a2642fa13 Mon Sep 17 00:00:00 2001 From: Jiri Skala Date: Wed, 16 Nov 2011 14:26:37 +0100 Subject: [PATCH 5/6] update to latest upstream 2.0.13 --- .gitignore | 1 + acpid.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b9db971..ad7643a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ acpid-2.0.5.tar.gz /acpid-2.0.7.tar.gz /acpid-2.0.9.tar.gz +/acpid-2.0.13.tar.gz diff --git a/acpid.spec b/acpid.spec index d66bbdd..3ead9a0 100644 --- a/acpid.spec +++ b/acpid.spec @@ -1,7 +1,7 @@ Summary: ACPI Event Daemon Name: acpid -Version: 2.0.9 -Release: 4%{?dist} +Version: 2.0.13 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Daemons Source: http://tedfelix.com/linux/acpid-%{version}.tar.gz @@ -121,6 +121,9 @@ if /sbin/chkconfig --level 3 acpid ; then fi %changelog +* Wed Nov 16 2011 Jiri Skala - 2.0.13-1 +- update to latest upstream 2.0.13 + * Fri May 06 2011 Bill Nottingham - 2.0.9-4 - fix systemd scriptlets to properly handle upgrade diff --git a/sources b/sources index 7597217..c6cd3af 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8b30aa1b31f607161745a4ac7a19699b acpid-2.0.9.tar.gz +5bbbb9a320192df1cdd8d0e9a0196379 acpid-2.0.13.tar.gz From 758260fc7bdd20d2e77d63b7797bc550c50c65a9 Mon Sep 17 00:00:00 2001 From: Jiri Skala Date: Mon, 2 Jan 2012 15:07:43 +0100 Subject: [PATCH 6/6] updated to latest upstream 2.0.14 fixes #722325 - xfce4-power-manager does not seem to be supported --- .gitignore | 1 + acpid.power.sh | 1 + acpid.spec | 6 +++++- sources | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ad7643a..c5fe2d0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ acpid-2.0.5.tar.gz /acpid-2.0.7.tar.gz /acpid-2.0.9.tar.gz /acpid-2.0.13.tar.gz +/acpid-2.0.14.tar.gz diff --git a/acpid.power.sh b/acpid.power.sh index ebf0770..dfd2a6d 100644 --- a/acpid.power.sh +++ b/acpid.power.sh @@ -22,6 +22,7 @@ ps axo uid,cmd | \ awk ' $1 == '$uid_session' && ($2 ~ /gnome-power-manager/ || $2 ~ /kpowersave/ || + $2 ~ /xfce4-power-manager/ || $2 ~ /\/usr\/libexec\/gnome-settings-daemon/ || $2 ~ /kded4/ || $3 ~ /guidance-power-manager/) \ { found = 1; exit } END { exit !found } diff --git a/acpid.spec b/acpid.spec index 3ead9a0..421d51f 100644 --- a/acpid.spec +++ b/acpid.spec @@ -1,6 +1,6 @@ Summary: ACPI Event Daemon Name: acpid -Version: 2.0.13 +Version: 2.0.14 Release: 1%{?dist} License: GPLv2+ Group: System Environment/Daemons @@ -121,6 +121,10 @@ if /sbin/chkconfig --level 3 acpid ; then fi %changelog +* Mon Jan 02 2012 Jiri Skala - 2.0.14-1 +- updated to latest upstream 2.0.14 +- fixes #722325 - xfce4-power-manager does not seem to be supported + * Wed Nov 16 2011 Jiri Skala - 2.0.13-1 - update to latest upstream 2.0.13 diff --git a/sources b/sources index c6cd3af..d2da350 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5bbbb9a320192df1cdd8d0e9a0196379 acpid-2.0.13.tar.gz +14fc1eabc3489f3ded9347fcd55f158a acpid-2.0.14.tar.gz