From nobody Fri Dec 27 17:06:52 2024 X-Original-To: dev-commits-src-all@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 4YKX3M6Mcxz5j3Fk; Fri, 27 Dec 2024 17:06:55 +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 4YKX3K29ZQz3wxY; Fri, 27 Dec 2024 17:06:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735319213; 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=h4D8Roj+ez7fYNPZv45wF/LFNBZyJZM9Fa7/PII9Cdk=; b=CaU8EQxWT6A1tKgxnyu0j0mS/NUwI/8jqyWGw//X9TwQ8znf38OoYUamDm6WaKuNsgfgg8 AsynJUNpxfJpidTM2xr2frv4mjqkVqOdUXccpcAKzyY3XcOK2KsE+dOuXfdiy++kK1oULQ lweYiQZVqIDgS7oE/LmviMU9zblyXf2moPgLS/n4Dav81wHdvedn8fsVBLDqirUQMk/exN tAWM+IBrcgQE/LspT5z+CYkok8MmOFrA2VI+UUWDXsF6xW/b/pwWDrHFeIALapUe4/xUvR 7JtSXwAMMCFDyMaZTOBrK+t6qYlgzksZqxCC22mtZ5xBwxB5BIRNiN/n8YaREw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735319213; 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=h4D8Roj+ez7fYNPZv45wF/LFNBZyJZM9Fa7/PII9Cdk=; b=S1Y8d0JVPBNCGQ2ylji/oOIHcrIQTew2GQQ1z/17ddA2lmsyorcPbYMx7iml0J0puyS7VC 2D6l5M+tY6atGcUvBhaBZXTRPDTUKBNK84HlXKN8ra2Dq7Jg8C2793BR+ob27rsTP8OGs0 cYBuBtQZp4riJpujwMe0zeP3YXp5H/QhdildWChKTpQGqMH7eD9dgJu8zHhZvu18R/smng eZG74afV9CnXo+5Q/Ih7gXQglkOv/wdEiw64qjCw92eA9I4nZyn/mdvQ69agS6/28gIR0+ tW0O4hm/Y7DFHDbohJ8YNVcpdpLAqzVaVLN+XSe+Xs1kZkAM20OwaCEdo/KCiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735319213; a=rsa-sha256; cv=none; b=C/ICsojuH7/CimqidcxB9dYp/9FKS8cdhrdj1RTIhTdufZEHLCqsU9ddF6hYT1EsreManA wLOHlvfX4uPM0qi8mYOz+GJibO4XlLKkdIA918HrIJN3mE5j5nyO8zfGVB76zEzABm62Jt nlN7M59T4zRcHMS0Arz8UQC0NMsCxqkmbnB9t7LweQpOpz6e78AkBgDBzmJoelTCyhI50H Qlbos9Iz6cjju9vMjGw1S1dWLDI5aXgUGTEB2+WFNZAjlSaGb6sMyJrfJKVAZh9D1l7VVd Wmk5emVIcm2xJmiY2+6/v+Ai1LysKFe4NOsz4Ll14mEICVQLtUjxCIJPen3kMg== 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 4YKX3J6mcYznjc; Fri, 27 Dec 2024 17:06:52 +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 4BRH6qbR038457; Fri, 27 Dec 2024 17:06:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BRH6q1o038454; Fri, 27 Dec 2024 17:06:52 GMT (envelope-from git) Date: Fri, 27 Dec 2024 17:06:52 GMT Message-Id: <202412271706.4BRH6q1o038454@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: 9263f0031850 - stable/13 - cd9660: Apply the file and directory mode masks bits to all 12 access bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/13 X-Git-Reftype: branch X-Git-Commit: 9263f003185035cf286eb0257c1fea9f703c5f93 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9263f003185035cf286eb0257c1fea9f703c5f93 commit 9263f003185035cf286eb0257c1fea9f703c5f93 Author: John Baldwin AuthorDate: 2024-12-06 22:40:35 +0000 Commit: John Baldwin CommitDate: 2024-12-27 15:51:01 +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 c3339438fcd8..1cc2040c7305 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -399,7 +399,7 @@ iso_mountfs(devvp, 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);