Second part of fix for bug #8663 - deleting a symlink fails if the symlink target...
[ira/wip.git] / source3 / smbd / trans2.c
index 0126419393c4fbc28f237cb254edfc53e4e5c8d9..4417cb27e72256eff7ff3cfabd9f7f6f15710103 100644 (file)
@@ -8007,6 +8007,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
                }
        } else {
                char *fname = NULL;
+               uint32_t ucf_flags = 0;
 
                /* set path info */
                if (total_params < 7) {
@@ -8023,10 +8024,14 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
                        return;
                }
 
+               if (INFO_LEVEL_IS_UNIX(info_level)) {
+                       ucf_flags |= UCF_UNIX_NAME_LOOKUP;
+               }
+
                status = filename_convert(req, conn,
                                         req->flags2 & FLAGS2_DFS_PATHNAMES,
                                         fname,
-                                        0,
+                                        ucf_flags,
                                         NULL,
                                         &smb_fname);
                if (!NT_STATUS_IS_OK(status)) {