From 1929bcb89a8a5daf8ff9242324797e5340ec8fe9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 6 Oct 2000 20:34:14 +0000 Subject: Fixed error return messages needed for NTTrans CreateDirectory. This patch allows the standard W2k recursive mkdir to work against Samba. Jeremy. (This used to be commit 947102784360c65d51441457bb54aa28d2b4452d) --- source3/smbd/nttrans.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 86b85ea766..f099583e55 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -796,6 +796,10 @@ int reply_ntcreate_and_X(connection_struct *conn, restore_case_semantics(file_attributes); if(!fsp) { + if((errno == ENOENT) && bad_path) { + unix_ERR_class = ERRDOS; + unix_ERR_code = ERRbadpath; + } return(UNIXERROR(ERRDOS,ERRnoaccess)); } } else { @@ -856,6 +860,10 @@ int reply_ntcreate_and_X(connection_struct *conn, if(!fsp) { restore_case_semantics(file_attributes); + if((errno == ENOENT) && bad_path) { + unix_ERR_class = ERRDOS; + unix_ERR_code = ERRbadpath; + } return(UNIXERROR(ERRDOS,ERRnoaccess)); } #ifdef EROFS @@ -1220,6 +1228,10 @@ static int call_nt_transact_create(connection_struct *conn, if(!fsp) { restore_case_semantics(file_attributes); + if((errno == ENOENT) && bad_path) { + unix_ERR_class = ERRDOS; + unix_ERR_code = ERRbadpath; + } return(UNIXERROR(ERRDOS,ERRnoaccess)); } @@ -1258,6 +1270,10 @@ static int call_nt_transact_create(connection_struct *conn, if(!fsp) { restore_case_semantics(file_attributes); + if((errno == ENOENT) && bad_path) { + unix_ERR_class = ERRDOS; + unix_ERR_code = ERRbadpath; + } return(UNIXERROR(ERRDOS,ERRnoaccess)); } #ifdef EROFS -- cgit