summaryrefslogtreecommitdiff
path: root/source3/smbd/close.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-11-15 17:41:48 -0800
committerJeremy Allison <jra@samba.org>2011-11-15 17:41:48 -0800
commit865bc0c0ace0a4f8e5eb0277def2315867273071 (patch)
tree2ab9337880684abf24e7cf7d89f4b53361c18fc9 /source3/smbd/close.c
parent86c16092194836d8478144b97da9ca08aec7fac6 (diff)
downloadsamba-865bc0c0ace0a4f8e5eb0277def2315867273071.tar.gz
samba-865bc0c0ace0a4f8e5eb0277def2315867273071.tar.bz2
samba-865bc0c0ace0a4f8e5eb0277def2315867273071.zip
Remove the check for FILE_WRITE_ATTRIBUTES from smb_set_file_time(). It
is called from places like fileio.c that need to update the write time on a file handle only open for write, without neccessarily having FILE_WRITE_ATTRIBUTES permission. Move all checks to before the smb_set_file_time() callers.
Diffstat (limited to 'source3/smbd/close.c')
-rw-r--r--source3/smbd/close.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index b736432a82..837e360769 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -581,11 +581,9 @@ static NTSTATUS update_write_time_on_close(struct files_struct *fsp)
}
ft.mtime = fsp->close_write_time;
- /* We must use NULL for the fsp handle here, as smb_set_file_time()
- checks the fsp access_mask, which may not include FILE_WRITE_ATTRIBUTES.
- As this is a close based update, we are not directly changing the
+ /* As this is a close based update, we are not directly changing the
file attributes from a client call, but indirectly from a write. */
- status = smb_set_file_time(fsp->conn, NULL, fsp->fsp_name, &ft, false);
+ status = smb_set_file_time(fsp->conn, fsp, fsp->fsp_name, &ft, false);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10,("update_write_time_on_close: smb_set_file_time "
"on file %s returned %s\n",