diff --git a/sbin/mount_ntfs/mount_ntfs.8 b/sbin/mount_ntfs/mount_ntfs.8 index 15f49dffc2a0..059618fd3127 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 November 17, 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 38302360a2bb..2207a1f11ff9 100644 --- a/sys/fs/ntfs/ntfs_vfsops.c +++ b/sys/fs/ntfs/ntfs_vfsops.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -318,7 +319,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,