Closed gdt closed 1 year ago
Resolved by 3dfbf93 and https://github.com/sudo-project/sudo/commit/a85494b5c4f8afd24c9fcadd0e4102e6a8c4fbc7.
Thanks very much for addressing.
About tsdump, I concluded that the sources had no such program after seeing comments that were apparently sort of from the project indicating that such a program was harmful and people who needed it should write their own. Perhaps I misread. A possible reasonable approach would be to mention it in the README, build it as part of the build, but not install it.
@gdt I just committed changes to build tsdump by default and mention it in the sudoers and sudoers_timestamp man pages.
Awesome, thank you for listening and improving.
I am using 1.9.14p3 on NetBSD. I changed from /dev/ttyp to /dev/pts, but did not reboot. I found that sudo when executed as part of a package rebuild ("make replace") did not respect cached authtentication. The root causes are 1) I had not run dev_mkdb, and devname(3) returned stale paths 2) sudo took the device major/minor, converted it to a path, and then checked if the path was valid. If so, the dev_t was stored in the timestamp file. If not, sudo silently* flipped to ppid mode.
To figure this out, I had to read code and write my own code to parse the timestamp file.
I would suggest 1) If the tty path does not exist, log a very loud error and error out. This is a failure of something that ought to be true always, and it is both unhelpful and unsafe to do something else instead 2) If what matters is the dev_t, do not convert to names. Just use dev_t.