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)
Fri, Apr 5, 9:20 PM
Unknown Object (File)
Mar 7 2024, 10:18 AM
Unknown Object (File)
Feb 19 2024, 12:02 PM
Unknown Object (File)
Feb 19 2024, 5:41 AM
Unknown Object (File)
Feb 19 2024, 5:36 AM
Unknown Object (File)
Feb 19 2024, 4:52 AM
Unknown Object (File)
Dec 22 2023, 9:52 PM
Unknown Object (File)
Dec 11 2023, 10:48 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