Fix bug #6487: Missing DFS call in trans2 mkdir call. (cherry picked from commit...
authorJeremy Allison <jra@samba.org>
Fri, 19 Jun 2009 08:10:13 +0000 (10:10 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 10 Aug 2009 16:05:03 +0000 (18:05 +0200)
(cherry picked from commit 133cdb46be154eeceb080fa9db88a38d9f87c919)
(cherry picked from commit 1acc2a976a9ede216d2ad4bb241c3f3babef2637)

source/smbd/trans2.c

index 7d587c021d5ea6dedf97112af1b387929cc58bb4..9e675fc034f38ba5dd4278331154c8777b5f1f5e 100644 (file)
@@ -7104,6 +7104,21 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req,
 
        DEBUG(3,("call_trans2mkdir : name = %s\n", directory));
 
+       status = resolve_dfspath(ctx,
+                               conn,
+                               req->flags2 & FLAGS2_DFS_PATHNAMES,
+                               directory,
+                               &directory);
+       if (!NT_STATUS_IS_OK(status)) {
+               if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
+                       reply_botherror(req,
+                                       NT_STATUS_PATH_NOT_COVERED,
+                                       ERRSRV, ERRbadpath);
+               }
+               reply_nterror(req, status);
+               return;
+       }
+
        status = unix_convert(ctx, conn, directory, False, &directory, NULL, &sbuf);
        if (!NT_STATUS_IS_OK(status)) {
                reply_nterror(req, status);