Page MenuHomeFreeBSD

Make cr_bsd_visible()'s sub-functions internal
ClosedPublic

Authored by olce on Jun 20 2023, 1:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 25 2024, 2:55 PM
Unknown Object (File)
Nov 23 2024, 9:28 PM
Unknown Object (File)
Nov 23 2024, 1:09 AM
Unknown Object (File)
Nov 21 2024, 7:18 AM
Unknown Object (File)
Nov 20 2024, 9:36 AM
Unknown Object (File)
Nov 15 2024, 5:59 AM
Unknown Object (File)
Nov 15 2024, 5:50 AM
Unknown Object (File)
Nov 14 2024, 9:13 AM
Subscribers

Details

Summary

cr_canseeotheruids(), cr_canseeothergids() and cr_canseejailproc() should not be
used directly now. cr_bsd_visible() has to be called instead.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 52676
Build 49567: arc lint + arc unit

Event Timeline

olce requested review of this revision.Jun 20 2023, 1:44 PM
zlei requested changes to this revision.Jul 2 2023, 7:18 AM
zlei added a subscriber: zlei.

These functions are exported, I think they should be kept as is to keep KPI compatibility.

This revision now requires changes to proceed.Jul 2 2023, 7:18 AM

We can change KPI across major versions at least, can't we?

This change has several goals. The first is to prevent consumers from using any of these individual functions, which are called by cr_bsd_visibility() itself. This helps avoid bugs where some callers forget to check if a particular policy authorizes accesses, which is exactly what happened with see_jail_proc. A second goal is that, more conceptually, visibility policies can be seen as a block that should be applied at once. If, in the future, some policy is added, it will just have to in cr_bsd_visibility() (no need of sprinkling calls all around).

olce requested review of this revision.Jul 10 2023, 12:45 PM
olce retitled this revision from Make cr_bsd_visibility()'s sub-functions internal to Make cr_bsd_visible()'s sub-functions internal.
olce edited the summary of this revision. (Show Details)

Rename cr_bsd_visibility() to cr_bsd_visible().

Update context lines after update of D40626.

Re-validate, since no actual changes.

This revision is now accepted and ready to land.Aug 2 2023, 10:37 AM
This revision was automatically updated to reflect the committed changes.