From 02518fd7725fe432a999b5076ffe42847b0d79bd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 15 Jul 1999 11:42:53 +0000 Subject: fix from matty for directory creation on read-only shares --- source/smbd/open.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/smbd/open.c b/source/smbd/open.c index a28a0c348a3..01e1cebbb6b 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -1169,6 +1169,11 @@ int open_directory(files_struct *fsp,connection_struct *conn, * Try and create the directory. */ + if(conn->read_only) { + DEBUG(2,("open_directory: failing create on read-only share\n")); + return -1; + } + if(dos_mkdir(fname, unix_mode(conn,aDIR)) < 0) { DEBUG(0,("open_directory: unable to create %s. Error was %s\n", fname, strerror(errno) )); -- cgit v1.2.1