From nobody Fri Dec 06 22:48:24 2024 X-Original-To: dev-commits-src-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 4Y4md46sjDz5g2D5; Fri, 06 Dec 2024 22:48:24 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y4md46L7Cz4FrX; Fri, 6 Dec 2024 22:48:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733525304; 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=SLnw7YFwVXiAvnC3Wxg3B86aW1DUtomXzGrnUTNTIkI=; b=T4/tmnV8jClcIdzc2/HhPXK+a5BPHkaLsHYcB6P42AhPM3kampvzwDH/9Zlnmrny9Ui7aW xJbKh8s+BM2Y9DwkmwdxROAMLU2QirEzbtrw9O33xHuEI2fW9PTHyfpfBKC1A/4hkJNnC1 yAs/HQLizJGuH4jtYyaI0J7D1s0O0bshzx7LK4dB55dzq7spXRwy6+Q1m8pmemHucpdxXD 8fElDESIeONrcbnhZx0ZDxiJtw33QHSW1cvf64l1OT2YfNe6zQKUJ4YmsljO8THjj1JQJj PtxyeIBJEpoBCVvy4KrMKfRSnPa4Kb1Yob175JHI2h5ytz45K8NWXPMwovSkdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733525304; 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=SLnw7YFwVXiAvnC3Wxg3B86aW1DUtomXzGrnUTNTIkI=; b=pgQJXN+SPFnqe0nj+YFz39H7cA9bFWKW2egueyBJatlSJ/N9s+1rZw7jLifqqH7gs2k77e VGxHfcHtGMg6E+WWwakyBwCvF1/qEG3fSBvbC9bhkB/Ptp2LqIjun2iO8diPOSq6vUNbQd TiSb9ba7lY+RtdG6+2UISpVFaakcZtd5j3M3V3k6/W8hIBvos86AN+0YEx9zo4ogGUCxyk 9dsrZT7Z5JdWcfWa755KqjkBkXLpNxhqsC38dANG4pyP3l9JQMZ2KTv+ffjkI+4j+D0P9n CDRiYndCQhnDsNGGYhpCNvn+NhzHuPVThYPZnhkSMZEXGLSGUYZ8zbE/ltepNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733525304; a=rsa-sha256; cv=none; b=WSNO6LXHSUi0CkOzioYxra/Vl8DHRhNfLAc3LUNr49qJiT2fCjVwFeOMvrwWcBRhOYMH3e muya7HrX2YiDewetAieEpU9yD4XGz8gOdOTRfiAgp4z+G+enS/rq8oUXGYAl3li1qJ4cTB OAiSu2gbN8k4D/m5qtIrmbFR4lerlyVUudf1TgBJLe8TKaIcalwT+80eOno3ITywB+JSkT Ly0LSBpjIVI2dx36cnNxY1kppnwkN+2I8jklNhW/c3WT7V0F5soDJ+c1i9hirkNMvUfs+c 44jS9qG86UCGfWbHnUPI2xyJJwx4/4diknmYBZ0+zDXCTSaKCh6KhERL3CD/WA== 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 4Y4md45q1GzxLZ; Fri, 6 Dec 2024 22:48:24 +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 4B6MmOdA009204; Fri, 6 Dec 2024 22:48:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B6MmOja009201; Fri, 6 Dec 2024 22:48:24 GMT (envelope-from git) Date: Fri, 6 Dec 2024 22:48:24 GMT Message-Id: <202412062248.4B6MmOja009201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c1ad5b4b10c5 - main - cd9660: Apply the file and directory mode masks bits to all 12 access bits List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: c1ad5b4b10c5e426d3d782b7216a038187419a1e Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c1ad5b4b10c5e426d3d782b7216a038187419a1e commit c1ad5b4b10c5e426d3d782b7216a038187419a1e Author: John Baldwin AuthorDate: 2024-12-06 22:40:35 +0000 Commit: John Baldwin CommitDate: 2024-12-06 22:40:35 +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 --- 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 017ad7ee9a11..19c3ca5cf012 100644 --- a/sbin/mount_cd9660/mount_cd9660.8 +++ b/sbin/mount_cd9660/mount_cd9660.8 @@ -73,30 +73,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 814f49f58ae1..b4db4c4f7331 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -394,7 +394,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);