Commit Graph

5 Commits

Author SHA1 Message Date
Xin LI
51c86fb583 Use __unused macro instead of a bare void for main().
Suggested by:	nectar
2005-01-04 20:07:12 +00:00
Xin LI
0dac67d65f nologin(8) does not seem to require any command line parameters,
so remove argc and argv from main() argument.

At the same time, user and tt is not likely to be changed during
execution so mark them const.

This commit should guarantee nologin to pass WARNS=6.

Tested on:	i386
MFC After:	1 month
2005-01-04 03:57:20 +00:00
Colin Percival
3590bb99a0 Add standard copyright notice; fix style bugs. (Reported by bde)
Remove NO_NOLOGIN_LOG option now that we're off the root partition.
2004-03-13 04:41:40 +00:00
Colin Percival
47c524ddd4 Report login attempts to syslog. Due to the statically-linked nature of
nologin(8), this causes a considerable (100K) increase in the binary size,
so I've added a NO_LOGIN_LOG option which disables this.

While I'm here, s/sizeof(MESSAGE)/sizeof(MESSAGE) - 1/, in order to
avoid writing the string-terminating zero byte.

No complaints from: -current
Approved by:	rwatson (mentor)
2004-02-22 10:03:24 +00:00
David Schultz
71ff2d08cd Reimplement nologin(8) as a C program. This allows us to statically
link it at low cost and avoid environment poisoning attacks associated
with LD_LIBRARY_PATH.

Suggested by:	rwatson
2003-11-17 06:39:38 +00:00