]> Cypherpunks repositories - gostls13.git/commit
os: reject OpenDir of a non-directory file in Plan 9
authorRichard Miller <millerresearch@gmail.com>
Thu, 4 Sep 2025 10:42:56 +0000 (11:42 +0100)
committerSean Liao <sean@liao.dev>
Sat, 6 Sep 2025 09:24:38 +0000 (02:24 -0700)
commit57769b5532e96a8f6b705035a39ee056a22e04c3
tree73e861fbf40c19df3bc81a050d4e986f0217820d
parenta6144613d3b601be1db6aa2fdaa79c954fdfe02c
os: reject OpenDir of a non-directory file in Plan 9

Check that the path argument to OpenDir in Plan 9 is a directory,
and return error syscall.ENOTDIR if it is not.

Fixes #75196

Change-Id: I3bec6b6b40a38c21264b5d22ff3e7dfbf8c1c6d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/700855
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David du Colombier <0intro@gmail.com>
src/os/file_plan9.go