From aa91def29f54a466c7c7efbc8cf442b7a9759afa Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 5 Jul 2001 23:37:09 +0000 Subject: Fix race where wrong action (created or opened) could be returned. Jeremy. (This used to be commit af5b649b017f703a14a69f77a9067efb9c6a8269) --- source3/smbd/open.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/smbd') diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 858a26191f..f67490b61d 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -770,6 +770,14 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", return NULL; } + /* + * If there are any share modes set then the file *did* + * exist. Ensure we return the correct value for action. + */ + + if (num_share_modes > 0) + file_existed = True; + /* * We exit this block with the share entry *locked*..... */ -- cgit