History log of /freebsd-head/usr.sbin/jail/state.c
Revision Date Author Comments
fd4e8702103ee5f138e85a8824d40dd0f499475d 12-Sep-2019 mizhka <mizhka@FreeBSD.org> [jail] removal by jid doesn't trigger pre/post stop scripts

This commit fixes bug: command "jail -r" didn't trigger pre/post stop
commands (and others) defined in config file if jid is specified insted of
name. Also it adds basic tests for usr.sbin/jail to avoid regression.

Reviewed by: jamie, kevans, ray
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D21328
7551d83c353e040b32c6ac205e577dbc5f2c8955 27-Nov-2017 pfg <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
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.
20a9e2385387eac2880c92072cc3507c169a0f59 17-Jul-2016 jamie <jamie@FreeBSD.org> MFC r302856:

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
0e8a4f4181ebe5a68743f390d0f98b3e7f773710 14-Jul-2016 jamie <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
00d578928eca75be320b36d37543a7e2a4f9fbdb 27-May-2016 grehan <grehan@FreeBSD.org> Create branch for bhyve graphics import.
86654891d03ffa246d52c98288a42cdd8e0ee6e8 25-Nov-2014 jamie <jamie@FreeBSD.org> In preparation for using clang's -Wcast-qual:

Use __DECONST (instead of my own attempted re-invention) for the iov
parameters to jail_get/set(2). Similarly remove the decost-ish hack
from execvp's argv, except the __DECONST is only added at very end.

While I'm at it, remove an unused variable and fix a comment typo.
eb1a5f8de9f7ea602c373a710f531abbf81141c4 21-Feb-2014 gjb <gjb@FreeBSD.org> Move ^/user/gjb/hacking/release-embedded up one directory, and remove
^/user/gjb/hacking since this is likely to be merged to head/ soon.

Sponsored by: The FreeBSD Foundation
6b01bbf146ab195243a8e7d43bb11f8835c76af8 27-Dec-2013 gjb <gjb@FreeBSD.org> Copy head@r259933 -> user/gjb/hacking/release-embedded for initial
inclusion of (at least) arm builds with the release.

Sponsored by: The FreeBSD Foundation
a85d762796e36a664734574599d8854c54db7479 08-Feb-2012 jamie <jamie@FreeBSD.org> Improvements in error messages:

Some errors printed the jail name for unnamed (command line) jails.

Attempting to create an already-existing jail from the command line
returned with no error (even for non-root) due to bad logic in
start_state.

Ignore kvm_proc errors, which are typically caused by permission
problems. Instead, stop ignoring permission errors when removing
a jail (but continue to silently ignore other errors, i.e. the
jail no longer existing). This makes non-root attempts at removing
a jail give a clearer error message.
8d425bfde2c0af68087f5784ac994ac5d316a375 17-Jun-2011 jamie <jamie@FreeBSD.org> Update copyright dates and other whitespacey stuff.
0e5ec9dce0b4f9791252ba22064fb407dc733ff9 17-Jun-2011 jamie <jamie@FreeBSD.org> Change cfstrings from an STAILQ into a TAILQ to allow commands to be
traversed in reverse order.
3a156b82bb5985e9c61a72da436b8f7ccc2c9b24 10-Dec-2010 jamie <jamie@FreeBSD.org> run_command (mostly) cleanup:

Make the parallelism limit a global instead of always passing it
to run_command and finish_command.
In the case of an empty command string, try to run any other strings
the command may have.
Replace JF_BACKGROUND with its sort-of opposite JF_SLEEPQ.
Change j->comstring earlier to render JF_RUNQ unncessary.
Change the if-else series to a more readable switch statement.
Treat IP_STOP_TIMEOUT like a command, calling run_command which then
calls term_procs.
When the IP_STOP_TIMEOUT "command" finishes, it shouldn't mess with
the parallelism limit.
Make sufficient checks in finish_command and run_command so that
the nonintuitive j->comstring null check isn't necessary to run them.
Rename the "waiting" queue to "depend", because the "sleeping" and
"runnable" queues are also used to wait for something.
3b31921eb1179730750d3f91afe80cd48a49aa95 20-Oct-2010 jamie <jamie@FreeBSD.org> Initial work on the new jail(8). There are more features to add, and some
cleaning up to do on existing features, but this is pretty much what the
final product will look like.