| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
The libcasper package exists to contain libcasper, but for some reason
only the libcap_net service was in the package, with libcasper itself
and the rest of the services being in runtime. Move everything to the
libcasper package, except tests which stay in the tests package.
MFC after: 1 day
Reviewed by: emaste
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D53576
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The implicit cast is incompatible with standard compiler options in a
C++ project, making the library difficult to use.
Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
Sponsored by: Defenso
MFC after: 3 days
Discussed with: kevans
Reviewed by: emaste, vexeduxr
Pull request: https://github.com/freebsd/freebsd-src/pull/1857
|
| |
|
|
|
|
|
|
| |
Extensively revised the manual page with clearer phrasing, better
structure, and corrected grammar throughout. Also fixed typos and
improved overall readability of the documentation.
Signed-off-by: Faraz Vahedi <kfv@kfv.io>
|
| |
|
|
|
|
|
| |
This is a residual of the $FreeBSD$ removal.
MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
| |
Capability rights passed to cap_rights_* are not simple bitmaks and
cannot be ORed together in general (although it will work for certain
subsets of rights).
PR: 277057
Fixes: faaf43b2a750 ("fileargs: add tests")
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
And neither are most libcasper services' functions, because internally
they all use cap_xfer_nvlist. cap_xfer_nvlist sends and then receives
data over a unix domain socket and associated with the cap_channel_t
argument. So absent synchronization, two threads may not use the same
cap_channel_t argument or they risk receiving the other's reply.
MFC after: 2 weeks
Sponsored by: Axcient
Reviewed by: oshogbo
Differential Revision: https://reviews.freebsd.org/D42928
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| |
|
|
| |
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
These libraries are linked to directly by applications rather than
opened at runtime via dlopen().
Discussed with: oshogbo
Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D39245
|
| |
|
|
|
|
|
| |
We still want to fetch the variable just to verify that the interface
is right.
Reported by: pstef
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- inserting missing end of block: Sh breaks Bl
- moving content out of list: Pp
- missing comma before name: Nm cap_*
- comma in function argument: cap_*
- skipping paragraph macro: Pp after Sh
- sections out of conventional order: Sh AUTHORS
Reviewed by: bcr
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31144
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Approved by: oshogbo
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D2834
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D24695
Notes:
svn path=/head/; revision=362230
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=361694
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We must wrap C declarations in __BEGIN / __END_DECLS to avoid C++ name-mangling
of the declaration when including the C header; name-mangling causes the linker
to attempt to locate the wrong (C++ ABI) symbol name.
Reviewed by: markj, oshogbo (earlier version both)
Differential Revision: https://reviews.freebsd.org/D24323
Notes:
svn path=/head/; revision=359696
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Update a bunch of Makefile.depend files as
a result of adding Makefile.depend.options files
Reviewed by: bdrewery
MFC after: 1 week
Sponsored by: Juniper Networks
Differential Revision: https://reviews.freebsd.org/D22494
Notes:
svn path=/head/; revision=355617
|
| |
|
|
|
|
|
|
|
|
|
| |
A lot of binaries present in FreeBSD-runtime depend on it so move
the libs there.
Reviewed by: bapt, gjb
Differential Revision: https://reviews.freebsd.org/D21501
Notes:
svn path=/head/; revision=351853
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=350695
|
| |
|
|
|
|
|
|
| |
PR: 239523
Submitted by: mikael.urankar@gmail.com
Notes:
svn path=/head/; revision=350438
|
| |
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=350201
|
| |
|
|
|
|
|
| |
Those function may be useful to pass fileargs connections around.
Notes:
svn path=/head/; revision=349002
|
| |
|
|
|
|
|
|
|
|
|
| |
This triggers an error in gcc-mips 6.4.0 complaining about unused arguments.
Tested:
* compiled/run on mips32; nothing complained.
Notes:
svn path=/head/; revision=346322
|
| |
|
|
|
|
|
|
|
|
| |
Reported by: danfe, mjg
MFC after: 3 weeks
MFC with: r346315
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=346321
|
| |
|
|
|
|
|
|
|
|
| |
Reported by: ci.freebsd.org
MFC after: 3 weeks
MFC with: r346315
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=346318
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=346315
|
| |
|
|
|
|
|
|
|
|
| |
Submitted by: Bora Özarslan" <borako.ozarslan@gmail.com>
MFC after: 1 week
MFC with: r346313
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=346314
|
| |
|
|
|
|
|
|
|
| |
Submitted by: Bora Özarslan" <borako.ozarslan@gmail.com>
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=346313
|
| |
|
|
|
|
|
|
|
|
| |
Casper service can be also used on the kernels without Capsicum support.
Reported by: sbruno
Tested by: sbruno
Notes:
svn path=/head/; revision=341347
|
| |
|
|
|
|
|
|
|
| |
This fix build with gcc.
Reported by: jenkins
Notes:
svn path=/head/; revision=340381
|
|
|
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
Notes:
svn path=/head/; revision=340373
|