freebsd-ports/sysutils/doinkd/Makefile
Cy Schubert 295a80f62e 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
2012-01-05 08:20:44 +00:00

45 lines
936 B
Makefile

# New ports collection makefile for: doinkd
# Date created: 12 March 1997
# Whom: Andrew <andrew@ugh.net.au>, Iain Templeton <iain@ugh.net.au>
#
# $FreeBSD$
#
PORTNAME= doinkd
PORTVERSION= 0.01
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
MANCOMPRESSED= yes
MAN5= doinkd.cf.5
MAN8= doinkd.8
USE_RC_SUBR= ${PORTNAME}
PLIST_FILES= etc/doinkd/doinkd.cf.template sbin/doinkd
PLIST_DIRSTRY= etc/doinkd
.include <bsd.port.pre.mk>
.if ${OSVERSION} > 900006
EXTRA_PATCHES= ${PATCHDIR}/utmpx-Makefile \
${PATCHDIR}/utmpx-doinkd.h \
${PATCHDIR}/utmpx-doinkd.c
.else
EXTRA_PATCHES= ${PATCHDIR}/utmp-Makefile
.endif
post-extract:
(cd ${WRKSRC}; make clean)
pre-install:
${MKDIR} ${PREFIX}/etc/doinkd
post-install:
@${STRIP_CMD} ${PREFIX}/sbin/doinkd
.include <bsd.port.post.mk>