diff --git a/sbin/mount_ntfs/mount_ntfs.8 b/sbin/mount_ntfs/mount_ntfs.8 index 15f49dffc2a0..2b13bf0c4f0c 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 10ad461618ba..a7da73255916 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 @@ -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,