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

Nate Lawson nate at root.org
Sun Nov 16 23:09:44 PST 2003


On Sun, 16 Nov 2003, David Schultz wrote:
> On Sun, Nov 16, 2003, David Schultz wrote:
> >   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.

Tim Kientzle floated some patches to remove this dependency about a year
ago but they never got committed.  Perhaps now that he's done with the
dynamic root work, he can clean them up and commit them.

-Nate


More information about the cvs-src mailing list