diff options
| author | Olivier Certner <olce@FreeBSD.org> | 2026-04-28 13:10:14 +0000 |
|---|---|---|
| committer | Olivier Certner <olce@FreeBSD.org> | 2026-05-29 15:27:57 +0000 |
| commit | 51cc5840b66c9565e1740c1198a0e684d81e3734 (patch) | |
| tree | 0f6fd03a7bbca095f1281a76198f74dc25c8d944 /sys | |
| parent | 7929f364ef5135f712e061d291d1c2c0fb48abde (diff) | |
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/security/mac_do/mac_do.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 7890af9bcfec..fb7eb00cd6d5 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1549,16 +1549,6 @@ SYSCTL_JAIL_PARAM_STRING(_mac_do, exec_paths, CTLFLAG_RW, MAX_EXEC_PATHS_SIZE, "Jail MAC/do executable paths"); static int -mac_do_jail_create(void *obj, void *data) -{ - struct prison *const pr = obj; - - set_default_conf(pr); - - return (0); -} - -static int mac_do_jail_get(void *obj, void *data) { struct prison *const pr = obj; @@ -1879,12 +1869,14 @@ mac_do_jail_set(void *obj, void *data) /* * OSD jail methods. * - * There is no PR_METHOD_REMOVE, as OSD storage is destroyed by the common jail - * code (see prison_cleanup()), which triggers a run of our dealloc_jail_osd() - * destructor. + * There is no PR_METHOD_REMOVE method, as OSD storage is destroyed by the + * common jail code (see prison_cleanup()), which triggers a run of our + * dealloc_jail_osd() destructor. There is neither a PR_METHOD_CREATE as + * PR_METHOD_SET is called just after (or the created jail destroyed if some + * PR_METHOD_CREATE fails), and our mac_do_jail_set() will ensure a jail is + * properly configured. */ static const osd_method_t osd_methods[PR_MAXMETHOD] = { - [PR_METHOD_CREATE] = mac_do_jail_create, [PR_METHOD_GET] = mac_do_jail_get, [PR_METHOD_CHECK] = mac_do_jail_check, [PR_METHOD_SET] = mac_do_jail_set, |
