The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=9620ee88169129729ae3fb3870dc47a7145a1ce2
commit 9620ee88169129729ae3fb3870dc47a7145a1ce2 Author: Jamie Gritton <[email protected]> AuthorDate: 2025-10-21 00:09:39 +0000 Commit: Colin Percival <[email protected]> CommitDate: 2025-10-30 04:23:15 +0000 jail: fix an error condition that was returned without setting errno. Approved by: re (cperciva) MFC after: 3 days (cherry picked from commit 5f7d5709e0c242d5a5fa5516d6079433ee06c347) (cherry picked from commit c6bf733736b505da1c353759a76d17a2ac54475a) --- sys/kern/kern_jail.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 3697d95fe0e5..a0a200caefc6 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -1088,6 +1088,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) else { if (!(flags & (JAIL_USE_DESC | JAIL_AT_DESC | JAIL_GET_DESC | JAIL_OWN_DESC))) { + error = EINVAL; vfs_opterror(opts, "unexpected desc"); goto done_errmsg; } @@ -2518,6 +2519,7 @@ kern_jail_get(struct thread *td, struct uio *optuio, int flags) } else if (error == 0) { if (!(flags & (JAIL_USE_DESC | JAIL_AT_DESC | JAIL_GET_DESC | JAIL_OWN_DESC))) { + error = EINVAL; vfs_opterror(opts, "unexpected desc"); goto done; }
