History log of /freebsd/lib/libcasper/services/cap_fileargs/cap_fileargs.c (Results 1 – 19 of 19)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# a2f733ab 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

lib: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remov

lib: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


Revision tags: release/14.0.0
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0
# 1e9ce60a 20-Mar-2022 Mariusz Zaborski <oshogbo@FreeBSD.org>

cap_fileargs: silence warnings of unused variable

We still want to fetch the variable just to verify that the interface
is right.

Reported by: pstef


Revision tags: release/12.3.0, release/13.0.0
# 2b1d0c00 07-Apr-2021 Mariusz Zaborski <oshogbo@FreeBSD.org>

fileargs: fix double caching of the same file

In situations when the current file name wasn't the first element on
the list we were cleaning the current name too early.
This might cause us to pre-ca

fileargs: fix double caching of the same file

In situations when the current file name wasn't the first element on
the list we were cleaning the current name too early.
This might cause us to pre-cache the same file twice.

show more ...


# dcdad299 10-Jan-2021 Mariusz Zaborski <oshogbo@FreeBSD.org>

fileargs: add support for realpath


Revision tags: release/12.2.0, release/11.4.0
# c78e42e2 01-Jun-2020 Mark Johnston <markj@FreeBSD.org>

cap_fileargs: Fix a descriptor leak in the service process.

The service handler for fileargs_open() tries to pre-open multiple files
and pass descriptors for each back to the sandboxed process in a

cap_fileargs: Fix a descriptor leak in the service process.

The service handler for fileargs_open() tries to pre-open multiple files
and pass descriptors for each back to the sandboxed process in a single
message. This is to amortize the cost of round-trips between the two
processes.

The service process adds a "cache" nvlist to the reply to "open",
containing file descriptors for pre-opened files. However, when adding
that nvlist to the reply, it was making a copy, effectively leaking the
cached descriptors.

While here, fix spelling in a local variable name.

PR: 241226
Reviewed by: oshogbo
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25095

show more ...


Revision tags: release/12.1.0
# 95097753 07-Aug-2019 Mariusz Zaborski <oshogbo@FreeBSD.org>

cap_filergs: limit size of the file name

The limit of the name in fileargs is twice the size of the MAXPATH.
The nvlist will not add an element with the longer name.
We can detect at this point that

cap_filergs: limit size of the file name

The limit of the name in fileargs is twice the size of the MAXPATH.
The nvlist will not add an element with the longer name.
We can detect at this point that the path is too big, and simple return
the same error as open(2) would.

PR: 239700
Reported by: markj
Tested by: markj
MFC after: 2 weeks

show more ...


Revision tags: release/11.3.0
# e532a999 20-Jun-2019 Alan Somers <asomers@FreeBSD.org>

MFHead @349234

Sponsored by: The FreeBSD Foundation


# 4b3f7927 12-Jun-2019 Mariusz Zaborski <oshogbo@FreeBSD.org>

fileargs: add wrapping/unwrapping functions

Those function may be useful to pass fileargs connections around.


# 7648bc9f 13-May-2019 Alan Somers <asomers@FreeBSD.org>

MFHead @347527

Sponsored by: The FreeBSD Foundation


# 151744cf 17-Apr-2019 Ed Maste <emaste@FreeBSD.org>

cap_fileargs: fix test after r346318

Reported by: danfe, mjg
MFC after: 3 weeks
MFC with: r346315
Sponsored by: The FreeBSD Foundation


# b6539d47 17-Apr-2019 Ed Maste <emaste@FreeBSD.org>

cap_fileargs: fix GCC build, don't shadow 'stat'

Reported by: ci.freebsd.org
MFC after: 3 weeks
MFC with: r346315
Sponsored by: The FreeBSD Foundation


# 7b558cae 17-Apr-2019 Ed Maste <emaste@FreeBSD.org>

cap_fileargs: add fileargs_lstat service

Add fileargs_lstat function to cap_fileargs casper service to be able to
lstat files while in capability mode. It can only lstat files given in
fileargs_ini

cap_fileargs: add fileargs_lstat service

Add fileargs_lstat function to cap_fileargs casper service to be able to
lstat files while in capability mode. It can only lstat files given in
fileargs_init.

Submitted by: Bora Özarslan <borako.ozarslan@gmail.com>
Reviewed by: oshogbo, cem (partial)
MFC after: 3 weeks
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19548

show more ...


# 67350cb5 09-Dec-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r340918 through r341763.


Revision tags: release/12.0.0
# 77ebcc05 30-Nov-2018 Mariusz Zaborski <oshogbo@FreeBSD.org>

libcasper: do not fail if Capsicum is not avilable

Casper service can be also used on the kernels without Capsicum support.

Reported by: sbruno
Tested by: sbruno


# 6149ed01 14-Nov-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r340368 through r340426.


# 2607c01b 12-Nov-2018 Mariusz Zaborski <oshogbo@FreeBSD.org>

Fix typo in the comparison.
This fix build with gcc.

Reported by: jenkins


# cdd6ea94 12-Nov-2018 Mariusz Zaborski <oshogbo@FreeBSD.org>

libcasper: introduce cap_fileargs service

cap_fileargs is a Casper service which helps to sandbox applications that need
access to the filesystem namespace. The main purpose of the service is to mak

libcasper: introduce cap_fileargs service

cap_fileargs is a Casper service which helps to sandbox applications that need
access to the filesystem namespace. The main purpose of the service is to make
easy to capsicumize applications that works on multiple files passed in argv.

We have a couple example of using it but we still treat this service as an
experimental one.

Reviewed by: emsate (previous version), jonathan (partially)
Discussed with: many
Differential Revision: https://reviews.freebsd.org/D14407

show more ...