From b66bcab58ce73f86424b9a6ffbf9d3634e42f8ae Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 13 Sep 2012 14:36:57 -0700 Subject: Don't call can_write_to_file() if we already have 'fsp->can_write' set. --- source3/smbd/nttrans.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3') 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 { -- cgit