diff options
author | bp <bp@FreeBSD.org> | 2006-11-05 06:38:42 +0000 |
---|---|---|
committer | bp <bp@FreeBSD.org> | 2006-11-05 06:38:42 +0000 |
commit | 85d804ea67ac9184d4002b5aa06b96f384cae596 (patch) | |
tree | 20005aa8f27e6b631e9fa503f795e1976e10d214 /sys/fs/smbfs/smbfs_node.c | |
parent | 499769a9434f854d8c58f011509ffae07d45e003 (diff) | |
download | FreeBSD-src-85d804ea67ac9184d4002b5aa06b96f384cae596.zip FreeBSD-src-85d804ea67ac9184d4002b5aa06b96f384cae596.tar.gz |
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
Diffstat (limited to 'sys/fs/smbfs/smbfs_node.c')
-rw-r--r-- | sys/fs/smbfs/smbfs_node.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 <sys/mount.h> #include <sys/proc.h> #include <sys/queue.h> +#include <sys/stat.h> #include <sys/sysctl.h> #include <sys/time.h> #include <sys/vnode.h> @@ -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 |