From owner-cvs-src@FreeBSD.ORG Sun Nov 16 22:42:21 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1EC2016A4CE; Sun, 16 Nov 2003 22:42:21 -0800 (PST) Received: from VARK.homeunix.com (adsl-68-123-40-77.dsl.pltn13.pacbell.net [68.123.40.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2343F43FE1; Sun, 16 Nov 2003 22:42:20 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.9/8.12.9) with ESMTP id hAH6eben051485; Sun, 16 Nov 2003 22:40:37 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.9/8.12.9/Submit) id hAH6ebws051484; Sun, 16 Nov 2003 22:40:37 -0800 (PST) (envelope-from das@FreeBSD.ORG) Date: Sun, 16 Nov 2003 22:40:36 -0800 From: David Schultz To: src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG Message-ID: <20031117064036.GA51447@VARK.homeunix.com> Mail-Followup-To: src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG References: <200311170639.hAH6dduA076667@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200311170639.hAH6dduA076667@repoman.freebsd.org> Subject: Re: cvs commit: src/sbin/nologin Makefile nologin.c nologin.sh X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2003 06:42:21 -0000 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.