From nobody Fri Dec 27 17:06:28 2024 X-Original-To: dev-commits-src-branches@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 4YKX2s2Syqz5j2py; Fri, 27 Dec 2024 17:06:29 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YKX2r4RDfz4vtl; Fri, 27 Dec 2024 17:06:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735319188; 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=1j+4plllmORGEBrqJGYLvMKGh+boJCUMvaTh2IB/JiA=; b=IhNU+LpCCtCEihB/y9mRW2peFwYvfgFUhpFT2da/7nthLKT4YJPqKq9JcIlHeR4sO6/r64 gtfeuCd2hw1d6yYjLKBuxkk7qufplCFY8geTTyZN6BaRkeukx1Ubclxabwgbnh5UZav7EU y5eoae4rnK7VPI0mrTT9rqUN3UmkfQx/FPu9L2IAy0Y47yH4VI5VO+CeljFWrCb7kESbqe WNOoQdCE/KVp/ddrvoVbo4KjEIzBUvAmbKbbdkKEQDKvVcyKPdYgICcJyk9zj+x/Zx3N5w /Ci7cUmeqCEFA6kKMEVaCzhgN6CNWjSTn4hotq0qWhynEiCrJh/5zFObd8lW0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735319188; 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=1j+4plllmORGEBrqJGYLvMKGh+boJCUMvaTh2IB/JiA=; b=WUIQGND4+ujGJZgLERDfDrNu2+VXLZuDPN7QotGpcm8CdmjmOze9nKSQ+Y1t96Iewivmq/ FEM8vP6ig5WF6rIYjizb1TjNS42WU4z59FEWnYB+zXbNLm8kiZy8oeKhbXyd05S5DIyT7t s6ZxlSurhtl7heVr+SBJoR9cttPMxWAv3gBy8dSUOMnFHivVqinzqqdbfZDJEZ0gRbw6mq yAc8MesybqoxVQ9LKUkIOkRwtmQqWGj3E+CoNpzvDr3lgIFonvSvSEDEv2xswF5XsgzHT9 9xLxUgdkufory+OK1FD8BLmsYJJc/PmfknkFZ988l+gfV/TFEbeu3cfCUYrcyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735319188; a=rsa-sha256; cv=none; b=ylmpWKOLGbdWoBIIB+HjLtWG0vLQgfbarlskqKPg88TMhE1qfbW1F11ZxK65e/SwpvZbE2 l+ruYKRB04JUHKaY3OLvY8t/Q/7JdTCeNuseCsNqlffqpekVCun3kvI/Xo4/DEpPxQw0de dNLUCnn+3g7AVAnC1FPma7xggfO6g8DSD+6uI17/TiQnHYsi+0rGegMArhyjUqSvgXN516 wWIGI323KVrRmbqlpVpjXaf0LScEkRnu0XC93RTJ857IEW/V1qpy2VqQ9JYqK7VxZSdDtc EJvNH6qBs9bQrToVh8cc3AWHB7cM3m0s2+l6Wq3u2wbjgGZN8SwkG8wY8RhurA== 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 4YKX2r3ywsznhd; Fri, 27 Dec 2024 17:06:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BRH6S2X037566; Fri, 27 Dec 2024 17:06:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BRH6S99037563; Fri, 27 Dec 2024 17:06:28 GMT (envelope-from git) Date: Fri, 27 Dec 2024 17:06:28 GMT Message-Id: <202412271706.4BRH6S99037563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 32b7c5e7193a - stable/14 - cd9660: Apply the file and directory mode masks bits to all 12 access bits List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 32b7c5e7193ad051b637262b6c7cb315478609d1 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=32b7c5e7193ad051b637262b6c7cb315478609d1 commit 32b7c5e7193ad051b637262b6c7cb315478609d1 Author: John Baldwin AuthorDate: 2024-12-06 22:40:35 +0000 Commit: John Baldwin CommitDate: 2024-12-27 15:50:56 +0000 cd9660: Apply the file and directory mode masks bits to all 12 access bits This permits the mask bits to control the upper 3 bits used for setuid, setgid, and sticky permissions. While here, clarify the manpage language as non-Rockridge volumes with extended attributes can also supply users and groups along with permissions. Reviewed by: olce Fixes: 82f2275b73e5 cd9660: Add support for mask,dirmask,uid,gid options Differential Revision: https://reviews.freebsd.org/D47357 (cherry picked from commit c1ad5b4b10c5e426d3d782b7216a038187419a1e) --- sbin/mount_cd9660/mount_cd9660.8 | 23 ++++++++++++----------- sys/fs/cd9660/cd9660_vfsops.c | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/sbin/mount_cd9660/mount_cd9660.8 b/sbin/mount_cd9660/mount_cd9660.8 index af417d4d025e..325004a107f0 100644 --- a/sbin/mount_cd9660/mount_cd9660.8 +++ b/sbin/mount_cd9660/mount_cd9660.8 @@ -75,30 +75,31 @@ version number. .It Fl G Ar group Set the group of the files in the file system to .Ar group . -The default gid on non-Rockridge volumes is zero. +The default gid on volumes without extended attributes or Rockridge extensions +is zero. .It Fl U Ar user Set the owner of the files in the file system to .Ar user . -The default uid on non-Rockridge volumes is zero. +The default uid on volumes without extended attributes or Rockridge extensions +is zero. .It Fl m Ar mask Specify the maximum file permissions for files in the file system. -(For example, a +For example, a .Ar mask of -.Li 755 -specifies that, by default, the owner should have -read, write, and execute permissions for files, but -others should only have read and execute permissions). +.Li 544 +limits the owner to +read and execute permissions for files and +others to only read permission. See .Xr chmod 1 for more information about octal file modes. -Only the nine low-order bits of -.Ar mask -are used. The default .Ar mask -on non-Rockridge volumes is 755. +is 7777. +The default permissions on volumes without extended attributes or Rockridge +extensions is 555. .It Fl M Ar mask Specify the maximum file permissions for directories in the file system. diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 76c20c3cf5ca..dbe505944dde 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -397,7 +397,7 @@ iso_mountfs(struct vnode *devvp, struct mount *mp) isomp->im_mountp = mp; isomp->im_dev = dev; isomp->im_devvp = devvp; - isomp->im_fmask = isomp->im_dmask = ACCESSPERMS; + isomp->im_fmask = isomp->im_dmask = ALLPERMS; vfs_flagopt(mp->mnt_optnew, "norrip", &isomp->im_flags, ISOFSMNT_NORRIP); vfs_flagopt(mp->mnt_optnew, "gens", &isomp->im_flags, ISOFSMNT_GENS);