Date: Mon, 1 Oct 2018 14:39:59 +0000 (UTC) From: Mariusz Zaborski <oshogbo@FreeBSD.org> 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 Message-ID: <201810011439.w91EdxdG053690@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810011439.w91EdxdG053690>