utils: remove unneeded EnsureProcHandle

All of the callers of EnsureProcHandle now use filepath-securejoin's
ProcThreadSelf to get a file handle, which has much stricter
verification to avoid procfs attacks than EnsureProcHandle's very
simplistic filesystem type check.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
Aleksa Sarai
2025-06-20 16:23:38 +10:00
parent ff6fe13246
commit b3dd1bc562
2 changed files with 0 additions and 24 deletions
-6
View File
@@ -46,12 +46,6 @@ func setProcAttr(attr, value string) error {
defer closer()
defer f.Close()
// NOTE: This is not really necessary since securejoin.ProcThreadSelf
// verifies this in a far stricter sense than EnsureProcHandle.
if err := utils.EnsureProcHandle(f); err != nil {
return err
}
_, err = f.WriteString(value)
return err
}