summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-02-26 10:26:33 +0100
committerStefan Metzmacher <metze@samba.org>2008-02-26 13:53:15 +0100
commit55377f0352d73fa354e8abcf3e644c63c78d0ca6 (patch)
tree0369b243c790ba1ab3d2255e3492edb670f238c7 /source4
parentc62faaa75e2bf2c82b7a905b27d29f70ae0c7591 (diff)
downloadsamba-55377f0352d73fa354e8abcf3e644c63c78d0ca6.tar.gz
samba-55377f0352d73fa354e8abcf3e644c63c78d0ca6.tar.bz2
samba-55377f0352d73fa354e8abcf3e644c63c78d0ca6.zip
pvfs_open: pass down an access mask to pvfs_can_update_file_size()
You just need SEC_FILE_WRITE_ATTRIBUTE to change the filesize... metze (This used to be commit 27e39063a0b759c7bced1cc9d7a6cb9192820c70)
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/posix/pvfs_open.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index 0e4250d744..a01352f60c 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -1648,9 +1648,19 @@ NTSTATUS pvfs_can_update_file_size(struct pvfs_state *pvfs,
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- /* TODO: this may needs some more flags */
- share_access = NTCREATEX_SHARE_ACCESS_WRITE;
- access_mask = 0;
+ share_access = NTCREATEX_SHARE_ACCESS_READ |
+ 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
+ */
+ access_mask = SEC_FILE_WRITE_ATTRIBUTE;
delete_on_close = false;
break_to_none = true;