Repository navigation
utmpx: reject non-regular Linux login files - #16233
mattsu2020 wants to merge 2 commits into
Conversation
58760a2 to
12e8d89
Compare
12e8d89 to
90f1515
Compare
|
thanks for tackling this! |
90f1515 to
708ca2e
Compare
I split the PR and added a comment explaining the custom implementation of getutxent |
Merging this PR will not alter performance1 warning, 1 note
Comparing Footnotes
|
f2599f8 to
53eabce
Compare
Open and validate a nonblocking descriptor, then select it for libc via /proc/self/fd. Keep getutxent for record reads and locking. Cover FIFO rejection, path replacement, invalid inputs and cleanup.
Use one test-only helper for the uucore unit tests and who FIFO test. Keep the helper inside uucore so it is included in the crate package.
53eabce to
c46fe30
Compare
Reject non-regular Linux utmp inputs without waiting for FIFO writers, and validate and read the same descriptor. getutxent() accepts neither that descriptor nor O_NONBLOCK; its record-lock timeout does not protect the open. Add regression tests for FIFOs, path replacement and incomplete records.
Related to #13171. Path persistence is split into #16284, and a shared lock-wait budget into #16285.