Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Nov 2003 22:40:36 -0800
From:      David Schultz <das@FreeBSD.ORG>
To:        src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sbin/nologin Makefile nologin.c nologin.sh
Message-ID:  <20031117064036.GA51447@VARK.homeunix.com>
In-Reply-To: <200311170639.hAH6dduA076667@repoman.freebsd.org>
References:  <200311170639.hAH6dduA076667@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031117064036.GA51447>