summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-11-27 14:22:29 +1100
committerAndrew Tridgell <tridge@samba.org>2009-11-27 16:05:06 +1100
commitd78921d78ca0a9211f044092b9a7f29bcfdd5397 (patch)
treefa5a9da89864eeb47d261c6af1f405bd0eb84f3f /source4
parentd5387edb88ce29ad1a6f864415c19486a20269af (diff)
downloadsamba-d78921d78ca0a9211f044092b9a7f29bcfdd5397.tar.gz
samba-d78921d78ca0a9211f044092b9a7f29bcfdd5397.tar.bz2
samba-d78921d78ca0a9211f044092b9a7f29bcfdd5397.zip
s4-pvfs: fixed access check failure in SFILEINFO test
matching windows behaviour is not always the right thing to do!
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/posix/pvfs_open.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index b100c856b4..621db3cf1d 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -1941,15 +1941,12 @@ NTSTATUS pvfs_can_update_file_size(struct pvfs_state *pvfs,
NTCREATEX_SHARE_ACCESS_WRITE |
NTCREATEX_SHARE_ACCESS_DELETE;
/*
- * I would have thought that we would need to pass
- * SEC_FILE_WRITE_DATA | SEC_FILE_APPEND_DATA here too
- *
- * But you only need SEC_FILE_WRITE_ATTRIBUTE permissions
- * to set the filesize.
- *
- * --metze
+ * this code previous set only SEC_FILE_WRITE_ATTRIBUTE, with
+ * a comment that this seemed to be wrong, but matched windows
+ * behaviour. It now appears that this windows behaviour is
+ * just a bug.
*/
- access_mask = SEC_FILE_WRITE_ATTRIBUTE;
+ access_mask = SEC_FILE_WRITE_ATTRIBUTE | SEC_FILE_WRITE_DATA | SEC_FILE_APPEND_DATA;
delete_on_close = false;
break_to_none = true;