summaryrefslogtreecommitdiffstats
path: root/sys/fs/ntfs
diff options
context:
space:
mode:
authormaxim <maxim@FreeBSD.org>2007-11-17 17:05:01 +0000
committermaxim <maxim@FreeBSD.org>2007-11-17 17:05:01 +0000
commit8654cdfefcb4519bac05fdf8a5836e2f668d501d (patch)
treeb269b5ea31da7e5e8878c1bf2ecffbb2a31e0e82 /sys/fs/ntfs
parent31bc38f0954a83e10570165280ae0827e3f1eb80 (diff)
downloadFreeBSD-src-8654cdfefcb4519bac05fdf8a5836e2f668d501d.zip
FreeBSD-src-8654cdfefcb4519bac05fdf8a5836e2f668d501d.tar.gz
o Mask maximum file permissions we get from mount_ntfs -m
with ACCESSPERMS. Document in mount_ntfs(8) only the nine low-order bits of mask are used (taken from mount_msdosfs(8)). PR: kern/114856 Submitted by: Ighighi MFC after: 1 month
Diffstat (limited to 'sys/fs/ntfs')
-rw-r--r--sys/fs/ntfs/ntfs_vfsops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c
index 10ad461..a7da732 100644
--- a/sys/fs/ntfs/ntfs_vfsops.c
+++ b/sys/fs/ntfs/ntfs_vfsops.c
@@ -41,6 +41,7 @@
#include <sys/buf.h>
#include <sys/fcntl.h>
#include <sys/malloc.h>
+#include <sys/stat.h>
#include <sys/systm.h>
#include <geom/geom.h>
@@ -331,7 +332,7 @@ ntfs_mountfs(devvp, mp, td)
if (1 == vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v))
ntmp->ntm_gid = v;
if (1 == vfs_scanopt(mp->mnt_optnew, "mode", "%d", &v))
- ntmp->ntm_mode = v;
+ ntmp->ntm_mode = v & ACCESSPERMS;
vfs_flagopt(mp->mnt_optnew,
"caseins", &ntmp->ntm_flag, NTFS_MFLAG_CASEINS);
vfs_flagopt(mp->mnt_optnew,
OpenPOWER on IntegriCloud