From nobody Thu Mar 16 07:10:11 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pcdgl57nlz3yTHl; Thu, 16 Mar 2023 07:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pcdgl4Q5Sz3rC9; Thu, 16 Mar 2023 07:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678950611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iuX8eIYcLoV49vwLTkJyAxhOPdzOLFZgG3WLapFfrYc=; b=WxydLph0Apoh1vqcpUsSnIVGV4Z7dCynzko3qLqE2s2Z78mutpwAak+sVvDwh+AJOWaCLF Ah/BkSif8qEfAldwD3kCfV1iydJgPggON2Um72795cGGZ6lLZgxHikEFKrYsvQNOuAaFUY IRfD9V7IPKJc7rcjHmae6T4/FxcqQGOrnNmjIPnQzlWrqrzQgwB4CR1IMauk2uuOdNUAVw oynW0gVdgare5BI4TX6eJSASK0hNqWTt+5ImgsAKz4Q4u3KWz1WmMaHk4ujCy4CEmXn/0X 56uTUVnT82sGSnZ5ZULf9CzA/S/211zMbTNvnq6bTvZW542iF6/hfnT5H37Hyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678950611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iuX8eIYcLoV49vwLTkJyAxhOPdzOLFZgG3WLapFfrYc=; b=xCIpBwYgd4avLNUIMuc+DVImZ121cccNSi0XFBsJK9DzUH8KpRLsHfNi/SEwznuLcgehVH /0oIpUsBQChss5B2d+zI2bTQRbNI6PcYYkeWryZ2egIiRtDalfnrdSDyQPH0OOFe11thps sE21r65D1j+la/KV01u9fJAhZ6+5Iti5+w/4bvGLxerZ9deVYDPeZAmsn2kwRJB6HQJgxQ FfklD5ub5K9xGk7k1hTaWQ+FTaLqsZUkaA26s+iPSLW7Yl0Z7CSD5+sipHeU98Tg7eO2g+ BWVBba1J0bEAKQXX1BFR9CFyqhQT6pFX8QyI+ZNm5jPzg8T+kasW7gvrHUgDDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678950611; a=rsa-sha256; cv=none; b=C2yFmuE5Vzusgp0ROUQLlRXQPmb73IuRKhTDiBd2kTAbXkWvPTz7UN1Xo+848jEi7II7Vv vGBEmhmhxMNjEp6t6hU9dUEFE9jbSnTW7N+85NDNY+9BQ9fuRo5CZAe3iw1DXOnI7Z2yVu Aewd2pbKx66rh+PrdkQ8Bkxydv9Zt7fYN/HF6l1cUIv7gRx0FLsVWO9IMnjGK/5o7wrrDQ AX4dvElCGeH+IGAltWrbUeyfmKM045PX3D0F8a1M+RR5fsqfaSDz65cGZKfxub8eBcmRsK Mtse1DqhUpdnaLJYPdzGqM8e0EdnIOrBt6/eGp+BvtMjcMYpWB4velj/vqH65A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Pcdgl3MF3zZ8r; Thu, 16 Mar 2023 07:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32G7AB9H075909; Thu, 16 Mar 2023 07:10:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32G7ABux075902; Thu, 16 Mar 2023 07:10:11 GMT (envelope-from git) Date: Thu, 16 Mar 2023 07:10:11 GMT Message-Id: <202303160710.32G7ABux075902@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: 2c92e193cc5f - main - ports-mgmt/rc-subr-jail: Bug fixes. List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c92e193cc5f7800b0f177b272edc772c10178be Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=2c92e193cc5f7800b0f177b272edc772c10178be commit 2c92e193cc5f7800b0f177b272edc772c10178be Author: Alexey Yushkin <636808@mail.ru> AuthorDate: 2023-03-03 10:59:38 +0000 Commit: Gleb Popov CommitDate: 2023-03-16 07:10:00 +0000 ports-mgmt/rc-subr-jail: Bug fixes. - Fix check for "jail_mount_devfs" knob. - Make "jail_nullfs_mounts" handle relative paths. Co-authored-by: Alexey Donskov --- ports-mgmt/rc-subr-jail/files/rc.subr.jail | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports-mgmt/rc-subr-jail/files/rc.subr.jail b/ports-mgmt/rc-subr-jail/files/rc.subr.jail index 7d16c34bf9ee..c40101bbe5b1 100644 --- a/ports-mgmt/rc-subr-jail/files/rc.subr.jail +++ b/ports-mgmt/rc-subr-jail/files/rc.subr.jail @@ -91,8 +91,8 @@ prepare_jail() _src=$(echo "$_mnt_line" | awk '{print $1}') _dst=$(echo "$_mnt_line" | awk '{print $2}') _opts=$(echo "$_mnt_line" | awk '{print $3}') - mkdir -p "$_dst" - mount_nullfs -o "$_opts" "$_src" "$_dst" + /bin/sh -c "cd \"$jroot\" && mkdir -p \"$_dst\"" + /bin/sh -c "cd \"$jroot\" && mount_nullfs -o \"$_opts\" \"$_src\" \"$_dst\"" done fi @@ -120,8 +120,8 @@ destroy_jail() echo "$jail_nullfs_mounts" | xargs -n 3 | while read -r _mnt_line; do local _dst _dst=$(echo "$_mnt_line" | awk '{print $2}') - umount "$_dst" - rmdir "$_dst" + /bin/sh -c "cd \"$jroot\" && umount \"$_dst\"" 2> /dev/null + /bin/sh -c "cd \"$jroot\" && rmdir \"$_dst\"" 2> /dev/null done fi