Page MenuHomeFreeBSD

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

Authored by dchagin on May 14 2023, 11:18 PM.
Referenced Files
F132901052: D40100.id.diff
Tue, Oct 21, 12:27 AM
Unknown Object (File)
Sun, Oct 19, 4:56 AM
Unknown Object (File)
Fri, Oct 17, 6:00 PM
Unknown Object (File)
Wed, Oct 8, 3:06 AM
Unknown Object (File)
Thu, Oct 2, 3:51 PM
Unknown Object (File)
Sep 3 2025, 10:47 PM
Unknown Object (File)
Aug 31 2025, 1:59 AM
Unknown Object (File)
Aug 23 2025, 5:20 AM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 51496
Build 48387: arc lint + arc unit