From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 15 20:00:20 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FAC61065672 for ; Wed, 15 Feb 2012 20:00:20 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id 6B4DE8FC1A for ; Wed, 15 Feb 2012 20:00:20 +0000 (UTC) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 9317C54D3; Wed, 15 Feb 2012 12:00:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1329336020; bh=rpZlbr/Vjl6NLCER9dez367AipKJWmT1FZjkVw+IYA8=; h=Message-ID:Date:From:Reply-To:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=4qgOLJ7mV2Z0CUZaKhEnI+J1xPPO9NoiTyO377GyKctSzRzKt/bYhsXPaPnL8Frk1 x3cAWjZSgOV16uRVUGVprF8bMFqVsW7YFhh/UswPc/2/ovhhFbvfdqHojLAY9yr+8X hRa3BidpUi5FTDMgbsnMMPa16gmyOxC0roCmpltQ= Message-ID: <4F3C0ED1.9010004@delphij.net> Date: Wed, 15 Feb 2012 12:00:17 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Ansar Mohammed References: In-Reply-To: X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, d@delphij.net Subject: Re: nologin size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2012 20:00:20 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 02/15/12 11:28, Ansar Mohammed wrote: > Hello all, I am trying to build a minimal size FreeBSD 9 > installation and I noticed that the size of nologin is almost > 200k. I built FreeBSD from source so I checked the distribution, > and it's also 200k. So I went back to the source and just compiled > nologin.c and it came up to 5k. The Makefile have described why it's statically linked: # It is important that nologin be statically linked for security # reasons. A dynamic non-setuid binary can be linked against a trojan # libc by setting LD_LIBRARY_PATH appropriately. Both sshd(8) and # login(1) make it possible to log in with an unsanitized environment, # rendering a dynamic nologin binary virtually useless. NO_SHARED= YES Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iQEbBAEBCAAGBQJPPA7RAAoJEG80Jeu8UPuz2k0H8wbyLWS6+V0ebKJzPtB1BZzP o6VWo6sXrG5sMb7kegQdtouYjjfCh1XGxj8jT/nCdOcmXFTvta4GaEnwNZjT3IJp bhIRU3sh7G3AOs9WjXlDhwyPCuLp3LdWPu6/4kjdME3VZp6YQRn6SSHtS/OAG/nS HJtlee64Udlkj1OVIPKENpdSdv4dzJt5afSsK0Ju9HH+vrpFKv5fwUWcXVCFya4R iPiU+hDlVUG0ivjK7Aa12rKavrJxmuC6am7KansLF9LsjTHm8zBxswPgJwVEXO9v xIoFHnbfUHLi9r/NAUICudpPmoNfp8M8MNei+n2KQwPK4FsHdiIGcIkfQCsrJQ== =4yw1 -----END PGP SIGNATURE-----