summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Alexander <wired@gentoo.org>2013-05-28 14:27:49 +0000
committerAlex Alexander <wired@gentoo.org>2013-05-28 14:27:49 +0000
commit8ff2a1cc5f8a0d6115ac96222333f2c42f3fa9e6 (patch)
tree5b99cf32747c607902216195cbbed1ccf6d2d3bc /net-irc
parentOld. (diff)
downloadgentoo-2-8ff2a1cc5f8a0d6115ac96222333f2c42f3fa9e6.tar.gz
gentoo-2-8ff2a1cc5f8a0d6115ac96222333f2c42f3fa9e6.tar.bz2
gentoo-2-8ff2a1cc5f8a0d6115ac96222333f2c42f3fa9e6.zip
added fix for a NULL pointer dereference in webadmin. removed old patches.
(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key EB9B4AFA)
Diffstat (limited to 'net-irc')
-rw-r--r--net-irc/znc/ChangeLog12
-rw-r--r--net-irc/znc/files/znc-0.096-clearbuffersonmsg-fix.patch42
-rw-r--r--net-irc/znc/files/znc-0.098-modpython-as-needed.patch22
-rw-r--r--net-irc/znc/files/znc-0.200-segfault-fix.patch28
-rw-r--r--net-irc/znc/files/znc-0.202-bouncedcc-dos-fix.patch27
-rw-r--r--net-irc/znc/files/znc-1.0-webadmin-null-pointer-dereference-fix.patch41
-rw-r--r--net-irc/znc/znc-1.0-r2.ebuild150
7 files changed, 202 insertions, 120 deletions
diff --git a/net-irc/znc/ChangeLog b/net-irc/znc/ChangeLog
index 971a35b1e251..2270c24f7306 100644
--- a/net-irc/znc/ChangeLog
+++ b/net-irc/znc/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for net-irc/znc
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/znc/ChangeLog,v 1.65 2013/05/03 04:15:05 wired Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-irc/znc/ChangeLog,v 1.66 2013/05/28 14:27:49 wired Exp $
+
+*znc-1.0-r2 (28 May 2013)
+
+ 28 May 2013; Alex Alexander <wired@gentoo.org> +znc-1.0-r2.ebuild,
+ -files/znc-0.096-clearbuffersonmsg-fix.patch,
+ -files/znc-0.098-modpython-as-needed.patch,
+ -files/znc-0.200-segfault-fix.patch,
+ -files/znc-0.202-bouncedcc-dos-fix.patch,
+ +files/znc-1.0-webadmin-null-pointer-dereference-fix.patch:
+ added fix for a NULL pointer dereference in webadmin. removed old patches.
03 May 2013; Alex Alexander <wired@gentoo.org> -znc-0.094.ebuild,
-znc-0.202-r1.ebuild, -znc-0.204.ebuild, -znc-0.206.ebuild, metadata.xml:
diff --git a/net-irc/znc/files/znc-0.096-clearbuffersonmsg-fix.patch b/net-irc/znc/files/znc-0.096-clearbuffersonmsg-fix.patch
deleted file mode 100644
index 23a8384ee0ca..000000000000
--- a/net-irc/znc/files/znc-0.096-clearbuffersonmsg-fix.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From ddd302fbf549bac9cbd9b6675b145ddf0a802aa7 Mon Sep 17 00:00:00 2001
-From: cflakes <cflakes@726aef4b-f618-498e-8847-2d620e286838>
-Date: Sun, 23 Jan 2011 21:12:12 +0000
-Subject: [PATCH] clearbuffersonmsg module in znc-extra: removed OnUserJoin and OnClientLogin hooks. This means that those events will no longer clear the buffer and thereby make the module more useful. You can now e.g. use it to get all the benefits of KeepBuffer = true, but still have the buffer cleared whenever you do something (we assume that doing something means you have read all previous messages).
-
-https://github.com/znc/znc/commit/ddd302fbf549bac9cbd9b6675b145ddf0a802aa7
----
- modules/extra/clearbufferonmsg.cpp | 11 -----------
- 1 files changed, 0 insertions(+), 11 deletions(-)
-
-diff --git a/modules/extra/clearbufferonmsg.cpp b/modules/extra/clearbufferonmsg.cpp
-index f0248b9..5ed6be7 100644
---- a/modules/extra/clearbufferonmsg.cpp
-+++ b/modules/extra/clearbufferonmsg.cpp
-@@ -51,11 +51,6 @@ public:
- return CONTINUE;
- }
-
-- virtual EModRet OnUserJoin(CString& sChannel, CString& sKey) {
-- ClearAllBuffers();
-- return CONTINUE;
-- }
--
- virtual EModRet OnUserPart(CString& sChannel, CString& sMessage) {
- ClearAllBuffers();
- return CONTINUE;
-@@ -65,12 +60,6 @@ public:
- ClearAllBuffers();
- return CONTINUE;
- }
--
-- virtual void OnClientLogin() {
-- ClearAllBuffers();
-- }
--
-- // No OnClientDisconnect(), disconnect could be coming from e.g. a timeout
- };
-
- MODULEDEFS(CClearBufferOnMsgMod, "Clear all channel buffers whenever the user does something")
---
-1.7.0.2
-
diff --git a/net-irc/znc/files/znc-0.098-modpython-as-needed.patch b/net-irc/znc/files/znc-0.098-modpython-as-needed.patch
deleted file mode 100644
index 02e983ed34c0..000000000000
--- a/net-irc/znc/files/znc-0.098-modpython-as-needed.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-fix modpython compilation with forced --as-needed
-
---- znc-0.098-orig/modules/modpython/Makefile.inc
-+++ znc-0.098/modules/modpython/Makefile.inc
-@@ -1,7 +1,7 @@
- # vim: filetype=make
-
- ifneq "$(PYCFG)" ""
--PYTHONCOMMON := $(shell $(PYCFG) --includes) $(shell $(PYCFG) --ldflags)
-+PYTHONCOMMON := $(shell $(PYCFG) --includes)
- PYTHONCOMMON += -DSWIG_TYPE_TABLE=znc
- PYTHONCOMMON += -Wno-missing-field-initializers -Wno-unused -Wno-shadow
- PYTHONCOMMON += -Wno-missing-declarations -Wno-uninitialized
-@@ -56,7 +56,7 @@
-
- modpython/compiler: modpython/compiler.cpp Makefile
- $(E) Building optimizer for python files...
-- $(Q)$(CXX) $(PYTHONCOMMON) -o $@ $<
-+ $(Q)$(CXX) $(PYTHONCOMMON) -o $@ $< $(shell $(PYCFG) --ldflags)
-
- modpython_install: create_install_dir install_metadirs modpython_all
- -for i in *.pyc; do \
diff --git a/net-irc/znc/files/znc-0.200-segfault-fix.patch b/net-irc/znc/files/znc-0.200-segfault-fix.patch
deleted file mode 100644
index 42ea7859ea13..000000000000
--- a/net-irc/znc/files/znc-0.200-segfault-fix.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From c6b74fa29d709c545e90ac0f8a254d78ba9fe7b2 Mon Sep 17 00:00:00 2001
-From: Kyle Fuller <inbox@kylefuller.co.uk>
-Date: Sun, 4 Sep 2011 19:18:26 +0000
-Subject: [PATCH] Fix CChan::TrimBuffer() (#63)
-
-CChan::TrimBuffer() was trying to do "m_vsBuffer.begin() + -<some number>" which would cause a segmentation fault
-
-Fixes #63
----
- Chan.cpp | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/Chan.cpp b/Chan.cpp
-index b6eb9d4..31e74c0 100644
---- a/Chan.cpp
-+++ b/Chan.cpp
-@@ -535,7 +535,7 @@ void CChan::ClearBuffer() {
-
- void CChan::TrimBuffer(const unsigned int uMax) {
- if (m_vsBuffer.size() > uMax) {
-- m_vsBuffer.erase(m_vsBuffer.begin(), m_vsBuffer.begin() + (uMax - m_vsBuffer.size()));
-+ m_vsBuffer.erase(m_vsBuffer.begin(), m_vsBuffer.begin() + (m_vsBuffer.size() - uMax));
- }
- }
-
---
-1.7.5.4
-
diff --git a/net-irc/znc/files/znc-0.202-bouncedcc-dos-fix.patch b/net-irc/znc/files/znc-0.202-bouncedcc-dos-fix.patch
deleted file mode 100644
index 090932e927a5..000000000000
--- a/net-irc/znc/files/znc-0.202-bouncedcc-dos-fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-# Fix crash in bouncedcc module.
-# It happens when DCC RESUME is received.
-# Affected ZNC versions: 0.200, 0.202.
-
-https://bugs.gentoo.org/show_bug.cgi?id=398159
-
-diff -Naur znc-0.202.orig/modules/bouncedcc.cpp znc-0.202/modules/bouncedcc.cpp
---- znc-0.202.orig/modules/bouncedcc.cpp 2011-09-21 22:20:19.000000000 +0200
-+++ znc-0.202/modules/bouncedcc.cpp 2012-01-07 14:47:20.436704782 +0100
-@@ -238,7 +238,7 @@
- CDCCBounce* pSock = (CDCCBounce*) *it;
-
- if (pSock->GetLocalPort() == uResumePort) {
-- m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + m_pClient->GetNick() + " :\001DCC " + sType + " " + sFile + " " + CString(pSock->GetUserPort()) + " " + sMessage.Token(4) + "\001");
-+ m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + m_pUser->GetNick() + " :\001DCC " + sType + " " + sFile + " " + CString(pSock->GetUserPort()) + " " + sMessage.Token(4) + "\001");
- }
- }
- } else if (sType.Equals("ACCEPT")) {
-@@ -248,7 +248,7 @@
- CDCCBounce* pSock = (CDCCBounce*) *it;
-
- if (pSock->GetUserPort() == sMessage.Token(3).ToUShort()) {
-- m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + m_pClient->GetNick() + " :\001DCC " + sType + " " + sFile + " " + CString(pSock->GetLocalPort()) + " " + sMessage.Token(4) + "\001");
-+ m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + m_pUser->GetNick() + " :\001DCC " + sType + " " + sFile + " " + CString(pSock->GetLocalPort()) + " " + sMessage.Token(4) + "\001");
- }
- }
- }
diff --git a/net-irc/znc/files/znc-1.0-webadmin-null-pointer-dereference-fix.patch b/net-irc/znc/files/znc-1.0-webadmin-null-pointer-dereference-fix.patch
new file mode 100644
index 000000000000..c46aa6abf9bb
--- /dev/null
+++ b/net-irc/znc/files/znc-1.0-webadmin-null-pointer-dereference-fix.patch
@@ -0,0 +1,41 @@
+Fix NULL pointer dereference in webadmin.
+
+https://github.com/znc/znc/commit/2bd410ee5570cea127233f1133ea22f25174eb28
+--- modules/webadmin.cpp
++++ modules/webadmin.cpp
+@@ -404,7 +426,7 @@
+ CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
+
+ // Admin||Self Check
+- if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) {
++ if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) {
+ return false;
+ }
+
+@@ -433,7 +455,7 @@
+ CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
+
+ // Admin||Self Check
+- if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) {
++ if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) {
+ return false;
+ }
+
+@@ -457,7 +479,7 @@
+ CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
+
+ // Admin||Self Check
+- if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) {
++ if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) {
+ return false;
+ }
+
+@@ -471,7 +493,7 @@
+ CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
+
+ // Admin||Self Check
+- if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) {
++ if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) {
+ return false;
+ }
+
diff --git a/net-irc/znc/znc-1.0-r2.ebuild b/net-irc/znc/znc-1.0-r2.ebuild
new file mode 100644
index 000000000000..0c449f689f2e
--- /dev/null
+++ b/net-irc/znc/znc-1.0-r2.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-irc/znc/znc-1.0-r2.ebuild,v 1.1 2013/05/28 14:27:49 wired Exp $
+
+EAPI=5
+
+PYTHON_DEPEND="python? 3"
+inherit base python user
+
+MY_PV=${PV/_/-}
+DESCRIPTION="An advanced IRC Bouncer"
+HOMEPAGE="http://znc.in"
+SRC_URI="http://znc.in/releases/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="daemon debug ipv6 perl python ssl sasl tcl"
+
+RDEPEND="
+ perl? ( >=dev-lang/perl-5.10 )
+ sasl? ( >=dev-libs/cyrus-sasl-2 )
+ ssl? ( >=dev-libs/openssl-0.9.7d )
+ tcl? ( dev-lang/tcl )
+"
+DEPEND="
+ virtual/pkgconfig
+ perl? ( dev-lang/swig )
+ python? (
+ >=dev-lang/swig-2.0.2
+ >=dev-lang/perl-5.10
+ )
+ ${RDEPEND}
+"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+PATCHES=(
+ "${FILESDIR}/${P}-systemwideconfig.patch"
+ "${FILESDIR}/${P}-webadmin-null-pointer-dereference-fix.patch"
+)
+
+CONFDIR="/var/lib/znc"
+
+pkg_setup() {
+ if use python; then
+ python_set_active_version 3
+ python_pkg_setup
+ fi
+ if use daemon; then
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /dev/null ${PN}
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_enable perl) \
+ $(use python && echo "--enable-python=python-$(python_get_version)") \
+ $(use_enable sasl cyrus) \
+ $(use_enable ssl openssl) \
+ $(use_enable tcl tcl)
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+ dodoc AUTHORS README.md
+ if use daemon; then
+ newinitd "${FILESDIR}"/znc.initd znc
+ newconfd "${FILESDIR}"/znc.confd znc
+ fi
+}
+
+pkg_postinst() {
+ if use !daemon; then
+ elog
+ elog "Run 'znc --makeconf' as the user you want to run ZNC as"
+ elog "to make a configuration file"
+ elog "If you are using SSL you should also run 'znc --makepem'"
+ elog
+ else
+ elog
+ elog "An init-script was installed in /etc/init.d"
+ elog "A config file was installed in /etc/conf.d"
+ if [[ ! -d "${EROOT}${CONFDIR}" ]]; then
+ elog
+ elog "Run 'emerge --config znc' to configure ZNC"
+ elog "as a system-wide daemon."
+ elog
+ elog "If you are using SSL you should also run:"
+ elog " znc --system-wide-config-as znc --makepem -d ${CONFDIR}"
+ elog "as root"
+ elog
+ elog "If migrating from a user-based install"
+ elog "you can use your existing config files:"
+ elog " mkdir ${CONFDIR}"
+ elog " mv /home/\$USER/.znc/* ${CONFDIR}"
+ elog " rm -rf /home/\$USER/.znc"
+ elog " chown -R znc:znc ${CONFDIR}"
+ elog
+ elog "If you already have znc set up and want take advantage of the"
+ elog "init script but skip of all the above, you can also edit"
+ elog " /etc/conf.d/znc"
+ elog "and adjust the variables to your current znc user and config"
+ elog "location."
+ if [[ -d "${EROOT}"/etc/znc ]]; then
+ elog
+ ewarn "/etc/znc exists on your system."
+ ewarn "Due to the nature of the contents of that folder,"
+ ewarn "we have changed the default configuration to use"
+ ewarn " /var/lib/znc"
+ ewarn "please move /etc/znc to /var/lib/znc"
+ ewarn "or adjust /etc/conf.d/znc"
+ fi
+ else
+ elog "Existing config detected in ${CONFDIR}"
+ elog "You're good to go :)"
+ fi
+ elog
+ fi
+}
+
+pkg_config() {
+ if use daemon && ! [[ -d "${EROOT}${CONFDIR}" ]]; then
+ einfo "Press ENTER to interactively create a new configuration file for znc."
+ einfo "To abort, press Control-C"
+ read
+ mkdir -p "${EROOT}${CONFDIR}" || die
+ chown -R ${PN}:${PN} "${EROOT}${CONFDIR}" ||
+ die "Setting permissions failed"
+ "${EROOT}"/usr/bin/znc --system-wide-config-as znc -c -r -d "${EROOT}${CONFDIR}" ||
+ die "Config failed"
+ echo
+ einfo "To start znc, run '/etc/init.d/znc start'"
+ einfo "or add znc to a runlevel:"
+ einfo " rc-update add znc default"
+ else
+ if use daemon; then
+ ewarn "${CONFDIR} already exists, aborting to avoid damaging"
+ ewarn "any existing configuration. If you are sure you want"
+ ewarn "to generate a new configuration, remove the folder"
+ ewarn "and try again."
+ else
+ ewarn "To configure znc as a system-wide daemon you have to"
+ ewarn "enable the 'daemon' use flag."
+ fi
+ fi
+}