FreeBSD Bugzilla – Attachment 80002 Details for
Bug 114847
[ntfs] [patch] [request] dirmask support for NTFS ala MSDOSFS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ntfs_vnops.c.patch
ntfs_vnops.c.patch (text/x-patch), 1.77 KB, created by
Ighighi
on 2007-07-24 05:55:40 UTC
(
hide
)
Description:
ntfs_vnops.c.patch
Filename:
MIME Type:
Creator:
Ighighi
Created:
2007-07-24 05:55:40 UTC
Size:
1.77 KB
patch
obsolete
># ># (!c) 2007 by Ighighi ># ># This patch adds search permissions to directories on NTFS volumes so ># you don't need to add them to the "-m mask" option in mount_ntfs(8) ># since those permissions most likely make no sense on files anyway... ># ># 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/ntfs ># make clean && make && make install clean ># kldunload -v ntfs ># kldload -v ntfs ># ># Enjoy, you may now use -m644 in /etc/fstab and still browse directories: ># /dev/ad0s1 /mnt/win ntfs ro,noexec,noatime,-m644 0 0 ># > >--- src/sys/fs/ntfs/ntfs_vnops.c.orig 2006-11-15 21:47:02.000000000 -0400 >+++ src/sys/fs/ntfs/ntfs_vnops.c 2007-07-23 19:29:09.000000000 -0400 >@@ -187,6 +187,8 @@ > vap->va_fsid = dev2udev(ip->i_dev); > vap->va_fileid = ip->i_number; > vap->va_mode = ip->i_mp->ntm_mode; >+ if (vp->v_type == VDIR) >+ vap->va_mode |= (VEXEC | VEXEC >> 3 | VEXEC >> 6); > vap->va_nlink = (ip->i_nlink || ip->i_flag & IN_LOADED ? ip->i_nlink : 1); > vap->va_uid = ip->i_mp->ntm_uid; > vap->va_gid = ip->i_mp->ntm_gid; >@@ -392,13 +394,17 @@ > { > struct vnode *vp = ap->a_vp; > struct ntnode *ip = VTONT(vp); >- mode_t mode = ap->a_mode; >+ mode_t file_mode, mode = ap->a_mode; > #ifdef QUOTA > int error; > #endif > > dprintf(("ntfs_access: %d\n",ip->i_number)); > >+ file_mode = ip->i_mp->ntm_mode; >+ if (vp->v_type == VDIR) >+ file_mode |= (S_IXUSR | S_IXGRP | S_IXOTH); >+ > /* > * Disallow write attempts on read-only filesystems; > * unless the file is a socket, fifo, or a block or >@@ -419,7 +425,7 @@ > } > } > >- return (vaccess(vp->v_type, ip->i_mp->ntm_mode, ip->i_mp->ntm_uid, >+ return (vaccess(vp->v_type, file_mode, ip->i_mp->ntm_uid, > ip->i_mp->ntm_gid, ap->a_mode, ap->a_cred, NULL)); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 114847
:
80001
| 80002 |
80003