From 85d804ea67ac9184d4002b5aa06b96f384cae596 Mon Sep 17 00:00:00 2001 From: bp Date: Sun, 5 Nov 2006 06:38:42 +0000 Subject: Create a bidirectional mapping of the DOS 'read only' attribute to the 'w' flag. PR: kern/77958 Submitted by: ghozzy gmail com MFC after: 1 month --- sys/fs/smbfs/smbfs_node.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys/fs/smbfs/smbfs_node.c') diff --git a/sys/fs/smbfs/smbfs_node.c b/sys/fs/smbfs/smbfs_node.c index 45ab034..52e3565 100644 --- a/sys/fs/smbfs/smbfs_node.c +++ b/sys/fs/smbfs/smbfs_node.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -421,6 +422,8 @@ smbfs_attr_cachelookup(struct vnode *vp, struct vattr *va) va->va_type = vp->v_type; /* vnode type (for create) */ if (vp->v_type == VREG) { va->va_mode = smp->sm_file_mode; /* files access mode and type */ + if (np->n_dosattr & SMB_FA_RDONLY) + va->va_mode &= ~(S_IWUSR|S_IWGRP|S_IWOTH); } else if (vp->v_type == VDIR) { va->va_mode = smp->sm_dir_mode; /* files access mode and type */ } else -- cgit v1.1