diff options
author | Cy Schubert <cy@FreeBSD.org> | 2012-01-05 16:20:44 +0800 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2012-01-05 16:20:44 +0800 |
commit | 295a80f62ec31ac27c5152f314a0cd5325195938 (patch) | |
tree | 60dbd7918bc1cd7d24984d416e0462680e4dc92a /sysutils | |
parent | 0173e7cb26bc07e8f5ba1e7a4fb81f7043e8ca0e (diff) | |
download | freebsd-ports-gnome-295a80f62ec31ac27c5152f314a0cd5325195938.tar.gz freebsd-ports-gnome-295a80f62ec31ac27c5152f314a0cd5325195938.tar.zst freebsd-ports-gnome-295a80f62ec31ac27c5152f314a0cd5325195938.zip |
When 'Doinkd' is started as a service and there are no users actually
logged into system it segfaults (signal 11).
There is a bug in the 'chk_maxuser' function. When it receives as a
prameter 'user==NULL' following condition:
if (user->mgroup != 0) {
causes a segfault. Bug can be very easy reproduced and tracked by
gdb (core dumps have to be enabled).
Tested fix is:
if (user != NULL && user->mgroup != 0) {
Obtained from: doinkd bug ID at Sourceforge: 1652293
http://sourceforge.net/tracker/?func=detail&aid=1652293&group_id=168453&atid=846828
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/doinkd/Makefile | 6 | ||||
-rw-r--r-- | sysutils/doinkd/files/patch-doinkd.c | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/sysutils/doinkd/Makefile b/sysutils/doinkd/Makefile index 76c85bd5a3f9..802845244682 100644 --- a/sysutils/doinkd/Makefile +++ b/sysutils/doinkd/Makefile @@ -7,15 +7,13 @@ PORTNAME= doinkd PORTVERSION= 0.01 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils MASTER_SITES= SF/idled/${PORTNAME}/${PORTVERSION}/ MAINTAINER= cy@FreeBSD.org COMMENT= A daemon that logs out idle users and those users hogging resources -CFLAGS+= -O0 - MANCOMPRESSED= yes MAN5= doinkd.cf.5 MAN8= doinkd.8 @@ -23,7 +21,7 @@ MAN8= doinkd.8 USE_RC_SUBR= ${PORTNAME} PLIST_FILES= etc/doinkd/doinkd.cf.template sbin/doinkd -PLIST_DIRS= etc/doinkd +PLIST_DIRSTRY= etc/doinkd .include <bsd.port.pre.mk> diff --git a/sysutils/doinkd/files/patch-doinkd.c b/sysutils/doinkd/files/patch-doinkd.c new file mode 100644 index 000000000000..466a1bee2ed0 --- /dev/null +++ b/sysutils/doinkd/files/patch-doinkd.c @@ -0,0 +1,11 @@ +--- doinkd.c.orig 2006-05-30 00:17:44.000000000 -0700 ++++ doinkd.c 2012-01-04 12:28:11.183448967 -0800 +@@ -651,7 +651,7 @@ + int grpcnt = 0; + int tgrpcnt = 0; + +- if (user->mgroup != 0) { ++ if (user != NULL && user->mgroup != 0) { + for (i = 0; i < n_users; i++) { + if ( (*pusers[i]).uid == user->uid) + who = i; |