diff options
author | maxim <maxim@FreeBSD.org> | 2007-11-17 17:05:01 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2007-11-17 17:05:01 +0000 |
commit | 8654cdfefcb4519bac05fdf8a5836e2f668d501d (patch) | |
tree | b269b5ea31da7e5e8878c1bf2ecffbb2a31e0e82 | |
parent | 31bc38f0954a83e10570165280ae0827e3f1eb80 (diff) | |
download | FreeBSD-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
-rw-r--r-- | sbin/mount_ntfs/mount_ntfs.8 | 5 | ||||
-rw-r--r-- | sys/fs/ntfs/ntfs_vfsops.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sbin/mount_ntfs/mount_ntfs.8 b/sbin/mount_ntfs/mount_ntfs.8 index 15f49df..2b13bf0 100644 --- a/sbin/mount_ntfs/mount_ntfs.8 +++ b/sbin/mount_ntfs/mount_ntfs.8 @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 3, 1999 +.Dd 17 November, 2007 .Dt MOUNT_NTFS 8 .Os .Sh NAME @@ -82,6 +82,9 @@ on which the file system is being mounted. .It Fl m Ar mask Specify the maximum file permissions for files in the file system. +Only the nine low-order bits of +.Ar mask +are used. .It Fl C Ar charset Specify local .Ar charset 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, |