mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user