Page MenuHomeFreeBSD

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

Authored by dchagin on May 14 2023, 11:18 PM.
Referenced Files
Unknown Object (File)
Thu, Jun 11, 5:52 AM
Unknown Object (File)
Mon, Jun 8, 12:34 PM
Unknown Object (File)
May 17 2026, 2:01 PM
Unknown Object (File)
May 17 2026, 1:36 AM
Unknown Object (File)
May 17 2026, 12:16 AM
Unknown Object (File)
May 14 2026, 6:44 AM
Unknown Object (File)
May 13 2026, 9:49 PM
Unknown Object (File)
May 13 2026, 9:41 PM
Subscribers

Details

Summary

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.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable