[Midnightbsd-cvs] src [11364] trunk/usr.bin/su/su.c: update su

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Jul 6 08:48:07 EDT 2018


Revision: 11364
          http://svnweb.midnightbsd.org/src/?rev=11364
Author:   laffer1
Date:     2018-07-06 08:48:06 -0400 (Fri, 06 Jul 2018)
Log Message:
-----------
update su

Modified Paths:
--------------
    trunk/usr.bin/su/Makefile
    trunk/usr.bin/su/su.1
    trunk/usr.bin/su/su.c

Property Changed:
----------------
    trunk/usr.bin/su/su.1

Modified: trunk/usr.bin/su/Makefile
===================================================================
--- trunk/usr.bin/su/Makefile	2018-07-06 12:47:12 UTC (rev 11363)
+++ trunk/usr.bin/su/Makefile	2018-07-06 12:48:06 UTC (rev 11364)
@@ -1,5 +1,6 @@
+# $MidnightBSD$
 #	@(#)Makefile	8.1 (Berkeley) 7/19/93
-# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/su/Makefile 226428 2011-10-16 09:09:33Z ed $
 
 .include <bsd.own.mk>
 

Modified: trunk/usr.bin/su/su.1
===================================================================
--- trunk/usr.bin/su/su.1	2018-07-06 12:47:12 UTC (rev 11363)
+++ trunk/usr.bin/su/su.1	2018-07-06 12:48:06 UTC (rev 11364)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 1988, 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -26,9 +27,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	@(#)su.1	8.2 (Berkeley) 4/18/94
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.bin/su/su.1 254215 2013-08-11 11:06:49Z trasz $
 .\"
-.Dd June 6, 2011
+.Dd August 11, 2013
 .Dt SU 1
 .Os
 .Sh NAME
@@ -37,8 +38,8 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl
+.Op Fl c Ar class
 .Op Fl flms
-.Op Fl c Ar class
 .Op Ar login Op Ar args
 .Sh DESCRIPTION
 The
@@ -85,6 +86,11 @@
 .Pp
 The options are as follows:
 .Bl -tag -width Ds
+.It Fl c Ar class
+Use the settings of the specified login class.
+The login class must be defined in
+.Xr login.conf 5 .
+Only allowed for the super-user.
 .It Fl f
 If the invoked shell is
 .Xr csh 1 ,
@@ -139,9 +145,6 @@
 If the label cannot be set,
 .Nm
 will fail.
-.It Fl c Ar class
-Use the settings of the specified login class.
-Only allowed for the super-user.
 .El
 .Pp
 The


Property changes on: trunk/usr.bin/su/su.1
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.bin/su/su.c
===================================================================
--- trunk/usr.bin/su/su.c	2018-07-06 12:47:12 UTC (rev 11363)
+++ trunk/usr.bin/su/su.c	2018-07-06 12:48:06 UTC (rev 11364)
@@ -172,7 +172,7 @@
 	au_id_t		 auid;
 #endif
 
-	shell = class = cleanenv = NULL;
+	p = shell = class = cleanenv = NULL;
 	asme = asthem = fastlogin = statusp = 0;
 	user = "root";
 	iscsh = UNSET;
@@ -373,6 +373,8 @@
 		}
 		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);
 	}
 



More information about the Midnightbsd-cvs mailing list