From owner-svn-src-stable@freebsd.org Mon Oct 1 14:40:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57B6110BF318; Mon, 1 Oct 2018 14:40:00 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A7AF79842; Mon, 1 Oct 2018 14:40:00 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 04E9522379; Mon, 1 Oct 2018 14:40:00 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w91EdxcY053691; Mon, 1 Oct 2018 14:39:59 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w91EdxdG053690; Mon, 1 Oct 2018 14:39:59 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201810011439.w91EdxdG053690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Mon, 1 Oct 2018 14:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r339045 - stable/11/contrib/traceroute X-SVN-Group: stable-11 X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: stable/11/contrib/traceroute X-SVN-Commit-Revision: 339045 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2018 14:40:00 -0000 Author: oshogbo Date: Mon Oct 1 14:39:59 2018 New Revision: 339045 URL: https://svnweb.freebsd.org/changeset/base/339045 Log: MFC r315411 (mmel): Unbreak traceroute on system built without CAPSICUM Modified: stable/11/contrib/traceroute/traceroute.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/traceroute/traceroute.c ============================================================================== --- stable/11/contrib/traceroute/traceroute.c Mon Oct 1 14:27:53 2018 (r339044) +++ stable/11/contrib/traceroute/traceroute.c Mon Oct 1 14:39:59 2018 (r339045) @@ -1021,8 +1021,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);