Page MenuHomeFreeBSD

libjail: extend struct handlers to included MAC labels
ClosedPublic

Authored by kevans on Nov 27 2025, 6:38 PM.
Tags
None
Referenced Files
F153190516: D53960.id167202.diff
Sun, Apr 19, 5:12 PM
Unknown Object (File)
Sat, Apr 11, 2:29 AM
Unknown Object (File)
Thu, Apr 9, 12:48 AM
Unknown Object (File)
Wed, Apr 8, 5:28 AM
Unknown Object (File)
Mar 13 2026, 1:08 PM
Unknown Object (File)
Feb 27 2026, 1:26 PM
Unknown Object (File)
Feb 16 2026, 8:32 PM
Unknown Object (File)
Feb 16 2026, 1:52 PM
Subscribers

Details

Summary

MAC label handling is a little special; to avoid being too disruptive,
we allocate a mac_t * here for the value so that we can mac_prepare()
or mac_from_text() into. As a result, we need:

  • A custom free() handler to avoid leaking the *jp_value
  • A custom jailparam_get() handler to mac_prepare() the mac_t and populate the iove properly, so that the kernel doesn't have to do something funky like copyin, dereference, copyin again.
  • A custom jailparam_set() handler to similarly populate the iovec properly.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable