From 99e001f3265a4e6fbfb57a4f0053d11dc7984cce Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Mon, 13 Apr 2026 13:17:32 +0200 Subject: [PATCH] 9p: reject mkdir (Tcreate with DMDIR) on flat directories --- internal/p9/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/p9/server.go b/internal/p9/server.go index 64cf2be..202ecda 100644 --- a/internal/p9/server.go +++ b/internal/p9/server.go @@ -354,6 +354,9 @@ func (s *Server) create(cs *connState, fc *plan9.Fcall) *plan9.Fcall { if f.path != "/p" && f.path != "/pl" && f.path != "/sk" && f.path != "/t" { return errFcall(fc, "create not supported") } + if fc.Perm&plan9.DMDIR != 0 { + return errFcall(fc, "mkdir not supported") + } newPath := pathJoin(f.path, fc.Name)