diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-irc/bip/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-irc/bip/files')
-rw-r--r-- | net-irc/bip/files/bip-0.8.8-configure.patch | 50 | ||||
-rw-r--r-- | net-irc/bip/files/bip-CVE-2012-0806.patch | 121 | ||||
-rw-r--r-- | net-irc/bip/files/bip-freenode.patch | 18 | ||||
-rw-r--r-- | net-irc/bip/files/bip.vim | 5 |
4 files changed, 194 insertions, 0 deletions
diff --git a/net-irc/bip/files/bip-0.8.8-configure.patch b/net-irc/bip/files/bip-0.8.8-configure.patch new file mode 100644 index 00000000000..592bdc66456 --- /dev/null +++ b/net-irc/bip/files/bip-0.8.8-configure.patch @@ -0,0 +1,50 @@ +commit 559fa7ed44238e811ac0c11321ed021c35cba2be +Author: Pierre-Louis Bonicoli <pierre-louis.bonicoli@gmx.fr> +Date: Wed Sep 14 06:30:09 2011 +0200 + + don't override user var. Thanks to Alex Legler + + Based on gentoo-x86/net-irc/bip/files/bip-configure.patch + See http://www.gnu.org/software/autoconf/manual/automake.html#User-Variables + If user doesn't specify CFLAGS, default value is "-Wall -Wextra -g -O2". + +diff --git a/Makefile.am b/Makefile.am +index c2dae4d..f17c314 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -13,13 +13,8 @@ src_bip_SOURCES = src/conf.y src/lex.l \ + src_bipmkpw_SOURCES = src/bipmkpw.c src/md5.c src/util.c + AM_YFLAGS= -d + BUILT_SOURCES = src/conf.c src/conf.h src/lex.c +-if DEBUG +- AM_CFLAGS+=-Wall -g +- AM_LDFLAGS+=-g +-else +- AM_CFLAGS+=-Wall +-endif + ++AM_CFLAGS=-Wall -Wextra + + dist_man_MANS = bip.1 bip.conf.5 bipmkpw.1 + +diff --git a/configure.ac b/configure.ac +index 005e697..5740a39 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -44,16 +44,12 @@ AC_ARG_ENABLE([pie], AS_HELP_STRING([--disable-pie], [Do not build a position in + + AM_CONDITIONAL(DEBUG, test x$enable_debug = xyes) + AS_IF([test "x$enable_debug" = "xyes"], [ +- CFLAGS="-O0 -g -W -Wall" +- LDFLAGS="-g" + AC_CHECK_FUNC(backtrace_symbols_fd, [ + AC_DEFINE(HAVE_BACKTRACE, [], [Use glibc backtrace on fatal()]) + LDFLAGS="-rdynamic $LDFLAGS" + backtrace="(with backtrace)" + ]) + ], [ +- CFLAGS="-O2 -g -W -Wall" +- LDFLAGS="-g" + enable_debug=no + ]) + diff --git a/net-irc/bip/files/bip-CVE-2012-0806.patch b/net-irc/bip/files/bip-CVE-2012-0806.patch new file mode 100644 index 00000000000..6ea26aead2b --- /dev/null +++ b/net-irc/bip/files/bip-CVE-2012-0806.patch @@ -0,0 +1,121 @@ +commit 222a33cb84a2e52ad55a88900b7895bf9dd0262c +Author: Pierre-Louis Bonicoli <pierre-louis.bonicoli@gmx.fr> +Date: Sat Jan 7 11:41:02 2012 +0100 + + Buffer Overflow: check against the implicit size of select() arrays + + Reported by Julien Tinnes (Fix #269) + exit is called when the listening socket can not be created + +diff --git a/src/bip.c b/src/bip.c +index d46ee2b..b4ac706 100644 +--- a/src/bip.c ++++ b/src/bip.c +@@ -1311,7 +1311,7 @@ int main(int argc, char **argv) + close(fd); + + bip.listener = listen_new(conf_ip, conf_port, conf_css); +- if (!bip.listener) ++ if (!bip.listener || bip.listener->connected == CONN_ERROR) + fatal("Could not create listening socket"); + + for (;;) { +diff --git a/src/connection.c b/src/connection.c +index 07ab431..5c4c24a 100644 +--- a/src/connection.c ++++ b/src/connection.c +@@ -124,6 +124,18 @@ static void connect_trynext(connection_t *cn) + continue; + } + ++ if (cn->handle >= FD_SETSIZE) { ++ mylog(LOG_WARN, "too many fd used, close socket %d", ++ cn->handle); ++ ++ if (close(cn->handle) == -1) ++ mylog(LOG_WARN, "Error on socket close: %s", ++ strerror(errno)); ++ ++ cn->handle = -1; ++ break; ++ } ++ + socket_set_nonblock(cn->handle); + + if (cn->connecting_data->src) { +@@ -789,13 +801,8 @@ list_t *wait_event(list_t *cn_list, int *msec, int *nc) + /* + * This shouldn't happen ! just in case... + */ +- if (cn->handle < 0) { +- mylog(LOG_WARN, "wait_event invalid socket %d", +- cn->handle); +- if (cn_is_connected(cn)) +- cn->connected = CONN_ERROR; +- continue; +- } ++ if (cn->handle < 0 || cn->handle >= FD_SETSIZE) ++ fatal("wait_event invalid socket %d", cn->handle); + + /* exceptions are OOB and disconnections */ + FD_SET(cn->handle, &fds_except); +@@ -966,6 +973,18 @@ static void create_listening_socket(char *hostname, char *port, + continue; + } + ++ if (cn->handle >= FD_SETSIZE) { ++ mylog(LOG_WARN, "too many fd used, close listening socket %d", ++ cn->handle); ++ ++ if (close(cn->handle) == -1) ++ mylog(LOG_WARN, "Error on socket close: %s", ++ strerror(errno)); ++ ++ cn->handle = -1; ++ break; ++ } ++ + if (setsockopt(cn->handle, SOL_SOCKET, SO_REUSEADDR, + (char *)&multi_client, + sizeof(multi_client)) < 0) { +@@ -1113,10 +1132,21 @@ connection_t *accept_new(connection_t *cn) + + mylog(LOG_DEBUG, "Trying to accept new client on %d", cn->handle); + err = accept(cn->handle, &sa, &sa_len); ++ + if (err < 0) { +- mylog(LOG_ERROR, "accept failed: %s", strerror(errno)); ++ fatal("accept failed: %s", strerror(errno)); ++ } ++ ++ if (err >= FD_SETSIZE) { ++ mylog(LOG_WARN, "too many client connected, close %d", err); ++ ++ if (close(err) == -1) ++ mylog(LOG_WARN, "Error on socket close: %s", ++ strerror(errno)); ++ + return NULL; + } ++ + socket_set_nonblock(err); + + conn = connection_init(cn->anti_flood, cn->ssl, cn->timeout, 0); +diff --git a/src/irc.c b/src/irc.c +index ebc1b34..147a315 100644 +--- a/src/irc.c ++++ b/src/irc.c +@@ -2439,9 +2439,10 @@ void bip_on_event(bip_t *bip, connection_t *conn) + + if (conn == bip->listener) { + struct link_client *n = irc_accept_new(conn); +- assert(n); +- list_add_last(&bip->conn_list, CONN(n)); +- list_add_last(&bip->connecting_client_list, n); ++ if (n) { ++ list_add_last(&bip->conn_list, CONN(n)); ++ list_add_last(&bip->connecting_client_list, n); ++ } + return; + } + diff --git a/net-irc/bip/files/bip-freenode.patch b/net-irc/bip/files/bip-freenode.patch new file mode 100644 index 00000000000..437da08f438 --- /dev/null +++ b/net-irc/bip/files/bip-freenode.patch @@ -0,0 +1,18 @@ +Freenode's ircd-seven uses a custom banlist type for mutes (+q). +This patch makes bip handle +q the same way as +q. +Without it, a user wouldn't get the banlist replies for mutes. + +diff --git a/src/irc.c b/src/irc.c +index 556bf97..a5cc039 100644 +--- a/src/irc.c ++++ b/src/irc.c +@@ -944,7 +947,8 @@ static int irc_cli_mode(struct link_client *ic, struct line *line) + + /* This is a wild guess and that sucks. */ + if (!irc_line_elem_equals(line, 0, "MODE") || +- strchr(irc_line_elem(line, 2), 'b') == NULL) ++ (strchr(irc_line_elem(line, 2), 'b') == NULL && ++ strchr(irc_line_elem(line, 2), 'q') == NULL)) + return OK_COPY; + + ++ic->who_count; diff --git a/net-irc/bip/files/bip.vim b/net-irc/bip/files/bip.vim new file mode 100644 index 00000000000..b99ad1b088e --- /dev/null +++ b/net-irc/bip/files/bip.vim @@ -0,0 +1,5 @@ +" Vim filetype detection file for bip config files +" +" $Id$ + +au BufNewFile,BufRead bip.conf set filetype=bip |