summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-09-13 14:36:57 -0700
committerJeremy Allison <jra@samba.org>2012-09-14 22:54:29 +0200
commitb66bcab58ce73f86424b9a6ffbf9d3634e42f8ae (patch)
tree58e47f7e8c479aa4e05bc66c1440f863710390e1 /source3
parent35a4a1ed1f0fc6f1cbccd31bb7db9431b2518a5b (diff)
downloadsamba-b66bcab58ce73f86424b9a6ffbf9d3634e42f8ae.tar.gz
samba-b66bcab58ce73f86424b9a6ffbf9d3634e42f8ae.tar.bz2
samba-b66bcab58ce73f86424b9a6ffbf9d3634e42f8ae.zip
Don't call can_write_to_file() if we already have 'fsp->can_write' set.
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/nttrans.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 997f72161a..6848d10397 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -718,6 +718,7 @@ void reply_ntcreate_and_X(struct smb_request *req)
uint32 perms = 0;
p += 25;
if (fsp->is_directory ||
+ fsp->can_write ||
can_write_to_file(conn, smb_fname)) {
perms = FILE_GENERIC_ALL;
} else {
@@ -1345,6 +1346,7 @@ static void call_nt_transact_create(connection_struct *conn,
uint32 perms = 0;
p += 25;
if (fsp->is_directory ||
+ fsp->can_write ||
can_write_to_file(conn, smb_fname)) {
perms = FILE_GENERIC_ALL;
} else {