Date: Mon, 12 Aug 2013 21:01:01 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254259 - head/usr.bin/su Message-ID: <201308122101.r7CL114L079043@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308122101.r7CL114L079043>