look(1) will access /usr/share/dict/words to look for the string we want, or it
authormestre <mestre@openbsd.org>
Sat, 11 Aug 2018 11:00:34 +0000 (11:00 +0000)
committermestre <mestre@openbsd.org>
Sat, 11 Aug 2018 11:00:34 +0000 (11:00 +0000)
commit0444232b427cbb47da3092ff0f3dc649dfeb764d
tree84a0c204c201578c7a6abcab2ae250ed050fcdac
parent0303d6a7018c2ebe3b1fdf67fb06ec9811ff8800
look(1) will access /usr/share/dict/words to look for the string we want, or it
may access another file instead if we mention it via argument. In order to know
which file to unveil(2) we need to push down pledge(2) a little bit after
getopt(3) and now that we know the name of the file we can unveil(2) it only
with read permissions.

OK deraadt@
usr.bin/look/look.c