HomeFreeBSD

linux(4): Check fd passed to unlockpt()

Description

linux(4): Check fd passed to unlockpt()

In our implementation, grantpt() and unlockpt() don't actually have
any use, because PTY's are created on the fly and already have proper
permissions upon creation.
Atleast check that a proper fd passed to unlockpt(). For grantpt()
Glibc calls TIOCGPTN ioctl which would fail if fd is not a master.

Differential Revision: https://reviews.freebsd.org/D40100
MFC after: 1 week

Details

Provenance
dchaginAuthored on May 18 2023, 7:55 AM
Differential Revision
D40100: linux(4): Check fd passed to unlockpt()
Parents
rG743516d51fa7: ktls: don't try to unlock pcb if tcp_drop() already did
Branches
Unknown
Tags
Unknown