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
This commit is contained in:
Maxim Konovalov 2007-11-17 17:05:01 +00:00
parent 4adf89efc6
commit 3f61687ba1
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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,