Re: usr.bin/write hardening & cleanup

Todd C. Miller <[email protected]>
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
On Fri, 12 Jun 2026 11:55:46 +0200, Marc Espie wrote:

> So, in summary
> - pledge on start, restricting to stdio later on
> - annotate done as __dead
> - remove the return 0 after done in main, since compiler is now happy
> - factor the code that removes /dev/ from  /dev/ttyp3 consistently
> - wrap the PUTC macro into do {} while (0) so there's no extra empty statemen
> t
> - ditch ctime and format print exactly the string we want.
> - pass ttyl as size_t since that's we have.

This looks reasonable to me.  Any objections?

 - todd
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.