summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/nttrans.c16
1 files changed, 16 insertions, 0 deletions
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