freebsd-nq/sbin/nologin/nologin.c
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

22 lines
400 B
C

/*-
* This program is in the public domain. I couldn't bring myself to
* declare Copyright on a variant of Hello World.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
#define MESSAGE "This account is currently not available.\n"
int
main(int argc, char *argv[])
{
write(STDOUT_FILENO, MESSAGE, sizeof(MESSAGE));
_exit(1);
}