From owner-cvs-src@FreeBSD.ORG Thu Apr 26 11:32:23 2007 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F57116A401; Thu, 26 Apr 2007 11:32:23 +0000 (UTC) (envelope-from never@kurush.osdn.org.ua) Received: from kurush.osdn.org.ua (external.osdn.org.ua [212.40.34.156]) by mx1.freebsd.org (Postfix) with ESMTP id 8754A13C45A; Thu, 26 Apr 2007 11:32:22 +0000 (UTC) (envelope-from never@kurush.osdn.org.ua) Received: from kurush.osdn.org.ua (never@localhost [127.0.0.1]) by kurush.osdn.org.ua (8.12.11/8.12.11) with ESMTP id l3QAsxOC032842; Thu, 26 Apr 2007 13:55:02 +0300 (EEST) (envelope-from never@kurush.osdn.org.ua) Received: (from never@localhost) by kurush.osdn.org.ua (8.12.11/8.12.11/Submit) id l3QAsxVF032839; Thu, 26 Apr 2007 13:54:59 +0300 (EEST) (envelope-from never) Date: Thu, 26 Apr 2007 13:54:59 +0300 From: Alexandr Kovalenko To: Yar Tikhiy Message-ID: <20070426105458.GA98415@nevermind.kiev.ua> References: <200704260639.l3Q6d1SH027885@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200704260639.l3Q6d1SH027885@repoman.freebsd.org> User-Agent: Mutt/1.5.4i X-Virus-Scanned: ClamAV 0.85.1/3164/Thu Apr 26 12:13:10 2007 on kurush.osdn.org.ua X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (kurush.osdn.org.ua [127.0.0.1]); Thu, 26 Apr 2007 13:55:03 +0300 (EEST) Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libpam/modules/pam_unix pam_unix.8 pam_unix.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 26 Apr 2007 11:32:23 -0000 Hello, Yar Tikhiy! On Thu, Apr 26, 2007 at 06:39:01AM +0000, you wrote: > yar 2007-04-26 06:39:01 UTC > > FreeBSD src repository > > Modified files: (Branch: RELENG_6) > lib/libpam/modules/pam_unix pam_unix.8 pam_unix.c > Log: > MFC: > pam_unix.c 1.52 > pam_unix.8 1.13 > > In account management, verify whether the account has been locked > with `pw lock', so that it's impossible to log into a locked account > using an alternative authentication mechanism, such as an ssh key. > This change affects only accounts locked with pw(8), i.e., having a > `*LOCKED*' prefix in their password hash field, so people still can > use a different pattern to disable password authentication only. Using the very same logic you should also add checking for '*', and for any other string, which cannot be in password hash of different algorithms. By the way, what if some crypto algorithm, which will be used for password hashing can produce hash, which contains substring '*LOCKED*' ? But anyway, I think that it is not expected behavour of sshd/pam_unix. >From the pw manual page: USER LOCKING The pw utility supports a simple _password_ locking mechanism for users; it works by prepending the string `*LOCKED*' to the beginning of the password field in master.passwd to prevent successful authentication. Please note word _password_. There is nothing about locking _account_ completely. Please consider reviewing this PR and, hopefully, back out this commit. At least for a lot of people - it is POLA violation. > Mention all account management criteria in the manpage. > > PR: bin/71147 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=71147 > > Revision Changes Path > 1.11.2.2 +16 -3 src/lib/libpam/modules/pam_unix/pam_unix.8 > 1.51.2.1 +6 -0 src/lib/libpam/modules/pam_unix/pam_unix.c -- NEVE-RIPE, will build world for food Ukrainian FreeBSD User Group http://uafug.org.ua/