aboutsummaryrefslogtreecommitdiffstats
path: root/main/dircproxy
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
commitb70981b68efcce5256eb11c6cd26ae123b10b6ea (patch)
treea38be6efae5e2ba15c2e839504632f9b7bfd5f91 /main/dircproxy
parent2b4df81538b8398442d5296650905c70341dd8d3 (diff)
downloadaports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.bz2
aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.xz
moved extra/* to main/
and fixed misc build issues
Diffstat (limited to 'main/dircproxy')
-rw-r--r--main/dircproxy/1.0.5-CVE-2007-5226.patch12
-rw-r--r--main/dircproxy/1.1.0-less-lag-on-attach.patch53
-rw-r--r--main/dircproxy/APKBUILD40
-rw-r--r--main/dircproxy/dircproxy-gcc4.patch47
4 files changed, 152 insertions, 0 deletions
diff --git a/main/dircproxy/1.0.5-CVE-2007-5226.patch b/main/dircproxy/1.0.5-CVE-2007-5226.patch
new file mode 100644
index 0000000000..1d9994228b
--- /dev/null
+++ b/main/dircproxy/1.0.5-CVE-2007-5226.patch
@@ -0,0 +1,12 @@
+diff -u dircproxy-1.0.5/src/irc_server.c dircproxy-1.0.5/src/irc_server.c
+--- dircproxy-1.0.5/src/irc_server.c
++++ dircproxy-1.0.5/src/irc_server.c
+@@ -1078,7 +1078,7 @@
+
+ if (!strcmp(cmsg.cmd, "ACTION")) {
+ if (p->conn_class->log_events & IRC_LOG_ACTION)
+- irclog_ctcp(p, msg.params[0], msg.src.orig, "%s", cmsg.orig);
++ irclog_ctcp(p, (msg.params != NULL ) ? msg.params[0]: "none", msg.src.orig, "%s", cmsg.orig);
+
+ } else if (!strcmp(cmsg.cmd, "DCC")
+ && p->conn_class->dcc_proxy_incoming) {
diff --git a/main/dircproxy/1.1.0-less-lag-on-attach.patch b/main/dircproxy/1.1.0-less-lag-on-attach.patch
new file mode 100644
index 0000000000..2eb3998db1
--- /dev/null
+++ b/main/dircproxy/1.1.0-less-lag-on-attach.patch
@@ -0,0 +1,53 @@
+--- a/src/irc_client.c 2005-01-06 02:48:12.964637427 +0100
++++ b/src/irc_client.c.lessflood 2005-01-06 02:47:50.433376383 +0100
+@@ -1910,13 +1910,34 @@
+ /* Recall channel log files, and get channel topic and members from server */
+ if (p->channels) {
+ struct ircchannel *c;
++ unsigned int cnames_length = 0;
++ char *cnames = 0;
++
++ c = p->channels;
++ while (c) {
++ if (!c->inactive && !c->unjoined) {
++ cnames_length += strlen(c->name) + 1; // +1 to hold comma
++ }
++
++ c = c->next;
++ }
++
++ if(cnames_length)
++ {
++ cnames = (char *)malloc(cnames_length + 1);
++ memset(cnames, 0, cnames_length + 1);
++ }
+
+ c = p->channels;
+ while (c) {
+ if (!c->inactive && !c->unjoined) {
+ ircclient_send_selfcmd(p, "JOIN", ":%s", c->name);
+- ircserver_send_command(p, "TOPIC", ":%s", c->name);
+- ircserver_send_command(p, "NAMES", ":%s", c->name);
++ if(cnames_length) {
++ if(c == p->channels) // first channel in list
++ sprintf(cnames, "%s", c->name);
++ else
++ sprintf(cnames, "%s,%s", cnames, c->name);
++ }
+
+ if (p->conn_class->chan_log_enabled) {
+ irclog_autorecall(p, c->name);
+@@ -1926,6 +1948,13 @@
+
+ c = c->next;
+ }
++
++ if(cnames_length)
++ {
++ ircserver_send_command(p, "TOPIC", ":%s", cnames);
++ ircserver_send_command(p, "NAMES", ":%s", cnames);
++ free(cnames);
++ }
+ }
+
+ /* Recall private log file */
diff --git a/main/dircproxy/APKBUILD b/main/dircproxy/APKBUILD
new file mode 100644
index 0000000000..becb8133ae
--- /dev/null
+++ b/main/dircproxy/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=dircproxy
+pkgver=1.1.0
+pkgrel=0
+pkgdesc="IRC proxy server designed for people who use IRC from lots of different workstations or clients"
+url="http://code.google.com/p/dircproxy/"
+license="GPL"
+depends=""
+makedepends=""
+install=
+subpackages="$pkgname-doc"
+source="http://dircproxy.googlecode.com/files/$pkgname-$pkgver.tar.gz
+ 1.0.5-CVE-2007-5226.patch
+ 1.1.0-less-lag-on-attach.patch
+ dircproxy-gcc4.patch
+ "
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ for i in ../*.patch; do
+ msg "Applying $i..."
+ patch -p1 -i $i || return 1
+ done
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+ make DESTDIR="$pkgdir" install
+
+ # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+md5sums="066bd39d80f286ae5ce69a2adbbd01e4 dircproxy-1.1.0.tar.gz
+fdd98d0bad6ef36afba7fa2604c43520 1.0.5-CVE-2007-5226.patch
+a83ab2a3bce526ba0d8f8a05c88f9a47 1.1.0-less-lag-on-attach.patch
+3b70d62b2eb88013548871e634e33c43 dircproxy-gcc4.patch"
diff --git a/main/dircproxy/dircproxy-gcc4.patch b/main/dircproxy/dircproxy-gcc4.patch
new file mode 100644
index 0000000000..727d8db2b4
--- /dev/null
+++ b/main/dircproxy/dircproxy-gcc4.patch
@@ -0,0 +1,47 @@
+--- a/src/dcc_net.c 2001-12-21 21:15:55.000000000 +0100
++++ b/src/dcc_net.c 2004-12-14 15:40:45.976549384 +0100
+@@ -364,7 +364,8 @@
+ n = p->next;
+ _dccnet_free(p);
+
+- p = (l ? l->next : proxies) = n;
++ if (l) l->next = n; else proxies = n;
++ p = n;
+ } else {
+ l = p;
+ p = p->next;
+diff -urN a/src/irc_server.c ./src/irc_server.c
+--- a/src/irc_server.c 2002-01-31 15:56:37.000000000 +0100
++++ b/src/irc_server.c 2004-12-14 15:39:49.163186328 +0100
+@@ -700,7 +700,8 @@
+ free(s);
+
+ /* Was in the squelch list, so remove it and stop looking */
+- s = (l ? l->next : p->squelch_modes) = n;
++ if (l) l->next = n; else p->squelch_modes = n;
++ s = n;
+ squelch = 1;
+ break;
+ } else {
+@@ -741,7 +742,8 @@
+ free(s);
+
+ /* Was in the squelch list, so remove it and stop looking */
+- s = (l ? l->next : p->squelch_modes) = n;
++ if (l) l->next = n; else p->squelch_modes = n;
++ s = n;
+ squelch = 1;
+ break;
+ } else {
+diff -urN ../tmp-orig/dircproxy-1.0.5/src/net.c ./src/net.c
+--- a/src/net.c 2002-01-01 18:55:23.000000000 +0100
++++ b/src/net.c 2004-12-14 15:41:43.499804520 +0100
+@@ -459,7 +459,7 @@
+ return 0;
+ }
+
+- l = &(buff == SB_IN ? s->in_buff_last : s->out_buff_last);
++ l = (buff == SB_IN) ? &s->in_buff_last : &s->out_buff_last;
+
+ /* Check whether we can just add to the existing buffer */
+ if ((mode == SM_RAW) && *l && ((*l)->mode == mode)) {