From owner-freebsd-current@FreeBSD.ORG Mon Feb 23 12:39:04 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4AE7F16A4CE; Mon, 23 Feb 2004 12:39:04 -0800 (PST) Received: from kientzle.com (h-66-166-149-50.SNVACAID.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A24743D1D; Mon, 23 Feb 2004 12:39:04 -0800 (PST) (envelope-from tim@kientzle.com) Received: from kientzle.com (54.kientzle.com [66.166.149.54] (may be forged)) by kientzle.com (8.12.9/8.12.9) with ESMTP id i1NKd3kX094210; Mon, 23 Feb 2004 12:39:03 -0800 (PST) (envelope-from tim@kientzle.com) Message-ID: <403A64E7.4020607@kientzle.com> Date: Mon, 23 Feb 2004 12:39:03 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <6.0.1.1.1.20040223171828.03de8b30@imap.sfu.ca> <1077566329.24177.3.camel@herring.nlsystems.com> <200402231516.16586.jhb@FreeBSD.org> In-Reply-To: <200402231516.16586.jhb@FreeBSD.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: current@freebsd.org cc: Colin Percival Subject: Re: What to do about nologin(8)? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kientzle@acm.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2004 20:39:04 -0000 John Baldwin wrote: > On Monday 23 February 2004 02:58 pm, Doug Rabson wrote: > >>On Mon, 2004-02-23 at 17:45, Colin Percival wrote: >> >>> For security reasons, nologin(8) must be statically linked; >>>as a result, adding logging has increased the binary size ... >> >>How about: >> >>7: Use 'system("logger ...") to log the failed login? > > Wouldn't that be subject to the same LD_LIBRARY_PATH concerns since logger is > dynamically linked and you could trojan it's libc? Not if nologin clears the environment first. Related to this, I think I've found a solution to the underlying problem: ignore login's "-p" option if the user shell isn't in /etc/shells. This blocks environment-poisoning attacks against nologin via /usr/bin/login. With this change, it might even be possible to go back to the shell script version of nologin. Tim Kientzle