diff options
author | Daniel Pielmeier <billie@gentoo.org> | 2011-02-11 16:08:15 +0000 |
---|---|---|
committer | Daniel Pielmeier <billie@gentoo.org> | 2011-02-11 16:08:15 +0000 |
commit | 9a1443ec240a871da3b82629ddbd869e124499c7 (patch) | |
tree | 00b529a6dbda38c6b51abddeb31c4c50d50e844c /app-admin/conky | |
parent | New revisions to support new file locations and changes to documentation (diff) | |
download | gentoo-2-9a1443ec240a871da3b82629ddbd869e124499c7.tar.gz gentoo-2-9a1443ec240a871da3b82629ddbd869e124499c7.tar.bz2 gentoo-2-9a1443ec240a871da3b82629ddbd869e124499c7.zip |
Revision bump to fix security bug #354061 and also bug #352012.
(Portage version: 2.1.9.35/cvs/Linux i686)
Diffstat (limited to 'app-admin/conky')
-rw-r--r-- | app-admin/conky/ChangeLog | 10 | ||||
-rw-r--r-- | app-admin/conky/conky-1.8.1-r1.ebuild | 128 | ||||
-rw-r--r-- | app-admin/conky/files/conky-1.8.1-acpitemp.patch | 81 | ||||
-rw-r--r-- | app-admin/conky/files/conky-1.8.1-secunia-SA43225.patch | 26 |
4 files changed, 243 insertions, 2 deletions
diff --git a/app-admin/conky/ChangeLog b/app-admin/conky/ChangeLog index faecce0699dc..6cdca133cf80 100644 --- a/app-admin/conky/ChangeLog +++ b/app-admin/conky/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-admin/conky -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/conky/ChangeLog,v 1.153 2010/11/12 17:21:57 billie Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/conky/ChangeLog,v 1.154 2011/02/11 16:08:15 billie Exp $ + +*conky-1.8.1-r1 (11 Feb 2011) + + 11 Feb 2011; Daniel Pielmeier <billie@gentoo.org> +conky-1.8.1-r1.ebuild, + +files/conky-1.8.1-acpitemp.patch, +files/conky-1.8.1-secunia-SA43225.patch: + Revision bump to fix security bug #354061 and also bug #352012. 12 Nov 2010; Daniel Pielmeier <billie@gentoo.org> conky-1.8.1.ebuild, +files/conky-1.8.1-xmms2.patch: diff --git a/app-admin/conky/conky-1.8.1-r1.ebuild b/app-admin/conky/conky-1.8.1-r1.ebuild new file mode 100644 index 000000000000..d155f587cf04 --- /dev/null +++ b/app-admin/conky/conky-1.8.1-r1.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/conky/conky-1.8.1-r1.ebuild,v 1.1 2011/02/11 16:08:15 billie Exp $ + +EAPI=2 + +inherit eutils + +DESCRIPTION="An advanced, highly configurable system monitor for X" +HOMEPAGE="http://conky.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-3 BSD LGPL-2.1 MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc64 ~sparc ~x86" +IUSE="apcupsd audacious curl debug eve hddtemp imlib iostats lua lua-cairo lua-imlib math moc mpd nano-syntax ncurses nvidia +portmon rss thinkpad truetype vim-syntax weather-metar weather-xoap wifi X xmms2" + +DEPEND_COMMON=" + X? ( + imlib? ( media-libs/imlib2 ) + lua-cairo? ( >=dev-lua/toluapp-1.0.93 x11-libs/cairo[X] ) + lua-imlib? ( >=dev-lua/toluapp-1.0.93 media-libs/imlib2 ) + nvidia? ( media-video/nvidia-settings ) + truetype? ( x11-libs/libXft >=media-libs/freetype-2 ) + x11-libs/libX11 + x11-libs/libXdamage + x11-libs/libXext + audacious? ( >=media-sound/audacious-1.5 dev-libs/glib ) + xmms2? ( media-sound/xmms2 ) + ) + curl? ( net-misc/curl ) + eve? ( net-misc/curl dev-libs/libxml2 ) + portmon? ( dev-libs/glib ) + lua? ( >=dev-lang/lua-5.1 ) + ncurses? ( sys-libs/ncurses ) + rss? ( dev-libs/libxml2 net-misc/curl dev-libs/glib ) + wifi? ( net-wireless/wireless-tools ) + weather-metar? ( net-misc/curl ) + weather-xoap? ( dev-libs/libxml2 net-misc/curl ) + virtual/libiconv + " +RDEPEND=" + ${DEPEND_COMMON} + apcupsd? ( sys-power/apcupsd ) + hddtemp? ( app-admin/hddtemp ) + moc? ( media-sound/moc ) + nano-syntax? ( app-editors/nano ) + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) ) + " +DEPEND=" + ${DEPEND_COMMON} + dev-util/pkgconfig + " + +src_prepare() { + epatch "${FILESDIR}/${P}-nvidia-x.patch" + epatch "${FILESDIR}/${P}-xmms2.patch" + epatch "${FILESDIR}/${P}-secunia-SA43225.patch" + epatch "${FILESDIR}/${P}-acpitemp.patch" +} + +src_configure() { + local myconf + + if use X; then + myconf="--enable-x11 --enable-double-buffer --enable-xdamage" + myconf="${myconf} --enable-argb --enable-own-window" + myconf="${myconf} $(use_enable imlib imlib2) $(use_enable lua-cairo)" + myconf="${myconf} $(use_enable lua-imlib lua-imlib2)" + myconf="${myconf} $(use_enable nvidia) $(use_enable truetype xft)" + myconf="${myconf} $(use_enable audacious) $(use_enable xmms2)" + else + myconf="--disable-x11 --disable-own-window --disable-argb" + myconf="${myconf} --disable-lua-cairo --disable-nvidia --disable-xft" + myconf="${myconf} --disable-audacious --disable-xmms2" + fi + + econf \ + ${myconf} \ + $(use_enable apcupsd) \ + $(use_enable curl) \ + $(use_enable debug) \ + $(use_enable eve) \ + $(use_enable hddtemp) \ + $(use_enable iostats) \ + $(use_enable lua) \ + $(use_enable thinkpad ibm) \ + $(use_enable math) \ + $(use_enable moc) \ + $(use_enable mpd) \ + $(use_enable ncurses) \ + $(use_enable portmon) \ + $(use_enable rss) \ + $(use_enable weather-metar) \ + $(use_enable weather-xoap) \ + $(use_enable wifi wlan) +} + +src_install() { + emake DESTDIR="${D}" install || die + dodoc ChangeLog AUTHORS TODO || die + dohtml doc/docs.html doc/config_settings.html doc/variables.html || die + + if use vim-syntax; then + insinto /usr/share/vim/vimfiles/ftdetect + doins "${S}"/extras/vim/ftdetect/conkyrc.vim || die + + insinto /usr/share/vim/vimfiles/syntax + doins "${S}"/extras/vim/syntax/conkyrc.vim || die + fi + + if use nano-syntax; then + insinto /usr/share/nano/ + doins "${S}"/extras/nano/conky.nanorc || die + fi +} + +pkg_postinst() { + elog "You can find a sample configuration file at ${ROOT%/}/etc/conky/conky.conf." + elog "To customize, copy it to ~/.conkyrc and edit it to your liking." + elog + elog "For more info on Conky's features please look at the Changelog in" + elog "${ROOT%/}/usr/share/doc/${PF}. There are also pretty html docs available" + elog "on Conky's site or in ${ROOT%/}/usr/share/doc/${PF}/html." + elog + elog "Also see http://www.gentoo.org/doc/en/conky-howto.xml" + elog +} diff --git a/app-admin/conky/files/conky-1.8.1-acpitemp.patch b/app-admin/conky/files/conky-1.8.1-acpitemp.patch new file mode 100644 index 000000000000..9632b99ef5ab --- /dev/null +++ b/app-admin/conky/files/conky-1.8.1-acpitemp.patch @@ -0,0 +1,81 @@ +From 1b90218c339467770254aba03e3f0a3acc4af4b0 Mon Sep 17 00:00:00 2001 +From: Nikolas Garofil <nikolas@garofil.be> +Date: Wed, 10 Nov 2010 18:22:22 +0100 +Subject: [PATCH] Let $acpitemp use /sys instead of /proc + +From the 2.6.36 changelog (http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.36): +Mark the ACPI thermal procfs I/F deprecated, because /sys/class/thermal/ is already available and has been working for years w/o any problem. +The ACPI thermal procfs I/F will be removed in 2.6.37 +--- + src/linux.cc | 26 ++++++++++++-------------- + 1 files changed, 12 insertions(+), 14 deletions(-) + +diff --git a/src/linux.cc b/src/linux.cc +index ae97f48..bfb0063 100644 +--- a/src/linux.c ++++ b/src/linux.c +@@ -1449,26 +1449,20 @@ critical (S5): 73 C + passive: 73 C: tc1=4 tc2=3 tsp=40 devices=0xcdf6e6c0 + */ + +-#define ACPI_THERMAL_DIR "/proc/acpi/thermal_zone/" +-#define ACPI_THERMAL_FORMAT "/proc/acpi/thermal_zone/%s/temperature" ++#define ACPI_THERMAL_ZONE_DEFAULT "thermal_zone0" ++#define ACPI_THERMAL_FORMAT "/sys/class/thermal/%s/temp" + + int open_acpi_temperature(const char *name) + { + char path[256]; +- char buf[256]; + int fd; + + if (name == NULL || strcmp(name, "*") == 0) { +- static int rep = 0; +- +- if (!get_first_file_in_a_directory(ACPI_THERMAL_DIR, buf, &rep)) { +- return -1; +- } +- name = buf; ++ snprintf(path, 255, ACPI_THERMAL_FORMAT, ACPI_THERMAL_ZONE_DEFAULT); ++ } else { ++ snprintf(path, 255, ACPI_THERMAL_FORMAT, name); + } + +- snprintf(path, 255, ACPI_THERMAL_FORMAT, name); +- + fd = open(path, O_RDONLY); + if (fd < 0) { + NORM_ERR("can't open '%s': %s", path, strerror(errno)); +@@ -1480,6 +1474,9 @@ int open_acpi_temperature(const char *name) + static double last_acpi_temp; + static double last_acpi_temp_time; + ++//the maximum length of the string inside a ACPI_THERMAL_FORMAT file including the ending 0 ++#define MAXTHERMZONELEN 6 ++ + double get_acpi_temperature(int fd) + { + if (fd <= 0) { +@@ -1497,15 +1494,16 @@ double get_acpi_temperature(int fd) + + /* read */ + { +- char buf[256]; ++ char buf[MAXTHERMZONELEN]; + int n; + +- n = read(fd, buf, 255); ++ n = read(fd, buf, MAXTHERMZONELEN-1); + if (n < 0) { + NORM_ERR("can't read fd %d: %s", fd, strerror(errno)); + } else { + buf[n] = '\0'; +- sscanf(buf, "temperature: %lf", &last_acpi_temp); ++ sscanf(buf, "%lf", &last_acpi_temp); ++ last_acpi_temp /= 1000; + } + } + +-- +1.7.0.4 + diff --git a/app-admin/conky/files/conky-1.8.1-secunia-SA43225.patch b/app-admin/conky/files/conky-1.8.1-secunia-SA43225.patch new file mode 100644 index 000000000000..afa33211f872 --- /dev/null +++ b/app-admin/conky/files/conky-1.8.1-secunia-SA43225.patch @@ -0,0 +1,26 @@ +From ac4a3682aecb9d6466fea4aebb183b5f8f632905 Mon Sep 17 00:00:00 2001 +From: Nikolas Garofil <nikolas@garofil.be> +Date: Thu, 10 Feb 2011 16:20:06 +0100 +Subject: [PATCH] Fix security bug in 's getSkillname + +--- + src/eve.cc | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/src/eve.cc b/src/eve.cc +index 187a5f4..29b8c45 100644 +--- a/src/eve.c ++++ b/src/eve.c +@@ -285,7 +285,8 @@ static char *getSkillname(const char *file, int skillid) + + if (!file_exists(file)) { + skilltree = getXmlFromAPI(NULL, NULL, NULL, EVEURL_SKILLTREE); +- writeSkilltree(skilltree, file); ++//2x file_exits() so that someone (malicious?) couldn't create it during during the previous call ++ if (!file_exists(file)) writeSkilltree(skilltree, file); + free(skilltree); + } + +-- +1.7.0.4 + |