[Midnightbsd-cvs] src [11098] trunk/sbin/ping/ping.c: sync with freebsd
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Tue Jun 19 14:10:11 EDT 2018
Revision: 11098
http://svnweb.midnightbsd.org/src/?rev=11098
Author: laffer1
Date: 2018-06-19 14:10:10 -0400 (Tue, 19 Jun 2018)
Log Message:
-----------
sync with freebsd
Modified Paths:
--------------
trunk/sbin/ping/Makefile
trunk/sbin/ping/ping.8
trunk/sbin/ping/ping.c
Property Changed:
----------------
trunk/sbin/ping/ping.8
Modified: trunk/sbin/ping/Makefile
===================================================================
--- trunk/sbin/ping/Makefile 2018-06-19 18:09:38 UTC (rev 11097)
+++ trunk/sbin/ping/Makefile 2018-06-19 18:10:10 UTC (rev 11098)
@@ -1,5 +1,6 @@
+# $MidnightBSD$
# @(#)Makefile 8.1 (Berkeley) 6/5/93
-# $MidnightBSD$
+# $FreeBSD: stable/10/sbin/ping/Makefile 161526 2006-08-22 08:03:01Z ru $
PROG= ping
MAN= ping.8
Modified: trunk/sbin/ping/ping.8
===================================================================
--- trunk/sbin/ping/ping.8 2018-06-19 18:09:38 UTC (rev 11097)
+++ trunk/sbin/ping/ping.8 2018-06-19 18:10:10 UTC (rev 11098)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
.\" Copyright (c) 1985, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -26,7 +27,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)ping.8 8.2 (Berkeley) 12/11/93
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/sbin/ping/ping.8 187067 2009-01-11 22:36:45Z danger $
.\"
.Dd April 4, 2006
.Dt PING 8
Property changes on: trunk/sbin/ping/ping.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/sbin/ping/ping.c
===================================================================
--- trunk/sbin/ping/ping.c 2018-06-19 18:09:38 UTC (rev 11097)
+++ trunk/sbin/ping/ping.c 2018-06-19 18:10:10 UTC (rev 11098)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -42,7 +43,7 @@
#endif /* not lint */
#endif
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sbin/ping/ping.c 241852 2012-10-22 03:31:22Z eadler $");
/*
* P I N G . C
@@ -255,7 +256,8 @@
s = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
sockerrno = errno;
- setuid(getuid());
+ if (setuid(getuid()) != 0)
+ err(EX_NOPERM, "setuid() failed");
uid = getuid();
alarmtimeout = df = preload = tos = 0;
@@ -832,7 +834,7 @@
timeout.tv_sec++;
}
if (timeout.tv_sec < 0)
- timeout.tv_sec = timeout.tv_usec = 0;
+ timerclear(&timeout);
n = select(s + 1, &rfds, NULL, NULL, &timeout);
if (n < 0)
continue; /* Must be EINTR. */
More information about the Midnightbsd-cvs
mailing list