[Midnightbsd-cvs] src [11392] trunk/libexec/rshd/rshd.c: sync with freebsd

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Jul 6 20:58:59 EDT 2018


Revision: 11392
          http://svnweb.midnightbsd.org/src/?rev=11392
Author:   laffer1
Date:     2018-07-06 20:58:58 -0400 (Fri, 06 Jul 2018)
Log Message:
-----------
sync with freebsd

Modified Paths:
--------------
    trunk/libexec/rshd/Makefile
    trunk/libexec/rshd/rshd.8
    trunk/libexec/rshd/rshd.c

Property Changed:
----------------
    trunk/libexec/rshd/rshd.8

Modified: trunk/libexec/rshd/Makefile
===================================================================
--- trunk/libexec/rshd/Makefile	2018-07-07 00:58:26 UTC (rev 11391)
+++ trunk/libexec/rshd/Makefile	2018-07-07 00:58:58 UTC (rev 11392)
@@ -1,6 +1,6 @@
+# $MidnightBSD$
 # From:	@(#)Makefile	8.1 (Berkeley) 6/4/93
-# $FreeBSD: src/libexec/rshd/Makefile,v 1.25 2005/01/28 16:08:05 ru Exp $
-# $MidnightBSD: src/libexec/rshd/Makefile,v 1.2 2012/04/11 00:58:36 laffer1 Exp $
+# $FreeBSD: stable/10/libexec/rshd/Makefile 201380 2010-01-02 09:50:19Z ed $
 
 PROG=	rshd
 MAN=	rshd.8

Modified: trunk/libexec/rshd/rshd.8
===================================================================
--- trunk/libexec/rshd/rshd.8	2018-07-07 00:58:26 UTC (rev 11391)
+++ trunk/libexec/rshd/rshd.8	2018-07-07 00:58:58 UTC (rev 11392)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 1983, 1989, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -9,11 +10,7 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"	This product includes software developed by the University of
-.\"	California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
+.\" 3. Neither the name of the University nor the names of its contributors
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
 .\"
@@ -30,10 +27,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)rshd.8	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/libexec/rshd/rshd.8,v 1.36 2005/02/13 22:25:14 ru Exp $
-.\" $MidnightBSD: src/libexec/rshd/rshd.8,v 1.2 2012/04/11 00:58:36 laffer1 Exp $
+.\" $FreeBSD: stable/10/libexec/rshd/rshd.8 320646 2017-07-04 15:53:54Z allanjude $
 .\"
-.Dd June 4, 1993
+.Dd July 3, 2017
 .Dt RSHD 8
 .Os
 .Sh NAME
@@ -42,6 +38,15 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl aDLln
+.Sh DEPRECATION NOTICE
+.Nm
+is deprecated and will be removed from future versions of the
+.Fx
+base system.
+If
+.Nm
+is still required, it can be installed from ports or packages
+(net/bsdrcmds).
 .Sh DESCRIPTION
 The
 .Nm
@@ -149,7 +154,7 @@
 The options are as follows:
 .Bl -tag -width indent
 .It Fl a
-This flag is ignored, and is present for compatability purposes.
+This flag is ignored, and is present for compatibility purposes.
 .It Fl D
 Sets the TCP_NODELAY socket option, which improves the performance
 of small back-to-back writes at the expense of additional network


Property changes on: trunk/libexec/rshd/rshd.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/libexec/rshd/rshd.c
===================================================================
--- trunk/libexec/rshd/rshd.c	2018-07-07 00:58:26 UTC (rev 11391)
+++ trunk/libexec/rshd/rshd.c	2018-07-07 00:58:58 UTC (rev 11392)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/libexec/rshd/rshd.c,v 1.2 2012/04/11 00:58:36 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1988, 1989, 1992, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -18,11 +18,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -52,7 +48,7 @@
 #endif /* not lint */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/libexec/rshd/rshd.c,v 1.51 2005/05/11 02:41:39 jmallett Exp $");
+__FBSDID("$FreeBSD: stable/10/libexec/rshd/rshd.c 321069 2017-07-17 06:37:46Z delphij $");
 
 /*
  * remote shell server:
@@ -327,8 +323,7 @@
 	pam_err = pam_authenticate(pamh, 0);
 	if (pam_err == PAM_SUCCESS) {
 		if ((pam_err = pam_get_user(pamh, &cp, NULL)) == PAM_SUCCESS) {
-			strncpy(luser, cp, sizeof(luser));
-			luser[sizeof(luser) - 1] = '\0';
+			strlcpy(luser, cp, sizeof(luser));
 			/* XXX truncation! */
 		}
 		pam_err = pam_acct_mgmt(pamh, 0);
@@ -369,9 +364,7 @@
 	if (lc != NULL && fromp->sa_family == AF_INET) {	/*XXX*/
 		char	remote_ip[MAXHOSTNAMELEN];
 
-		strncpy(remote_ip, numericname,
-			sizeof(remote_ip) - 1);
-		remote_ip[sizeof(remote_ip) - 1] = 0;
+		strlcpy(remote_ip, numericname, sizeof(remote_ip));
 		/* XXX truncation! */
 		if (!auth_hostok(lc, rhost, remote_ip)) {
 			syslog(LOG_INFO|LOG_AUTH,



More information about the Midnightbsd-cvs mailing list