diff --git a/bsd-finger-0.17-utmp.patch b/bsd-finger-0.17-utmp.patch new file mode 100644 index 0000000..ac73f2b --- /dev/null +++ b/bsd-finger-0.17-utmp.patch @@ -0,0 +1,40 @@ +--- bsd-finger-0.17/finger/finger.c.utmp 2004-06-15 11:38:24.000000000 -0400 ++++ bsd-finger-0.17/finger/finger.c 2004-06-15 12:22:15.000000000 -0400 +@@ -75,6 +75,8 @@ + #include + #include + #include ++#include ++#include + #include "finger.h" + #ifdef _USAGI + #include "version.h" +@@ -224,6 +226,8 @@ + #ifdef USER_PROCESS + if (uptr->ut_type != USER_PROCESS) continue; + #endif ++ if (kill(uptr->ut_pid, 0) < 0 && errno == ESRCH) ++ continue; + if ((pn = find_person(uptr->ut_name)) == NULL) { + memcpy(name, uptr->ut_name, UT_NAMESIZE); + if ((pw = getpwnam(name)) == NULL) +@@ -331,6 +335,8 @@ + #ifdef USER_PROCESS + if (uptr->ut_type != USER_PROCESS) continue; + #endif ++ if (kill(uptr->ut_pid, 0) < 0 && errno == ESRCH) ++ continue; + if ((pn = find_person(uptr->ut_name)) == NULL) { + continue; + } +--- bsd-finger-0.17/finger/util.c.utmp 2004-06-15 11:38:24.000000000 -0400 ++++ bsd-finger-0.17/finger/util.c 2004-06-15 11:38:24.000000000 -0400 +@@ -71,6 +71,8 @@ + } + snprintf(tbuf, TBUFLEN, "%s/%s", _PATH_DEV, w->tty); + if (stat(tbuf, &sb) < 0) { ++ w->idletime = 0; /* No tty no write, no idle data */ ++ w->writable = 0; + switch (errno) { + case ENOENT: + break; diff --git a/finger.spec b/finger.spec index 5b89618..7e2f6e3 100644 --- a/finger.spec +++ b/finger.spec @@ -1,7 +1,7 @@ Summary: The finger client. Name: finger Version: 0.17 -Release: 22 +Release: 25 License: BSD Group: Applications/Internet Source: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/bsd-finger-%{version}.tar.gz @@ -14,7 +14,9 @@ Patch10: bsd-finger-0.17-time.patch Patch11: bsd-finger-0.17-usagi-ipv6.patch Patch12: bsd-finger-0.17-typo.patch Patch13: bsd-finger-0.17-strip.patch +Patch14: bsd-finger-0.17-utmp.patch BuildRoot: %{_tmppath}/%{name}-root +BuildRequires: gcc, glibc-devel, perl %description Finger is a utility which allows users to see information about system @@ -51,6 +53,7 @@ and you'd like finger information to be available. %patch11 -p1 -b .ipv6 %patch12 -p1 -b .typo %patch13 -p1 -b .strip +%patch14 -p1 -b .utmp %build sh configure --enable-ipv6 @@ -92,6 +95,11 @@ rm -rf ${RPM_BUILD_ROOT} %{_mandir}/man8/fingerd.8* %changelog +* Tue Jun 15 2004 Alan Cox +- Made finger agree with our other apps about how utmp is managed +- Removed dead users from the lists as a result +- Fixed random idle time bug + * Tue Jun 15 2004 Elliot Lee - rebuilt