smbd: use dirfsp and atname in open_directory()
[samba.git] / source3 / smbd / open.c
index 4d7a103cbc0ea1ce0497b3323884da0780d3fa53..3e7a8f45ebd2622737b0ff9751d558e2f1eab794 100644 (file)
@@ -4915,8 +4915,8 @@ static NTSTATUS open_directory(connection_struct *conn,
 
        if (access_mask & need_fd_access) {
                status = reopen_from_fsp(
-                       fsp->conn->cwd_fsp,
-                       fsp->fsp_name,
+                       parent_dir_fname->fsp,
+                       smb_fname_atname,
                        fsp,
                        O_RDONLY | O_DIRECTORY,
                        0,