Commit Graph

8 Commits

Author SHA1 Message Date
christos 301b67f323 WARNS=6 2015-11-21 15:01:43 +00:00
dholland 16e3bec279 Clarify how one is supposed to use the pointers returned by getutentries()
(the utmpentry.c code), specifically with respect to who owns them and
when to free them. Now they're owned by utmpentry.c, only. Abolish the
freeutentries() function, which was the wrong abstraction; add instead
endutentries(), which flushes out the internally managed memory.

Update callers as necessary. Some (e.g. talkd) had been leaking memory;
others (e.g. syslogd) had been accidentally freeing and reloading utmp
more often than necessary. There are a couple untidy bits in users and
rwhod that someone should look after sometime, maybe.

Fixes PR bin/35131, which was about talkd's memory leak.
2008-07-13 20:07:48 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
christos 14e0a0ccc6 unbreak the build by including the appropriate header files here. 2006-09-20 19:39:23 +00:00
christos cbf3acdacb Add support for the majority of the rest of the system V options, although
we don't support some of them. We might add boottime, system clock change
time, in the future, so add the code to do it.
2006-09-19 21:01:29 +00:00
hubertf d7f002b78d Change -u behaviour to also print PID of process on terminal, and
add -d to print more information from utmpx.

OK'd by christos@
2006-09-19 14:35:25 +00:00
wiz df5a50364e Use $NetBSD$ instead of $Header$. 2003-11-28 23:52:34 +00:00
christos eb122f434a abstract out utmp loading. 2002-08-01 23:23:07 +00:00