The file dump_wtmp.c is not a part of the timeoutd program itself, but a
seperate diagnostic tool, which, if it must be used at all, belongs in a
seperate package. I've decided to simply remove it from this repository.
It's name is also a misnomer, as it's programed to actually dump the
utmp file, not the wtmp file. It also only dumps records written on the
current date, and only some of the fields. It seemed that fixing the
program would require more effort that it's worth, as I'm currently not
using the program for any diagnostic purpose, and there are now better
replacements for it, such as the Linux package utmpdump. Therefore, I
decided to remove it and cease working on it.
The VERSION file didn't seem to be too useful, as the version of the
program is stated elsewhere, the VERSION file is actually out of date
with the version in the timeoutd.c file, and the particular version of
the software doesn't even matter currently.
Therefore, both files have been deleted.
There are several lines in the code which cause GCC to warn the user
about undefined behaviour. Most of these are potential buffer overflow
problems. Which come from either overwriting a buffer which may be too
small for a given input, or writing to, or from, a string not guaranteed
to be null-terminated, such as any of the char[] fields in a utmp
struct. Almost all come from an improper usage of strcmp or strncmp or
similar.
The README file mentions the wrong pathnames in its installation,
instructing the user to install the binary in "/usr/etc", rather than
the "/usr/sbin" directory, for example. It also has a typo at the very
end. These errors have been fixed.
The Makefile for the project was unable to properly build. It didn't
call an X11 library which was needed for the program to link, but called
various libraries which weren't necessary. It also didn't install the
/etc/timeouts config file, didn't have an uninstall option, and it's
install would fail, due to the fact that it used non-existent
directories as install destinations, and broken user and group settings
for the files.
All of the afformentioned problems have been mended in this commit. It's
likely that all of the problems which actually broke the program were
due to a difference in Unix systems of the early 90s compared to 2020.
It's likely the X11 libraries were reorganised, and the users and groups
in the install command have been obsoleted.