OpenBSD CVS

CVS log for src/usr.bin/look/look.c


[BACK] Up to [local] / src / usr.bin / look

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: OPENBSD_7_1


Revision 1.26 / (download) - annotate - [select for diffs], Thu Feb 10 14:55:43 2022 UTC (2 years, 3 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.25: +8 -6 lines
Diff to previous 1.25 (colored)

look(1): use a stricter pledge(2) in lieu of unveil(2)

We're only reading one file here, so unveil(2) is overkill.  We can
achieve the same effect with just pledge(2):

- Start with an initial pledge(2) of "stdio rpath" at the top of main().
  We know we need to read a file at this point but don't yet know which
  one.

- Drop the pledge(2) down to "stdio" after we open(2) and fstat(2) the
  chosen file.

- Dropping "rpath" obviates unveil(2).

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

ok millert@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.