cvs commit: src/sbin/nologin Makefile nologin.c nologin.sh

David Schultz das at FreeBSD.ORG
Sun Nov 16 22:42:21 PST 2003


On Sun, Nov 16, 2003, David Schultz wrote:
> das         2003/11/16 22:39:39 PST
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sbin/nologin         Makefile 
>   Added files:
>     sbin/nologin         nologin.c 
>   Removed files:
>     sbin/nologin         nologin.sh 
>   Log:
>   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.

For those who care, here are the relevant sizes to the nearest kilobyte:

	24K	static C program
	5K	dynamic C program
	2K	shell script
	1K	assembly program

The bloat in the static version is due to crt0 pulling in atexit(),
which in turn depends on malloc(), free(), and some pthread mutex code.


More information about the cvs-src mailing list