[Midnightbsd-cvs] src [11446] trunk/usr.bin/rpcinfo/rpcinfo.c: update rpcinfo
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Jul 7 12:38:04 EDT 2018
Revision: 11446
http://svnweb.midnightbsd.org/src/?rev=11446
Author: laffer1
Date: 2018-07-07 12:38:04 -0400 (Sat, 07 Jul 2018)
Log Message:
-----------
update rpcinfo
Modified Paths:
--------------
trunk/usr.bin/rpcinfo/Makefile
trunk/usr.bin/rpcinfo/rpcinfo.8
trunk/usr.bin/rpcinfo/rpcinfo.c
Property Changed:
----------------
trunk/usr.bin/rpcinfo/rpcinfo.8
Modified: trunk/usr.bin/rpcinfo/Makefile
===================================================================
--- trunk/usr.bin/rpcinfo/Makefile 2018-07-07 15:55:06 UTC (rev 11445)
+++ trunk/usr.bin/rpcinfo/Makefile 2018-07-07 16:38:04 UTC (rev 11446)
@@ -1,5 +1,6 @@
+# $MidnightBSD$
# from: @(#)Makefile 5.2 (Berkeley) 5/11/90
-# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/rpcinfo/Makefile 201386 2010-01-02 10:27:05Z ed $
PROG= rpcinfo
SRCS= rpcinfo.c
Modified: trunk/usr.bin/rpcinfo/rpcinfo.8
===================================================================
--- trunk/usr.bin/rpcinfo/rpcinfo.8 2018-07-07 15:55:06 UTC (rev 11445)
+++ trunk/usr.bin/rpcinfo/rpcinfo.8 2018-07-07 16:38:04 UTC (rev 11446)
@@ -1,8 +1,9 @@
+.\" $MidnightBSD$
.\" @(#)rpcinfo.1m 1.23 93/03/29 SMI; from SVr4
.\" Copyright 1989 AT&T
.\" Copyright 1991 Sun Microsystems, Inc.
.\" $NetBSD: rpcinfo.8,v 1.6 2000/06/02 23:19:38 fvdl Exp $
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.bin/rpcinfo/rpcinfo.8 105258 2002-10-16 15:38:28Z charnier $
.Dd August 18, 1992
.Dt RPCINFO 8
.Os
Property changes on: trunk/usr.bin/rpcinfo/rpcinfo.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.bin/rpcinfo/rpcinfo.c
===================================================================
--- trunk/usr.bin/rpcinfo/rpcinfo.c 2018-07-07 15:55:06 UTC (rev 11445)
+++ trunk/usr.bin/rpcinfo/rpcinfo.c 2018-07-07 16:38:04 UTC (rev 11446)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: rpcinfo.c,v 1.15 2000/10/04 20:09:05 mjl Exp $ */
/*
@@ -42,7 +43,7 @@
#endif
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/rpcinfo/rpcinfo.c 319256 2017-05-30 21:58:53Z asomers $");
/*
* rpcinfo: ping a particular rpc program
@@ -50,7 +51,7 @@
*/
/*
- * We are for now defining PORTMAP here. It doesnt even compile
+ * We are for now defining PORTMAP here. It doesn't even compile
* unless it is defined.
*/
#ifndef PORTMAP
@@ -476,7 +477,7 @@
struct rpcent *rpc;
enum clnt_stat clnt_st;
struct rpc_err err;
- char *host;
+ char *host = NULL;
if (argc > 1)
usage();
@@ -513,10 +514,16 @@
if ((clnt_st == RPC_PROGVERSMISMATCH) ||
(clnt_st == RPC_PROGUNAVAIL)) {
CLNT_GETERR(client, &err);
- if (err.re_vers.low > PMAPVERS)
- warnx(
- "%s does not support portmapper. Try rpcinfo %s instead",
- host, host);
+ if (err.re_vers.low > PMAPVERS) {
+ if (host)
+ warnx("%s does not support portmapper."
+ "Try rpcinfo %s instead", host,
+ host);
+ else
+ warnx("local host does not support "
+ "portmapper. Try 'rpcinfo' "
+ "instead");
+ }
exit(1);
}
clnt_perror(client, "rpcinfo: can't contact portmapper");
@@ -848,9 +855,9 @@
printf("%-10s", buf);
buf[0] = '\0';
for (nl = rs->nlist; nl; nl = nl->next) {
- strcat(buf, nl->netid);
+ strlcat(buf, nl->netid, sizeof(buf));
if (nl->next)
- strcat(buf, ",");
+ strlcat(buf, ",", sizeof(buf));
}
printf("%-32s", buf);
rpc = getrpcbynumber(rs->prog);
More information about the Midnightbsd-cvs
mailing list