pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/chat/i2cbd RELRO and friends
details: https://anonhg.NetBSD.org/pkgsrc/rev/6576215b9e72
branches: trunk
changeset: 372599:6576215b9e72
user: spz <spz%pkgsrc.org@localhost>
date: Mon Dec 11 07:54:42 2017 +0000
description:
RELRO and friends
fix the issues found by -Wall
diffstat:
chat/i2cbd/Makefile | 4 +-
chat/i2cbd/distinfo | 19 +++++++++--
chat/i2cbd/patches/patch-aa | 4 +-
chat/i2cbd/patches/patch-ab | 17 ++++++---
chat/i2cbd/patches/patch-src_Makefile | 15 +++++++++
chat/i2cbd/patches/patch-src_access.c | 24 +++++++++++++-
chat/i2cbd/patches/patch-src_groups.c | 17 ++++++++++
chat/i2cbd/patches/patch-src_ipcf.c | 15 +++++++++
chat/i2cbd/patches/patch-src_main.c | 25 +++++++++++++++
chat/i2cbd/patches/patch-src_s__group.c | 48 ++++++++++++++++++++++++++++++
chat/i2cbd/patches/patch-src_s__user.c | 24 +++++++++++++++
chat/i2cbd/patches/patch-src_send.c | 15 +++++++++
chat/i2cbd/patches/patch-src_serverserve.c | 37 +++++++++++++++++++++++
chat/i2cbd/patches/patch-src_signals.c | 47 +++++++++++++++++++++++++++++
chat/i2cbd/patches/patch-util_Makefile | 15 +++++++++
15 files changed, 311 insertions(+), 15 deletions(-)
diffs (truncated from 428 to 300 lines):
diff -r 22a1db5fdac6 -r 6576215b9e72 chat/i2cbd/Makefile
--- a/chat/i2cbd/Makefile Sun Dec 10 22:51:05 2017 +0000
+++ b/chat/i2cbd/Makefile Mon Dec 11 07:54:42 2017 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.33 2017/01/19 18:52:03 agc Exp $
+# $NetBSD: Makefile,v 1.34 2017/12/11 07:54:42 spz Exp $
#
DISTNAME= i2cbd-2.0_BETA5
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= chat
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITES+= http://www.draga.com/~jwise/i2cb/
diff -r 22a1db5fdac6 -r 6576215b9e72 chat/i2cbd/distinfo
--- a/chat/i2cbd/distinfo Sun Dec 10 22:51:05 2017 +0000
+++ b/chat/i2cbd/distinfo Mon Dec 11 07:54:42 2017 +0000
@@ -1,11 +1,22 @@
-$NetBSD: distinfo,v 1.17 2015/11/22 17:17:32 dholland Exp $
+$NetBSD: distinfo,v 1.18 2017/12/11 07:54:42 spz Exp $
SHA1 (i2cbd-2.0_BETA5.tar.gz) = be219c5b6fa2413681214d756dee02c3cd252843
RMD160 (i2cbd-2.0_BETA5.tar.gz) = d48988fb175857370c2523c86e0e586decbe28ae
SHA512 (i2cbd-2.0_BETA5.tar.gz) = 8e13e005c46dfbb8a63a1269872270db03a0f1378a0cb14a879a8572583e47893047ebabd2e7391964d94ab9e5a4c89d88a3a5c5727195904fd0f5173b8e51b3
Size (i2cbd-2.0_BETA5.tar.gz) = 59158 bytes
-SHA1 (patch-aa) = 0151f8e68be11e759425d2e9569df3d465c50931
-SHA1 (patch-ab) = bca8ecb0f41be6405333f2bcf7722dc725ffc777
+SHA1 (patch-aa) = 0cf7ee306f19da66876ec8ebf2022468ded274a8
+SHA1 (patch-ab) = 77627f5771535862530f8a497a16e64bee19075f
SHA1 (patch-ac) = ca8e6b7324a22fb9ecabf2374e34febb55196e28
-SHA1 (patch-src_access.c) = 4762a7a050c811bb64cae8b2aabff9116cd25601
+SHA1 (patch-src_Makefile) = c4fb1672fd18c4ff8701a16ed3a023032c6e1991
+SHA1 (patch-src_access.c) = 59ff909eade534eca94a40163066e6812f699f8e
+SHA1 (patch-src_groups.c) = 989cb50a2917a370eda6c8ce2e5085253e24a5d1
+SHA1 (patch-src_ipcf.c) = 757b62b454dac6eb5c3335d4167e753734f03256
+SHA1 (patch-src_main.c) = d28d6d265860c5a47614ef690bc81420230f8627
+SHA1 (patch-src_s__group.c) = b16c754174884ea31f46dade9e7456d8fbb670b0
SHA1 (patch-src_s__info.c) = 5e13e0b8934f45beac84be459ca85d9d089a4d3f
+SHA1 (patch-src_s__user.c) = 8f6571192ca0cdcd6ac29498df2e0940b444d62b
+SHA1 (patch-src_send.c) = 8cc38335b56139220009dcfaf2dc567c1c86cffb
+SHA1 (patch-src_serverserve.c) = 3d68156b6b8c15debe8f13583ebaceedd648820e
+SHA1 (patch-src_signals.c) = 7aef0d213b9975bbe48bb523c6a1bc1b73289d6f
+SHA1 (patch-util_Makefile) = 18e8ae7816a2fac268966b4ac4aa3571022e5eb9
+SHA1 (patch-util_icbdb.c) = f249aa4f286fccaa292c30af290b2ad705972556
diff -r 22a1db5fdac6 -r 6576215b9e72 chat/i2cbd/patches/patch-aa
--- a/chat/i2cbd/patches/patch-aa Sun Dec 10 22:51:05 2017 +0000
+++ b/chat/i2cbd/patches/patch-aa Mon Dec 11 07:54:42 2017 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-aa,v 1.2 2003/07/29 16:25:56 jmmv Exp $
+$NetBSD: patch-aa,v 1.3 2017/12/11 07:54:42 spz Exp $
+
+pkgsrcify
--- config.h.orig Tue Oct 30 20:37:28 2001
+++ config.h
diff -r 22a1db5fdac6 -r 6576215b9e72 chat/i2cbd/patches/patch-ab
--- a/chat/i2cbd/patches/patch-ab Sun Dec 10 22:51:05 2017 +0000
+++ b/chat/i2cbd/patches/patch-ab Mon Dec 11 07:54:42 2017 +0000
@@ -1,6 +1,9 @@
-$NetBSD: patch-ab,v 1.4 2003/10/24 21:12:18 jwise Exp $
---- config.mk.orig Tue Oct 30 20:50:40 2001
-+++ config.mk Sat Aug 2 22:28:11 2003
+$NetBSD: patch-ab,v 1.5 2017/12/11 07:54:42 spz Exp $
+
+pkgsrcify
+
+--- config.mk.orig 2003-10-24 20:47:04.000000000 +0000
++++ config.mk
@@ -3,7 +3,6 @@
# For copying and distribution information, see the file COPYING.
#
@@ -9,12 +12,14 @@
BINDIR = ${PREFIX}/sbin
MANDIR = ${PREFIX}/man
MAN8DIR = ${PREFIX}/man/man8
-@@ -19,7 +18,7 @@
+@@ -19,8 +18,8 @@ EXTRAWARNS = -Wshadow -Wpointer-arith -W
# affect portability to some platforms. The others here are irrelevant.
BADWARNS = -Wwrite-strings -Wconversion -Waggregate-return -Wredundant-decls
DEBUG = -DDEBUG -DVERBOSE -g
-CFLAGS = ${WARNS} ${EXTRAWARNS} ${DEBUG}
-+CFLAGS = ${WARNS} ${EXTRAWARNS} ${DEBUG} -DPREFIX=\"${PREFIX}\" -DPKG_SYSCONFDIR=\"${PKG_SYSCONFDIR}\"
- LDFLAGS =
+-LDFLAGS =
++CFLAGS += ${WARNS} ${EXTRAWARNS} ${DEBUG} -DPREFIX=\"${PREFIX}\" -DPKG_SYSCONFDIR=\"${PKG_SYSCONFDIR}\"
++#LDFLAGS =
LIBS = -lutil
+ LINT = lint
diff -r 22a1db5fdac6 -r 6576215b9e72 chat/i2cbd/patches/patch-src_Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/i2cbd/patches/patch-src_Makefile Mon Dec 11 07:54:42 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Makefile,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+RELRO package
+
+--- src/Makefile.orig 2006-05-11 03:44:52.000000000 +0000
++++ src/Makefile
+@@ -91,7 +91,7 @@ all: icbd
+ icbd: $(OBJ)
+
+ icbd: $(OBJ)
+- $(CC) $(LDFLAGS) -o icbd $(OBJ) $(LIBS) $(OTHERLIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o icbd $(OBJ) $(LIBS) $(OTHERLIBS)
+
+ install: all
+ ${INSTALL} -c -s -m 0755 icbd $(BINDIR)/icbd
diff -r 22a1db5fdac6 -r 6576215b9e72 chat/i2cbd/patches/patch-src_access.c
--- a/chat/i2cbd/patches/patch-src_access.c Sun Dec 10 22:51:05 2017 +0000
+++ b/chat/i2cbd/patches/patch-src_access.c Mon Dec 11 07:54:42 2017 +0000
@@ -1,8 +1,10 @@
-$NetBSD: patch-src_access.c,v 1.2 2015/11/22 17:17:33 dholland Exp $
+$NetBSD: patch-src_access.c,v 1.3 2017/12/11 07:54:42 spz Exp $
Fix bounding errors detected by OpenBSD's compiler.
---- src/access.c~ 2006-05-11 03:44:52.000000000 +0000
+don't cut off realnames or passwords
+
+--- src/access.c.orig 2006-05-11 03:44:52.000000000 +0000
+++ src/access.c
@@ -341,7 +341,7 @@ nickreadmsg(int forWhom)
strncpy(from, data.data, data.size);
@@ -13,6 +15,24 @@
userdb->del(userdb, &key, 0);
snprintf(kbuf, KEY_SIZE, "%s.message%d", u_tab[forWhom].nickname, i);
+@@ -461,7 +461,7 @@ nickchpass(int forWhom, const char *oldp
+ strncpy(line, data.data, data.size);
+ line[data.size] = '\0';
+
+- if (strncmp(line, oldpw, MAX_PASSWDLEN)) {
++ if (strncmp(line, oldpw, MAX_PASSWDLEN+1)) {
+ snprintf(line, LINE_SIZE, "Authorization failure");
+ senderror(forWhom, line);
+ } else {
+@@ -522,7 +522,7 @@ nickwrite (int forWhom, const char *pass
+ snprintf(line, LINE_SIZE, "Nick registered");
+ sends_cmdout(forWhom, line);
+
+- strlcpy(u_tab[forWhom].realname, "registered", MAX_REALLEN);
++ strlcpy(u_tab[forWhom].realname, "registered", MAX_REALLEN+1);
+ strlcpy(u_tab[forWhom].password, password, MAX_PASSWDLEN+1);
+ nickwritetime(forWhom, 0);
+
@@ -581,7 +581,7 @@ nickwrite (int forWhom, const char *pass
snprintf(line, LINE_SIZE, "Nick registered");
sends_cmdout(forWhom, line);
diff -r 22a1db5fdac6 -r 6576215b9e72 chat/i2cbd/patches/patch-src_groups.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/i2cbd/patches/patch-src_groups.c Mon Dec 11 07:54:42 2017 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_groups.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+fix copy length
+
+--- src/groups.c.orig 2006-05-11 03:44:52.000000000 +0000
++++ src/groups.c
+@@ -168,8 +168,8 @@ check_mods(int u_index)
+ void
+ fill_group_entry(int n, char *name, char *topic, int visibility, int control, int mod, int volume)
+ {
+- strlcpy(g_tab[n].name, name, MAX_GROUPLEN);
+- strlcpy(g_tab[n].topic, topic, MAX_TOPICLEN);
++ strlcpy(g_tab[n].name, name, MAX_GROUPLEN+1);
++ strlcpy(g_tab[n].topic, topic, MAX_TOPICLEN+1);
+
+ g_tab[n].visibility = visibility;
+ g_tab[n].control = control;
diff -r 22a1db5fdac6 -r 6576215b9e72 chat/i2cbd/patches/patch-src_ipcf.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/i2cbd/patches/patch-src_ipcf.c Mon Dec 11 07:54:42 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_ipcf.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+fix copy length
+
+--- src/ipcf.c.orig 2006-05-11 03:44:52.000000000 +0000
++++ src/ipcf.c
+@@ -217,7 +217,7 @@ s_lost_user(int n)
+ snprintf(line, LINE_SIZE, "Your group moderator signed off. (%d second timeout)", (int) MOD_TIMEOUT);
+ s_status_group(2,0,was_mod, "Mod", line);
+ g_tab[was_mod].mod = -1;
+- strlcpy(g_tab[was_mod].missingmod, t_name, MAX_NICKLEN);
++ strlcpy(g_tab[was_mod].missingmod, t_name, MAX_NICKLEN+1);
+ TheTime = time(NULL);
+ g_tab[was_mod].modtimeout = TheTime + MOD_TIMEOUT;
+ }
diff -r 22a1db5fdac6 -r 6576215b9e72 chat/i2cbd/patches/patch-src_main.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/i2cbd/patches/patch-src_main.c Mon Dec 11 07:54:42 2017 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_main.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+fix daemon call
+fix copy length
+
+--- src/main.c.orig 2006-05-11 03:44:52.000000000 +0000
++++ src/main.c
+@@ -113,7 +113,7 @@ main (int argc, char **argv)
+ }
+
+ if (noforkflag == 0)
+- daemon(0,0);
++ daemon(1,0);
+
+ pidfile("icbd");
+
+@@ -132,7 +132,7 @@ main (int argc, char **argv)
+ u_tab[NICKSERV].login = 1;
+ u_tab[NICKSERV].t_on = TheTime;
+ u_tab[NICKSERV].t_recv = TheTime;
+- strlcpy(u_tab[NICKSERV].realname, "registered", MAX_NICKLEN);
++ strlcpy(u_tab[NICKSERV].realname, "registered", MAX_NICKLEN+1);
+ fill_group_entry(0, "ICB", "...here to serve you!", SUPERSECRET, RESTRICTED, NICKSERV, QUIET);
+ nickwritetime(NICKSERV, 0);
+
diff -r 22a1db5fdac6 -r 6576215b9e72 chat/i2cbd/patches/patch-src_s__group.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/i2cbd/patches/patch-src_s__group.c Mon Dec 11 07:54:42 2017 +0000
@@ -0,0 +1,48 @@
+$NetBSD: patch-src_s__group.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+fix copy lengths
+
+--- src/s_group.c.orig 2006-05-11 03:44:53.000000000 +0000
++++ src/s_group.c
+@@ -260,7 +260,7 @@ s_change(int n, int argc)
+ }
+ /* could create it, so fill in the info */
+ g_tab[ngi].visibility = visibility;
+- strlcpy(g_tab[ngi].name, n_g_n, MAX_GROUPLEN);
++ strlcpy(g_tab[ngi].name, n_g_n, MAX_GROUPLEN+1);
+ if (strcasecmp("1", n_g_n) != 0) {
+ g_tab[ngi].control = MODERATED;
+ g_tab[ngi].mod = n;
+@@ -326,7 +326,7 @@ s_change(int n, int argc)
+ /* is the new group different than the old group? */
+ if (ngi != ogi) {
+ /* the group exists and we are allowed in. */
+- strlcpy(u_tab[n].group, g_tab[ngi].name, MAX_GROUPLEN);
++ strlcpy(u_tab[n].group, g_tab[ngi].name, MAX_GROUPLEN+1);
+
+ /* tell the new group about the arrival */
+ snprintf(line, LINE_SIZE, "%s (%s@%s) entered group", u_tab[n].nickname,
+@@ -1056,7 +1056,7 @@ s_topic(int n, int argc)
+ return;
+ }
+
+- strlcpy(g_tab[t_group].topic,fields[1],MAX_TOPICLEN);
++ strlcpy(g_tab[t_group].topic,fields[1],MAX_TOPICLEN+1);
+ if (g_tab[t_group].volume != QUIET) {
+ snprintf(line, LINE_SIZE, "%s changed the topic to \"%s\"",
+ u_tab[n].nickname,
+@@ -1210,12 +1210,12 @@ set_name(int n, int group, char *name)
+ /* and change their group name entries */
+ for (i=0; i< MAX_REAL_USERS; i++) {
+ if (strcasecmp(u_tab[i].group, cp) == 0) {
+- strlcpy(u_tab[i].group, n_g_n, MAX_GROUPLEN);
++ strlcpy(u_tab[i].group, n_g_n, MAX_GROUPLEN+1);
+ }
+ }
+
+ /* finally change the name of the group itself */
+- strlcpy(g_tab[group].name, n_g_n, MAX_GROUPLEN);
++ strlcpy(g_tab[group].name, n_g_n, MAX_GROUPLEN+1);
+ return 0;
+ }
+
diff -r 22a1db5fdac6 -r 6576215b9e72 chat/i2cbd/patches/patch-src_s__user.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/i2cbd/patches/patch-src_s__user.c Mon Dec 11 07:54:42 2017 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_s__user.c,v 1.1 2017/12/11 07:54:42 spz Exp $
+
+fix copy length
+
+--- src/s_user.c.orig 2006-05-11 03:44:53.000000000 +0000
++++ src/s_user.c
+@@ -277,7 +277,7 @@ s_name(int n, int argc)
+ snprintf(line, LINE_SIZE, "%s changed nickname to %s", u_tab[n].nickname, new_name);
+ s_status_group(1,0,n,"Name",line);
+ nickwritetime(n, 1);
+- strlcpy(u_tab[n].nickname, new_name, MAX_NICKLEN);
++ strlcpy(u_tab[n].nickname, new_name, MAX_NICKLEN+1);
+
+ /* side-effects:
+ inform folx in same group of change
+@@ -290,7 +290,7 @@ s_name(int n, int argc)
+ ret = nicklookup(-n, u_tab[n].nickname);
+ if (ret == 0) {
+ /* we know this person */
+- strlcpy(u_tab[n].realname, "registered", MAX_REALLEN);
++ strlcpy(u_tab[n].realname, "registered", MAX_REALLEN+1);
+ sends_cmdout(n, "Nick registered");
+ nickwritetime(n, 0);
+ for (i = 1; i < MAX_GROUPS; i++)
diff -r 22a1db5fdac6 -r 6576215b9e72 chat/i2cbd/patches/patch-src_send.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
Home |
Main Index |
Thread Index |
Old Index