From owner-svn-src-all@FreeBSD.ORG Mon Aug 12 21:01:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2D5ACD1A; Mon, 12 Aug 2013 21:01:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A6A82B74; Mon, 12 Aug 2013 21:01:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7CL11eC079044; Mon, 12 Aug 2013 21:01:01 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7CL114L079043; Mon, 12 Aug 2013 21:01:01 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201308122101.r7CL114L079043@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 12 Aug 2013 21:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254259 - head/usr.bin/su X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Aug 2013 21:01:02 -0000 Author: trasz Date: Mon Aug 12 21:01:01 2013 New Revision: 254259 URL: http://svnweb.freebsd.org/changeset/base/254259 Log: Make check for unknown login class actually work. Previously, using the "-c" option with login class not defined in login.conf(5) would silently fail, resulting in using the default login class. Modified: head/usr.bin/su/su.c Modified: head/usr.bin/su/su.c ============================================================================== --- head/usr.bin/su/su.c Mon Aug 12 20:27:24 2013 (r254258) +++ head/usr.bin/su/su.c Mon Aug 12 21:01:01 2013 (r254259) @@ -373,6 +373,8 @@ main(int argc, char *argv[]) } lc = login_getclass(class); if (lc == NULL) + err(1, "login_getclass"); + if (lc->lc_class == NULL || strcmp(class, lc->lc_class) != 0) errx(1, "unknown class: %s", class); }