[Midnightbsd-cvs] [MidnightBSD/src] 19f00f: Fix Capsicum: enter capability mode only after ope...

Lucas Holt noreply at github.com
Thu Jul 9 19:12:15 EDT 2026


  Branch: refs/heads/feature/import-shuf
  Home:   https://github.com/MidnightBSD/src
  Commit: 19f00f31a5554079d6a1fbe0b8b11679cecab579
      https://github.com/MidnightBSD/src/commit/19f00f31a5554079d6a1fbe0b8b11679cecab579
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-07-09 (Thu, 09 Jul 2026)

  Changed paths:
    M usr.bin/shuf/shuf.c

  Log Message:
  -----------
  Fix Capsicum: enter capability mode only after opening input files

As pointed out in code review, capability mode must be entered only after
all input files have been opened. Otherwise, opening a named input file will
fail in capability mode.

The fix moves caph_enter() call to after:
- Output file is opened (if -o option)
- Input file is opened (if a filename is provided)
- But before any file I/O operations

For -e and -i modes, caph_enter() is not needed as they don't do file I/O.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe at mistral.ai>



To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/src/settings/notifications


More information about the Midnightbsd-cvs mailing list