Commit graph

2 commits

Author SHA1 Message Date
Cy Schubert
fea2386be1 Fix utmpx related bug. Built w/o eror but failed to function. 2012-05-02 03:20:35 +00:00
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