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
Unknown Object (File)
Fri, Sep 11, 10:23 PM
Unknown Object (File)
Fri, Sep 11, 9:19 PM
Unknown Object (File)
Fri, Sep 11, 5:42 AM
Unknown Object (File)
Thu, Sep 10, 1:58 PM
Unknown Object (File)
Tue, Sep 8, 7:04 AM
Unknown Object (File)
Tue, Sep 8, 6:57 AM
Unknown Object (File)
Tue, Sep 8, 6:56 AM
Unknown Object (File)
Sat, Aug 29, 2:25 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