Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Dec 2024 17:06:52 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 9263f0031850 - stable/13 - cd9660: Apply the file and directory mode masks bits to all 12 access bits
Message-ID:  <202412271706.4BRH6q1o038454@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=9263f003185035cf286eb0257c1fea9f703c5f93

commit 9263f003185035cf286eb0257c1fea9f703c5f93
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-12-06 22:40:35 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202412271706.4BRH6q1o038454>