The branch main has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=5799049178b68f546c40555f732eef34428f0890

commit 5799049178b68f546c40555f732eef34428f0890
Author:     Mark Johnston <[email protected]>
AuthorDate: 2026-09-28 22:00:38 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2026-09-29 01:29:22 +0000

    exec: Remove an unneeded capability mode check
    
    The subsequent namei() call is relative to AT_FDCWD, and such lookups
    are always disallowed in capability mode.
    
    No functional change intended.
    
    Reviewed by:    emaste
    Differential Revision:  https://reviews.freebsd.org/D59888
---
 sys/kern/imgact_elf.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index c2be0a6706f6..2dd12d64b5bb 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -803,15 +803,6 @@ __elfN(load_interp_file)(struct thread *td, const char 
*file, u_long *addr,
        u_long base_addr = 0;
        int error;
 
-#ifdef CAPABILITY_MODE
-       /*
-        * XXXJA: This check can go away once we are sufficiently confident
-        * that the checks in namei() are correct.
-        */
-       if (IN_CAPABILITY_MODE(td))
-               return (ECAPMODE);
-#endif
-
        tempdata = malloc(sizeof(*tempdata), M_TEMP, M_WAITOK | M_ZERO);
        nd = &tempdata->nd;
        attr = &tempdata->attr;

Reply via email to