summaryrefslogtreecommitdiff
path: root/source3/smbd/dosmode.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-04-25 14:06:03 -0700
committerVolker Lendecke <vl@samba.org>2013-04-27 15:57:17 +0200
commit5185460067229a342ddf3951ecc968017c2ed4df (patch)
treeb39b9635fca5ff4b6a78e2a98889f6bc97459c31 /source3/smbd/dosmode.c
parent77e3099483489ef4d59087dc6542fe7f7b589224 (diff)
downloadsamba-5185460067229a342ddf3951ecc968017c2ed4df.tar.gz
samba-5185460067229a342ddf3951ecc968017c2ed4df.tar.bz2
samba-5185460067229a342ddf3951ecc968017c2ed4df.zip
Check for WRITE_ACCESS on the file before overriding an EACCESS.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sat Apr 27 15:57:17 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3/smbd/dosmode.c')
-rw-r--r--source3/smbd/dosmode.c4
1 files changed, 4 insertions, 0 deletions
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