From 5185460067229a342ddf3951ecc968017c2ed4df Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 25 Apr 2013 14:06:03 -0700 Subject: Check for WRITE_ACCESS on the file before overriding an EACCESS. Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Sat Apr 27 15:57:17 CEST 2013 on sn-devel-104 --- source3/smbd/dosmode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 4a34947e25..b5346261ce 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -417,6 +417,10 @@ static bool set_ea_dos_attribute(connection_struct *conn, if(!CAN_WRITE(conn) || !lp_dos_filemode(SNUM(conn))) return false; + if (!can_write_to_file(conn, smb_fname)) { + return false; + } + /* * We need to open the file with write access whilst * still in our current user context. This ensures we -- cgit