Page MenuHomeFreeBSD

libjail: extend struct handlers to included MAC labels
AcceptedPublic

Authored by kevans on Thu, Nov 27, 6:38 PM.
Tags
None
Referenced Files
F140720040: D53960.diff
Sat, Dec 27, 7:06 AM
F140720029: D53960.diff
Sat, Dec 27, 7:06 AM
F140720017: D53960.diff
Sat, Dec 27, 7:06 AM
F140720005: D53960.diff
Sat, Dec 27, 7:06 AM
F140719992: D53960.diff
Sat, Dec 27, 7:06 AM
F140719983: D53960.diff
Sat, Dec 27, 7:06 AM
F140719968: D53960.diff
Sat, Dec 27, 7:06 AM
F140719959: D53960.diff
Sat, Dec 27, 7:06 AM
Subscribers

Details

Reviewers
csjp
olce
jamie
Group Reviewers
Jails
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 68899
Build 65782: arc lint + arc unit