[PATCH] Users can create files in read-only shares

ZINKEVICIUS,MATT (HP-Loveland,ex1) matt_zinkevicius at hp.com
Mon Aug 6 10:27:01 GMT 2001

Our testers noticed that when they created read-only shares (writeable=No)
and opened an exisiting text file with notepad, that they couldn't overwrite
the file, as expected, but when they tried to save samba did create a temp
file (TMP?.TMP). I tracked this down to open.c/open_file() and here's the

--- samba-2.2.1-orig/source/smbd/open.c	Tue Jul 24 01:18:40 2001
+++ samba-2.2.1-acldb/source/smbd/open.c	Mon Aug  6 10:36:43 2001
@@ -125,6 +125,7 @@
 			flags &= ~O_CREAT;
+			local_flags &= ~O_CREAT;

Matt Zinkevicius
Modular Network Storage

More information about the samba-technical mailing list