mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix file mode check in pipeOperations
PiperOrigin-RevId: 263203441
This commit is contained in:
committed by
gVisor bot
parent
072d941e32
commit
0e907c4298
@@ -87,7 +87,7 @@ func (p *pipeOperations) init() error {
|
||||
log.Warningf("pipe: cannot stat fd %d: %v", p.file.FD(), err)
|
||||
return syscall.EINVAL
|
||||
}
|
||||
if s.Mode&syscall.S_IFIFO != syscall.S_IFIFO {
|
||||
if (s.Mode & syscall.S_IFMT) != syscall.S_IFIFO {
|
||||
log.Warningf("pipe: cannot load fd %d as pipe, file type: %o", p.file.FD(), s.Mode)
|
||||
return syscall.EINVAL
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user