History log of /openbsd/usr.bin/tty/tty.c (Results 1 – 14 of 14)
Revision Date Author Comments
# ce405b38 06-May-2024 cheloha <cheloha@openbsd.org>

tty(1): exit with status 2 if unveil(2) or pledge(2) fail

tty(1) returns >1 on error, not 1.

Thread: https://marc.info/?l=openbsd-tech&m=171494082629111&w=2

ok deraadt@ guenther@


# d7259957 04-Dec-2022 cheloha <cheloha@openbsd.org>

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument.

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument. We can
handle this case with the "default" failure case with no loss of
legibility. Hence, remove all the redundant "case '?':" lines.

Prompted by dlg@. With help from dlg@ and millert@.

Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2

ok naddy@ millert@ dlg@

show more ...


# bc5a8259 12-Jul-2021 beck <beck@openbsd.org>

Change the error reporting pattern throughout the tree when unveil
fails to report the path that the failure occured on. Suggested by
deraadt@ after some tech discussion.

Work done and verified by A

Change the error reporting pattern throughout the tree when unveil
fails to report the path that the failure occured on. Suggested by
deraadt@ after some tech discussion.

Work done and verified by Ashton Fagg <ashton@fagg.id.au>

ok deraadt@ semarie@ claudio@

show more ...


# ed3a953d 03-Aug-2018 deraadt <deraadt@openbsd.org>

unveil of _PATH_DEVDB "/var/run/dev.db" can be done before pledge for
use by ttyname, no other files are accessed after that.


# d0bcda8b 12-Oct-2015 naddy <naddy@openbsd.org>

ttyname() no longer does ioctl TIOCGETA, so pledge("tty") is no longer
needed here. ok deraadt@


# 0bd1216c 09-Oct-2015 deraadt <deraadt@openbsd.org>

Change all tame callers to namechange to pledge(2).


# a4381962 07-Oct-2015 deraadt <deraadt@openbsd.org>

use tame "stdio rpath tty", for ttyname(). from Rob Pierce, who chose to
do this using ktrace step by step. not the method i recommend, because
it requires 100% coverage via feature tests. better

use tame "stdio rpath tty", for ttyname(). from Rob Pierce, who chose to
do this using ktrace step by step. not the method i recommend, because
it requires 100% coverage via feature tests. better to read the code and
understand everything being called, then make decisions.

show more ...


# 5195d91e 27-Nov-2013 okan <okan@openbsd.org>

remove erroneous char cast to switch expression processing getopt(3);
not used in any cases.

ok deraadt@, guenther@, millert@


# 043fbe51 27-Oct-2009 deraadt <deraadt@openbsd.org>

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(th

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

show more ...


# 1837a5ca 10-Jun-2003 deraadt <deraadt@openbsd.org>

mostly ansi cleanup; pval ok


# f75387cb 03-Jun-2003 millert <millert@openbsd.org>

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# c72b5b24 16-Feb-2002 millert <millert@openbsd.org>

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be don

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.

show more ...


# 1258a77d 26-Jun-1996 deraadt <deraadt@openbsd.org>

rcsid


# df930be7 18-Oct-1995 deraadt <deraadt@openbsd.org>

initial import of NetBSD tree