summaryrefslogtreecommitdiffstats
path: root/source4/ntvfs/posix/pvfs_read.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-24 08:31:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:02:25 -0500
commit3d5f3e39e5786612a2aa24ec98264c52907e67f2 (patch)
tree5f68660703faa135b79b025fcae765323ef8acd5 /source4/ntvfs/posix/pvfs_read.c
parentc785ca65040d985599bba6736af55240eae894aa (diff)
downloadsamba-3d5f3e39e5786612a2aa24ec98264c52907e67f2.tar.gz
samba-3d5f3e39e5786612a2aa24ec98264c52907e67f2.tar.xz
samba-3d5f3e39e5786612a2aa24ec98264c52907e67f2.zip
r3147: added basic share modes support for pvfs (or more precisely, ntcreatex
share_access support). This is enough for us to pass the BASE-DENY2 test, but is a long way from fully correct share modes. (This used to be commit b5a6dd3cbf28a3a3b3a3656042ac8f50fca29e1c)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_read.c')
-rw-r--r--source4/ntvfs/posix/pvfs_read.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_read.c b/source4/ntvfs/posix/pvfs_read.c
index 7256fd8e16..530fb82798 100644
--- a/source4/ntvfs/posix/pvfs_read.c
+++ b/source4/ntvfs/posix/pvfs_read.c
@@ -47,6 +47,10 @@ NTSTATUS pvfs_read(struct ntvfs_module_context *ntvfs,
return NT_STATUS_FILE_IS_A_DIRECTORY;
}
+ if (!(f->access_mask & SA_RIGHT_FILE_READ_DATA)) {
+ return NT_STATUS_ACCESS_VIOLATION;
+ }
+
status = pvfs_check_lock(pvfs, f, req->smbpid,
rd->readx.in.offset,
rd->readx.in.maxcnt,