diff options
| author | Olivier Certner <olce@FreeBSD.org> | 2026-04-28 13:37:50 +0000 |
|---|---|---|
| committer | Olivier Certner <olce@FreeBSD.org> | 2026-05-29 15:21:22 +0000 |
| commit | 3a4433425e63f88e70078a354bd404d7ea6ca3ce (patch) | |
| tree | 843b13d50a6163e75fa2e033598f3241dc726463 | |
| parent | 0aef1c059fae86a7f62b444dc3352eb0d5bdaa31 (diff) | |
MAC/do: Executable paths: Accept an empty string
This effectively allows to disable mac_do(4) by setting the executable
paths to an empty string, realizing a symmetry with rules to be
leveraged in subsequent commits.
Reviewed by: bapt
Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)")
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 | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index dc5d3d29d988..dd349c3f1a67 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1151,12 +1151,6 @@ parse_exec_paths(const char *const string, struct exec_paths *const exec_paths, exec_paths->exec_path_count++; } - if (exec_paths->exec_path_count == 0) { - make_parse_error(parse_error, 0, "No valid exec paths found"); - error = EINVAL; - goto error; - } - MPASS(error == 0 && *parse_error == NULL); out: free(copy, M_MAC_DO); |
