History log of /src/usr.sbin/jexec/jexec.c (Results 1 – 25 of 96)
Revision Date Author Comments
# 58107867 15-Jan-2026 Jesús Daniel Colmenares Oviedo <dtxdf@FreeBSD.org>

jexec: Add -e parameter to customize the environment

Currently, to define a new environment variable or modify an existing
one, we need to use env(1), which may or may not be available inside
the ja

jexec: Add -e parameter to customize the environment

Currently, to define a new environment variable or modify an existing
one, we need to use env(1), which may or may not be available inside
the jail, especially in OCI containers created with the scratch
layer (i.e., those containers that are only a single static binary,
plus configuration files and related stuff). With this option, we
can specify environment variables of arbitrary length for the
specified process running inside the jail.

Reviewed by: jamie@
Approved by: jamie@
Differential Revision: https://reviews.freebsd.org/D54660

show more ...


# d56f3b05 05-Mar-2025 Jamie Gritton <jamie@FreeBSD.org>

jail: add jexec -d, to specify a working directory
PR: 283170
Submitted by: DtxdF at disroot.org


# 5cf70549 12-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 ...


# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\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 ...


# 58107867 15-Jan-2026 Jesús Daniel Colmenares Oviedo <dtxdf@FreeBSD.org>

jexec: Add -e parameter to customize the environment

Currently, to define a new environment variable or modify an existing
one, we need to use env(1), which may or may not be available inside
the ja

jexec: Add -e parameter to customize the environment

Currently, to define a new environment variable or modify an existing
one, we need to use env(1), which may or may not be available inside
the jail, especially in OCI containers created with the scratch
layer (i.e., those containers that are only a single static binary,
plus configuration files and related stuff). With this option, we
can specify environment variables of arbitrary length for the
specified process running inside the jail.

Reviewed by: jamie@
Approved by: jamie@
Differential Revision: https://reviews.freebsd.org/D54660

show more ...


# d56f3b05 05-Mar-2025 Jamie Gritton <jamie@FreeBSD.org>

jail: add jexec -d, to specify a working directory
PR: 283170
Submitted by: DtxdF at disroot.org


# 5cf70549 12-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 ...


# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\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 ...


# 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}


# b5ff185e 12-Sep-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from head


# ab875b71 13-Aug-2015 Navdeep Parhar <np@FreeBSD.org>

Catch up with head, primarily for the 1.14.4.0 firmware.


# 8d0f1085 22-Jul-2015 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r285341 through r285792.


# 3bbdb8a7 12-Jul-2015 Jamie Gritton <jamie@FreeBSD.org>

Run a shell in the jail when no command is specified.
Add a new flag, -l, for a clean environment, same as jail(8) exec.clean.
Change the GET_USER_INFO macro into a function.

PR: 201300
Submitted b

Run a shell in the jail when no command is specified.
Add a new flag, -l, for a clean environment, same as jail(8) exec.clean.
Change the GET_USER_INFO macro into a function.

PR: 201300
Submitted by: Willem Jan Withagen
MFC after: 3 days

show more ...


# 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}


# b5ff185e 12-Sep-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from head


# ab875b71 13-Aug-2015 Navdeep Parhar <np@FreeBSD.org>

Catch up with head, primarily for the 1.14.4.0 firmware.


# 8d0f1085 22-Jul-2015 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r285341 through r285792.


# 3bbdb8a7 12-Jul-2015 Jamie Gritton <jamie@FreeBSD.org>

Run a shell in the jail when no command is specified.
Add a new flag, -l, for a clean environment, same as jail(8) exec.clean.
Change the GET_USER_INFO macro into a function.

PR: 201300
Submitted b

Run a shell in the jail when no command is specified.
Add a new flag, -l, for a clean environment, same as jail(8) exec.clean.
Change the GET_USER_INFO macro into a function.

PR: 201300
Submitted by: Willem Jan Withagen
MFC after: 3 days

show more ...


# 10b3b545 17-Sep-2009 Dag-Erling Smørgrav <des@FreeBSD.org>

Merge from head


1234