This patch adds arbitrary mask, dirmask, uid & gid support to ISO9660 ala MSDOSFS. It is necessary because legitimate data in CD-ROM and ISO images may be inaccessible when ownership is assigned to root/wheel. The mask/dirmask options let the user override the ugly 0555 permissions of files where the executable bit makes no sense. Successfully built & tested on 6.2-STABLE with patch to -CURRENT pending. The mount_cd9660(8) in -CURRENT that uses nmount() instead of the old mount() ran successfully too. Fix: To apply this patch, run: patch -d /usr < /path/do/patch Now, either rebuild the world and the kernel or run: cd /usr/src/sys/modules/cd9660 make clean obj depend && make && make install clean cp -f /sys/isofs/cd9660/iso.h /usr/include/isofs/cd9660/ cp -f /sys/isofs/cd9660/cd9660_mount.h /usr/include/isofs/cd9660/ cd /usr/src/sbin/mount_cd9660 make clean obj depend && make && make install clean kldunload -v cd9660 kldload -v cd9660 Enjoy, you may use a line like this in /etc/fstab: /dev/cdrom /media/cdrom cd9660 ro,noauto,nosuid,-m644,-M755 0 0 From the command line: mount_cd9660 -o ro -m 660 -M 750 -U `whoami` -G staff /dev/cdrom ~/cdrom Patch attached with submission follows:
NOTE: This version applies to -CURRENT This patch adds arbitrary mask, dirmask, uid & gid support to ISO9660 ala MSDOSFS. It is necessary because legitimate data in CD-ROM and ISO images may be inaccessible when ownership is assigned to root/wheel. The mask/dirmask options let the user override the ugly 0555 permissions of files where the executable bit makes no sense. To apply this patch, run: patch -d /usr < /path/do/patch Now, either rebuild the world and the kernel or run: cd /usr/src/sys/modules/cd9660 make clean obj depend && make && make install clean cp -f /sys/fs/cd9660/iso.h /usr/include/fs/cd9660/ cp -f /sys/fs/cd9660/cd9660_mount.h /usr/include/fs/cd9660/ cd /usr/src/sbin/mount_cd9660 make clean obj depend && make && make install clean kldunload -v cd9660 kldload -v cd9660 Enjoy, you may use a line like this in /etc/fstab: /dev/cdrom /media/cdrom cd9660 ro,noauto,nosuid,-m644,-M755 0 0 From the command line: mount_cd9660 -o ro -m 660 -M 750 -U `whoami` -G staff /dev/cdrom ~/cdrom
This patch addresses a bug in the previous commit for RELENG_6 that made the newly added options mandatory. Also, an "umount -a -t cd9660" was missing from the following instructions: To apply this patch, run: patch -d /usr < /path/do/patch Now, either rebuild the world and the kernel or run: cd /usr/src/sys/modules/cd9660 make clean obj depend && make && make install clean cp -f /sys/isofs/cd9660/iso.h /usr/include/isofs/cd9660/ cp -f /sys/isofs/cd9660/cd9660_mount.h /usr/include/isofs/cd9660/ cd /usr/src/sbin/mount_cd9660 make clean obj depend && make && make install clean umount -a -t cd9660 kldunload -v cd9660 kldload -v cd9660
This patch addresses a bug in the previous commit for -CURRENT that made the newly added options mandatory (though the new nmount() call made it a non-issue with mount_cd9660(8) Also, an "umount -a -t cd9660" was missing from the following instructions: To apply this patch, run: patch -d /usr < /path/do/patch Now, either rebuild the world and the kernel or run: cd /usr/src/sys/modules/cd9660 make clean obj depend && make && make install clean cp -f /sys/isofs/cd9660/iso.h /usr/include/isofs/cd9660/ cp -f /sys/isofs/cd9660/cd9660_mount.h /usr/include/isofs/cd9660/ cd /usr/src/sbin/mount_cd9660 make clean obj depend && make && make install clean umount -a -t cd9660 kldunload -v cd9660 kldload -v cd9660
This new version (for RELENG_6) allows overriding Rockridge uid/gid, file and directory permissions ala MSDOS. To apply this patch, run: patch -d /usr < /path/do/patch Now, either rebuild the world and the kernel or run: cd /usr/src/sys/modules/cd9660 make clean obj depend && make && make install clean cp -f /sys/isofs/cd9660/iso.h /usr/include/isofs/cd9660/ cp -f /sys/isofs/cd9660/cd9660_mount.h /usr/include/isofs/cd9660/ cd /usr/src/sbin/mount_cd9660 make clean obj depend && make && make install clean umount -a -t cd9660 kldunload -v cd9660 kldload -v cd9660 You may now add the following line to /etc/fstab: /dev/acd0 /media/cdrom ro,noauto,nosuid,nodev,-m640,-M750,-Uuser,-Ggroup 0 0 Or run mount_cd9660(8) as: mount_cd9660 -o ro,nosuid,nodev -m640 -M750 -U`whoami` -G`id -g` Enjoy ;)
This new version (for -CURRENT) allows overriding Rockridge uid/gid, file and directory permissions ala MSDOS. To apply this patch, run: patch -d /usr < /path/do/patch Now, either rebuild the world and the kernel or run: cd /usr/src/sys/modules/cd9660 make clean obj depend && make && make install clean cp -f /sys/isofs/cd9660/iso.h /usr/include/isofs/cd9660/ cp -f /sys/isofs/cd9660/cd9660_mount.h /usr/include/isofs/cd9660/ cd /usr/src/sbin/mount_cd9660 make clean obj depend && make && make install clean umount -a -t cd9660 kldunload -v cd9660 kldload -v cd9660 You may now add the following line to /etc/fstab: /dev/acd0 /media/cdrom ro,noauto,nosuid,nodev,-m640,-M750,-Uuser,-Ggroup 0 0 Or run mount_cd9660(8) as: mount_cd9660 -o ro,nosuid,nodev -m640 -M750 -U`whoami` -G`id -g` Enjoy ;)
Responsible Changed From-To: freebsd-bugs->freebsd-fs Over to maintainers.