summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 3752507493..c4ff77bd86 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3013,19 +3013,12 @@ NTSTATUS mkdir_internal(connection_struct *conn, pstring directory)
ret = vfs_MkDir(conn,directory,unix_mode(conn,aDIR,directory));
if (ret == -1) {
- NTSTATUS nterr = NT_STATUS_OK;
if(errno == ENOENT) {
- unix_ERR_class = ERRDOS;
- if (bad_path) {
- unix_ERR_code = ERRbadpath;
- nterr = NT_STATUS_OBJECT_PATH_NOT_FOUND;
- } else {
- unix_ERR_code = ERRbadfile;
- nterr = NT_STATUS_OBJECT_NAME_NOT_FOUND;
- }
+ if (bad_path)
+ return NT_STATUS_OBJECT_PATH_NOT_FOUND;
+ else
+ return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
- if (!NT_STATUS_IS_OK(nterr))
- return nterr;
return map_nt_error_from_unix(errno);
}