diff options
| author | Olivier Certner <olce@FreeBSD.org> | 2026-04-29 17:11:34 +0000 |
|---|---|---|
| committer | Olivier Certner <olce@FreeBSD.org> | 2026-05-29 15:33:24 +0000 |
| commit | 5bedb5e44757ba83dba9d618f5b951416cf44345 (patch) | |
| tree | 8434a95ed53edcef0a4b1ca74b4bae422af8c979 | |
| parent | 31ef4ee2e3570b8f438b9b3fb09b3d87c87419ff (diff) | |
MAC/do: Comment to explain the main invariant for configurations
Once visible, configuration structures must *never* change.
Spell that out in a comment to help future readers/contributors
understand the design.
Reviewed by: bapt
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
| -rw-r--r-- | sys/security/mac_do/mac_do.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 125054d15423..4e7a65ae2cae 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -210,6 +210,11 @@ struct exec_paths { int exec_path_count; }; +/* + * Once in use, i.e., being pointed to by a jail, a configuration structure MUST + * NEVER CHANGE (except for the 'use_count' field). This invariant is + * fundamental to correctness! + */ struct conf { struct rules rules; struct exec_paths exec_paths; |
