git: 64c6327738fc - main - cat: add CAP_SEEK capability

From: Mariusz Zaborski <oshogbo_at_FreeBSD.org>
Date: Thu, 28 Sep 2023 14:07:36 UTC
The branch main has been updated by oshogbo:

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

commit 64c6327738fc24bb34b9f40ff1c223ab460ef637
Author:     Mariusz Zaborski <oshogbo@FreeBSD.org>
AuthorDate: 2023-09-28 13:20:47 +0000
Commit:     Mariusz Zaborski <oshogbo@FreeBSD.org>
CommitDate: 2023-09-28 13:38:36 +0000

    cat: add CAP_SEEK capability
    
    The copy_file_range might require that.
    
    Reviewed by:    emaste, theraven, kib, markj
    Differential Revision:  https://reviews.freebsd.org/D41967
---
 bin/cat/cat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/cat/cat.c b/bin/cat/cat.c
index ec14451acd0c..ce7a83d59d5a 100644
--- a/bin/cat/cat.c
+++ b/bin/cat/cat.c
@@ -155,7 +155,7 @@ init_casper(int argc, char *argv[])
 		err(EXIT_FAILURE, "unable to create Casper");
 
 	fa = fileargs_cinit(casper, argc, argv, O_RDONLY, 0,
-	    cap_rights_init(&rights, CAP_READ | CAP_FSTAT | CAP_FCNTL),
+	    cap_rights_init(&rights, CAP_READ | CAP_FSTAT | CAP_FCNTL | CAP_SEEK),
 	    FA_OPEN | FA_REALPATH);
 	if (fa == NULL)
 		err(EXIT_FAILURE, "unable to create fileargs");