summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_open.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-07 02:14:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:29 -0500
commitad7da47948a5a3ed2c3fc18392b83c059bec5b6e (patch)
tree2b9dda60131d9bc259917be21fa63e669f94dbef /source4/ntvfs/posix/pvfs_open.c
parent1a019f988385ee8ef947fc5054ee86b9c2cc632e (diff)
downloadsamba-ad7da47948a5a3ed2c3fc18392b83c059bec5b6e.tar.gz
samba-ad7da47948a5a3ed2c3fc18392b83c059bec5b6e.tar.bz2
samba-ad7da47948a5a3ed2c3fc18392b83c059bec5b6e.zip
r4584: fix pvfs backend to pass the new enhanced RAW-ACLS test. Easy once I really the
strange behaviour I saw was a w2k3 bug :-) (This used to be commit e729061bcde25d0565a72222e4720ca8074ef23f)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_open.c')
-rw-r--r--source4/ntvfs/posix/pvfs_open.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index c59f2d22e9..b34d75d24d 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -199,7 +199,7 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
/* check the security descriptor */
status = pvfs_access_check(pvfs, req, name, &access_mask);
} else {
- status = pvfs_access_check_create(pvfs, req, name);
+ status = pvfs_access_check_create(pvfs, req, name, &access_mask);
}
if (!NT_STATUS_IS_OK(status)) {
idr_remove(pvfs->idtree_fnum, fnum);
@@ -452,23 +452,16 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
mode_t mode;
uint32_t attrib;
- status = pvfs_access_check_create(pvfs, req, name);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
if ((io->ntcreatex.in.file_attr & FILE_ATTRIBUTE_READONLY) &&
(create_options & NTCREATEX_OPTIONS_DELETE_ON_CLOSE)) {
return NT_STATUS_CANNOT_DELETE;
}
- if (access_mask & SEC_FLAG_MAXIMUM_ALLOWED) {
- access_mask = SEC_RIGHTS_FILE_READ | SEC_RIGHTS_FILE_WRITE |
- SEC_STD_WRITE_DAC | SEC_STD_READ_CONTROL;
+ status = pvfs_access_check_create(pvfs, req, name, &access_mask);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
}
- access_mask |= SEC_FILE_READ_ATTRIBUTE;
-
if (access_mask & (SEC_FILE_WRITE_DATA | SEC_FILE_APPEND_DATA)) {
flags = O_RDWR;
} else {