Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 2017 13:01:23 +0000 (UTC)
From:      Michal Meloun <mmel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315411 - head/contrib/traceroute
Message-ID:  <201703161301.v2GD1N3S043761@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mmel
Date: Thu Mar 16 13:01:23 2017
New Revision: 315411
URL: https://svnweb.freebsd.org/changeset/base/315411

Log:
  Unbreak traceroute on system built without CAPSICUM

Modified:
  head/contrib/traceroute/traceroute.c

Modified: head/contrib/traceroute/traceroute.c
==============================================================================
--- head/contrib/traceroute/traceroute.c	Thu Mar 16 12:33:34 2017	(r315410)
+++ head/contrib/traceroute/traceroute.c	Thu Mar 16 13:01:23 2017	(r315411)
@@ -1023,8 +1023,13 @@ main(int argc, char **argv)
 	 * We must connect(2) our socket before this point.
 	 */
 	if (cansandbox && cap_enter() < 0) {
-		Fprintf(stderr, "%s: cap_enter: %s\n", prog, strerror(errno));
-		exit(1);
+		if (errno != ENOSYS) {
+			Fprintf(stderr, "%s: cap_enter: %s\n", prog,
+			    strerror(errno));
+			exit(1);
+		} else {
+			cansandbox = false;
+		}
 	}
 
 	cap_rights_init(&rights, CAP_SEND, CAP_SETSOCKOPT);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703161301.v2GD1N3S043761>