From owner-svn-src-head@freebsd.org Thu Aug 16 18:30:51 2018 Return-Path: Delivered-To: svn-src-head@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 0461C10721DD; Thu, 16 Aug 2018 18:30:51 +0000 (UTC) (envelope-from jamie@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 AE9DC71D96; Thu, 16 Aug 2018 18:30:50 +0000 (UTC) (envelope-from jamie@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 8FCE61D2DD; Thu, 16 Aug 2018 18:30:50 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7GIUo6T040826; Thu, 16 Aug 2018 18:30:50 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7GIUnB7040823; Thu, 16 Aug 2018 18:30:49 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201808161830.w7GIUnB7040823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Thu, 16 Aug 2018 18:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337919 - head/usr.sbin/jail X-SVN-Group: head X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: head/usr.sbin/jail X-SVN-Commit-Revision: 337919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2018 18:30:51 -0000 Author: jamie Date: Thu Aug 16 18:30:49 2018 New Revision: 337919 URL: https://svnweb.freebsd.org/changeset/base/337919 Log: security.jail.enforce_statfs is handled by jail_set(2), so handling it in userspace jail(8) is redundant. Differential Revision: D14791 Modified: head/usr.sbin/jail/config.c head/usr.sbin/jail/jail.c head/usr.sbin/jail/jailp.h Modified: head/usr.sbin/jail/config.c ============================================================================== --- head/usr.sbin/jail/config.c Thu Aug 16 18:27:43 2018 (r337918) +++ head/usr.sbin/jail/config.c Thu Aug 16 18:30:49 2018 (r337919) @@ -106,7 +106,6 @@ static const struct ipspec intparams[] = { [KP_ALLOW_SOCKET_AF] = {"allow.socket_af", 0}, [KP_ALLOW_SYSVIPC] = {"allow.sysvipc", 0}, [KP_DEVFS_RULESET] = {"devfs_ruleset", 0}, - [KP_ENFORCE_STATFS] = {"enforce_statfs", 0}, [KP_HOST_HOSTNAME] = {"host.hostname", 0}, #ifdef INET [KP_IP4_ADDR] = {"ip4.addr", 0}, Modified: head/usr.sbin/jail/jail.c ============================================================================== --- head/usr.sbin/jail/jail.c Thu Aug 16 18:27:43 2018 (r337918) +++ head/usr.sbin/jail/jail.c Thu Aug 16 18:30:49 2018 (r337919) @@ -138,7 +138,6 @@ main(int argc, char **argv) unsigned op, pi; int ch, docf, error, i, oldcl, sysval; int dflag, Rflag; - char enforce_statfs[4]; #if defined(INET) || defined(INET6) char *cs, *ncs; #endif @@ -275,14 +274,6 @@ main(int argc, char **argv) (sysval ? 1 : 0) ^ perm_sysctl[pi].rev ? NULL : "false"); - } - sysvallen = sizeof(sysval); - if (sysctlbyname("security.jail.enforce_statfs", - &sysval, &sysvallen, NULL, 0) == 0) { - snprintf(enforce_statfs, - sizeof(enforce_statfs), "%d", sysval); - add_param(NULL, NULL, KP_ENFORCE_STATFS, - enforce_statfs); } } } else if (op == JF_STOP) { Modified: head/usr.sbin/jail/jailp.h ============================================================================== --- head/usr.sbin/jail/jailp.h Thu Aug 16 18:27:43 2018 (r337918) +++ head/usr.sbin/jail/jailp.h Thu Aug 16 18:30:49 2018 (r337919) @@ -120,7 +120,6 @@ enum intparam { KP_ALLOW_SOCKET_AF, KP_ALLOW_SYSVIPC, KP_DEVFS_RULESET, - KP_ENFORCE_STATFS, KP_HOST_HOSTNAME, #ifdef INET KP_IP4_ADDR,