#
5cf70549 |
| 13-Aug-2024 |
Jamie Gritton <jamie@FreeBSD.org> |
jail: only chdir to user's home directory when user is specified
jail(8) with the "exec.clean" parameter not only cleans the enviromnent variables before running commands, but also changes to the us
jail: only chdir to user's home directory when user is specified
jail(8) with the "exec.clean" parameter not only cleans the enviromnent variables before running commands, but also changes to the user's home directory. While this makes sense when auser is specified (via one of the exec.*_user parameters), it leads to all commands being run in the jail's /root directory even in the absence of an explicitly specified user. This can lead to problems when e.g. rc scripts are run from that non-world-readable directory, and run counter to expectations that jail startup is analogous to system startup.
Restrict this behvaiour to only users exlicitly specified, either via the command line or jail parameters, but not the implicit root user. While this changes long-stand practice, it's the more intuitive action.
jexec(8) has the same problem, and the same fix.
PR: 277210 Reported by: johannes.kunde at gmail Differential Revision: https://reviews.freebsd.org/D46226
show more ...
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
e0dfe185 |
| 17-Jan-2024 |
Alexander Leidinger <netchild@FreeBSD.org> |
jail(8): add support for ZFS datasets
Add zfs.dataset to jail(8) to add a list of ZFS datasets. Bump FreeBSD version for jail managers to switch to native dataset support.
Datasets are attached to
jail(8): add support for ZFS datasets
Add zfs.dataset to jail(8) to add a list of ZFS datasets. Bump FreeBSD version for jail managers to switch to native dataset support.
Datasets are attached to the jail after the jail creation and before the execution of any start command. Unlike current implementations in jail managers which attach datasets after the start command, this allows the zfs rc.d script to mount the datasets on start.
Discussed with: jamie
show more ...
|
#
4d65a7c6 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
usr.sbin: 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.
usr.sbin: 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 |
|
#
e8d7ae91 |
| 15-Dec-2022 |
Jamie Gritton <jamie@FreeBSD.org> |
jail: fix a NULL pointer derefence in parsing ip6.addr settings.
This is the counterpart to bd24e861b4ef, which did the same for ip4. PR: 268377 Reported by: ahkithaama at proton.me
|
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0 |
|
#
466df976 |
| 04-Mar-2021 |
Kyle Evans <kevans@FreeBSD.org> |
jail(8): reset to root cpuset before attaching to run commands
Recent changes have made it such that attaching to a jail will augment the attaching process' cpu mask with the jail's cpuset. While th
jail(8): reset to root cpuset before attaching to run commands
Recent changes have made it such that attaching to a jail will augment the attaching process' cpu mask with the jail's cpuset. While this is convenient for allowing the administrator to cpuset arbitrary programs that will attach to a jail, this is decidedly not convenient for executing long-running daemons during jail creation.
This change inserts a reset of the process cpuset to the root cpuset between the fork and attach to execute a command. This allows commands executed to have the widest mask possible, and the administrator can cpuset(1) it back down inside the jail as needed.
With this applied, one should be able to change a jail's cpuset at exec.poststart in addition to exec.created. The former was made difficult if jail(8) itself was running with a constrained set, as then some processes may have been spawned inside the jail with a non-root set. The latter is the preferred option so that processes starting in the jail are constrained appropriately up front.
Note that all system commands are still run with the process' initial cpuset applied.
PR: 253724 MFC after: 3 days Reviewed by: jamie Differential Revision: https://reviews.freebsd.org/D29008
show more ...
|
Revision tags: release/12.2.0, release/11.4.0 |
|
#
66005c45 |
| 15-May-2020 |
Ryan Moeller <freqlabs@FreeBSD.org> |
jail: Add exec.prepare and exec.release command hooks
This change introduces new jail command hooks that run before and after any other actions.
The exec.prepare hook can be used for example to inv
jail: Add exec.prepare and exec.release command hooks
This change introduces new jail command hooks that run before and after any other actions.
The exec.prepare hook can be used for example to invoke a script that checks if the jail's root exists, creating it if it does not. Since arbitrary variables in jail.conf can be passed to the command, it can be pretty useful for templating jails.
An example use case for exec.release would be to remove the filesystem of an ephemeral jail.
The names "prepare" and "release" are borrowed from the names of similar hooks in libvirt.
Reviewed by: jamie, manpages, mmacy Approved by: mmacy (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24829
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
be659d72 |
| 19-Jan-2019 |
Dmitry Morozovsky <marck@FreeBSD.org> |
Clarify error messages a bit.
X-Found-With: r343112 MFC after: 1 month
|
#
bd24e861 |
| 17-Jan-2019 |
Eugene Grosbein <eugen@FreeBSD.org> |
jail(8): stop crashing with SIGSEGV inside run_command() function while processing not entirely correct jail.conf(5) file having something like "ip4.addr = 127.0.0.1;" and no "ip4 = ...;" so extrap v
jail(8): stop crashing with SIGSEGV inside run_command() function while processing not entirely correct jail.conf(5) file having something like "ip4.addr = 127.0.0.1;" and no "ip4 = ...;" so extrap variable stays NULL.
Reported by: marck MFC after: 1 month
show more ...
|
Revision tags: release/12.0.0 |
|
#
3611ec60 |
| 18-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r337646 through r338014.
|
#
f6c0e63b |
| 15-Aug-2018 |
Alexander Leidinger <netchild@FreeBSD.org> |
- Add exec hook "exec.created". This is called when the jail is created and before exec.start is called. [1] - Bump __FreeBSD_version.
This allows to attach ZFS datasets and various other things
- Add exec hook "exec.created". This is called when the jail is created and before exec.start is called. [1] - Bump __FreeBSD_version.
This allows to attach ZFS datasets and various other things to be done before any command/service/rc-script is started in the new jail.
PR: 228066 [1] Reviewed by: jamie [1] Submitted by: Stefan Grönke <stefan@gronke.net> [1] Differential Revision: https://reviews.freebsd.org/D15330 [1]
show more ...
|
Revision tags: release/11.2.0 |
|
#
1de7b4b8 |
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error
various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
No functional change intended.
show more ...
|
#
55b1c6e7 |
| 15-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325663 through r325841.
|
#
72130735 |
| 10-Nov-2017 |
Ed Maste <emaste@FreeBSD.org> |
Strip EOL whitespace in usr.sbin/{jail,jexec}
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0 |
|
#
4c86c0fa |
| 14-Jul-2016 |
Jamie Gritton <jamie@FreeBSD.org> |
Fix up the order in which jail creation processes are run, to preserve the config file's order in the non-parallel-start case.
PR: 209112 MFC after: 3 days
|
#
a99d8210 |
| 25-Apr-2016 |
Jamie Gritton <jamie@FreeBSD.org> |
Make jail(8) interpret escape codes in fstab the same as getfsent(3).
PR: 208663 MFC after: 3 days
|
Revision tags: release/10.3.0 |
|
#
d9b9dae1 |
| 22-Jan-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r294169 through r294598.
|
#
009e81b1 |
| 22-Jan-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
MFH @r294567
|
#
59d43d11 |
| 20-Jan-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
fcc43d06 |
| 16-Jan-2016 |
Jamie Gritton <jamie@FreeBSD.org> |
Clear errno before calling getpw*.
|
#
b626f5a7 |
| 04-Jan-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH r289384-r293170
Sponsored by: The FreeBSD Foundation
|
#
a5d8944a |
| 19-Nov-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with head (r291075).
|
#
3c3feed4 |
| 01-Nov-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
11d38a57 |
| 28-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
Sponsored by: Gandi.net
|