The branch stable/14 has been updated by oshogbo:

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

commit a7a1b235501c2daac8fec2e4249c25aa4a888e75
Author:     Faraz Vahedi <k...@kfv.io>
AuthorDate: 2024-10-27 09:01:01 +0000
Commit:     Mariusz Zaborski <osho...@freebsd.org>
CommitDate: 2025-01-29 09:51:08 +0000

    colrm(1): Capsicumise
    
    Signed-off-by: Faraz Vahedi <k...@kfv.io>
    Reviewed by:    markj, oshogbo
    MFC after:      1 week
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1496
    
    (cherry picked from commit 95498a5acc0888ed2e73237b82a1e90f109473f9)
---
 usr.bin/colrm/colrm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/usr.bin/colrm/colrm.c b/usr.bin/colrm/colrm.c
index 06b5e817f618..6886a6644bf5 100644
--- a/usr.bin/colrm/colrm.c
+++ b/usr.bin/colrm/colrm.c
@@ -53,6 +53,8 @@ static char sccsid[] = "@(#)colrm.c   8.2 (Berkeley) 5/4/95";
 #include <unistd.h>
 #include <wchar.h>
 
+#include <capsicum_helpers.h>
+
 #define        TAB     8
 
 void check(FILE *);
@@ -67,6 +69,10 @@ main(int argc, char *argv[])
 
        setlocale(LC_ALL, "");
 
+       caph_cache_catpages();
+       if (caph_limit_stdio() < 0 || caph_enter() < 0)
+               err(EXIT_FAILURE, "capsicum");
+
        while ((ch = getopt(argc, argv, "")) != -1)
                switch(ch) {
                case '?':

Reply via email to