summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_socket.c
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2002-01-13 05:36:05 +0000
committeriedowse <iedowse@FreeBSD.org>2002-01-13 05:36:05 +0000
commita2d0f7e01a2246e45ce6707cf802a6548673446c (patch)
tree8bb0b2e081b2068336c469f210f6ebe76c340b8b /sys/kern/sys_socket.c
parentd3725c9bff8c5f1ba4af4eb0e3e07d0de20d08e6 (diff)
downloadFreeBSD-src-a2d0f7e01a2246e45ce6707cf802a6548673446c.zip
FreeBSD-src-a2d0f7e01a2246e45ce6707cf802a6548673446c.tar.gz
It is required by VOP_CREATE, VOP_MKNOD, VOP_SYMLINK and VOP_MKDIR
that va_mode of the supplied attributes is filled in with a valid file mode (i.e not VNOVAL, and only ALLPERM bits set). However, some NFS server op functions didn't guarantee this for all possible request messages: If a V3 client chose not include to a mode specification, we could end up creating an ffs inode with mode 0177777, requiring a manual fsck on the next reboot. Fix this by setting va_mode to 0 before calling the VOP if a mode hasn't been supplied by the client. In nfsrv_symlink(), S_IFMT bits supplied by a V2 client could end up in the va_mode passed to VOP_SYMLINK with similar effects. We now use the macro nfstov_mode() to correctly mask the bits.
Diffstat (limited to 'sys/kern/sys_socket.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud