Page MenuHomeFreeBSD

JailsGroup
ActivePublic

Recent Activity

Tue, May 5

crest_freebsd_rlwinm.de added inline comments to D46284: Add the ability have executable jail.conf.
Tue, May 5, 11:42 AM · Jails
crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.

Use the last instead of the first match (per jail) to enable dynamic configuration.

Tue, May 5, 11:35 AM · Jails

Mon, May 4

crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.

Make dynamic (aka executable) jail.conf opt-in via the already parsed partial jail.conf.

Mon, May 4, 2:20 PM · Jails

Sat, May 2

zlei added a comment to D49158: ng_eiface(4) and ng_iface(4) should play better with vnet(9).

I vastly under appreciated that folks rely upon the ng_eiface not moving with the struct ifnet. Probably because I've been using them in jails for over a decade and only recently noticed myself.

I encountered that situation because I was exploring the ordering of ng_eiface creation, move to jail, and rename. The idea being I could have the same interface names in jails if I waited until after the move to rename them and therefore use the same config for dhcpcd. I was then surprised at what happened when an interface was renamed in a jail and then the jail was shut down. I then went off with the wrong assumption that it was missed, moving ng_eiface to the new vnet.

Sat, May 2, 6:34 PM · Jails, network

Wed, Apr 29

kevans added a comment to D46284: Add the ability have executable jail.conf.

I had hoped to attend the jail user call today to be able to discuss this, but the Discord event has it an hour off and I didn't discover the authoritative source @ callfortesting.org until I was wondering why nobody was showing up. *deep sigh*

I don't think we're comfortable, as a project, to enable this for all users of jail(8) by default without an additional flag. I appreciate that you want to do stuff like this with existing jail scripts but this is a huge POLA violation (even assuming proper communication across a major branch update) with security implications, and I don't think enabling maybe-executable config scripts is a pattern that we really want propagating.

There was some discussion out-of-band after a concerned user reached out about this, and it was pointed out to me that automountd does the same thing, so I've pitched a review to try and neuter that a bit because that's terrifying: D56680.

The jail.conf(5) format already defines hooks that by design execute as root on the host (exec.prepare/created/prestart/poststart/prestop/poststop/release). Having any untrusted jail.conf(5) on the system is a game over scenario similar to having a malicous /etc/crontab or rc.d script installed. Moving the attack surface a few milliseconds forward from the exec.prepare (or exec.prestop when removing a jail) stage to the config parsing stage doesn't increase the attack surface in a meaningful way.

Wed, Apr 29, 4:49 PM · Jails
crest_freebsd_rlwinm.de added a comment to D46284: Add the ability have executable jail.conf.
In D46284#1299031, @imp wrote:

@kevans: Can you think of a realistic situation where someone will have their jail configuration unintentionally executable? I don't think chmod -R 777 /etc is a supported configuration. Are we forced to support FAT32 as root file system on any strange platform or something like that?

That's the wrong question. For security related things, you have to default to 'fail safe' and this feature fails to meet that criteria.

Wed, Apr 29, 3:07 PM · Jails
imp added a comment to D46284: Add the ability have executable jail.conf.

@kevans: Can you think of a realistic situation where someone will have their jail configuration unintentionally executable? I don't think chmod -R 777 /etc is a supported configuration. Are we forced to support FAT32 as root file system on any strange platform or something like that?

Wed, Apr 29, 3:00 PM · Jails
crest_freebsd_rlwinm.de added a comment to D46284: Add the ability have executable jail.conf.

I had hoped to attend the jail user call today to be able to discuss this, but the Discord event has it an hour off and I didn't discover the authoritative source @ callfortesting.org until I was wondering why nobody was showing up. *deep sigh*

I don't think we're comfortable, as a project, to enable this for all users of jail(8) by default without an additional flag. I appreciate that you want to do stuff like this with existing jail scripts but this is a huge POLA violation (even assuming proper communication across a major branch update) with security implications, and I don't think enabling maybe-executable config scripts is a pattern that we really want propagating.

There was some discussion out-of-band after a concerned user reached out about this, and it was pointed out to me that automountd does the same thing, so I've pitched a review to try and neuter that a bit because that's terrifying: D56680.

Wed, Apr 29, 2:51 PM · Jails

Tue, Apr 28

kevans added a comment to D46284: Add the ability have executable jail.conf.

I had hoped to attend the jail user call today to be able to discuss this, but the Discord event has it an hour off and I didn't discover the authoritative source @ callfortesting.org until I was wondering why nobody was showing up. *deep sigh*

Tue, Apr 28, 6:41 PM · Jails
crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.

New attempt with git format-patch -U999999 *sigh*.

Tue, Apr 28, 3:59 PM · Jails

Sun, Apr 26

crest_freebsd_rlwinm.de added a comment to D46284: Add the ability have executable jail.conf.

Since Phabricator ignores my attempts to update this review to modify multiple files with the diff I created a GitHub pull request at https://github.com/freebsd/freebsd-src/pull/2164 .

Sun, Apr 26, 1:29 PM · Jails
crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.

Try to copy and paste the patch instead of uploading as a file. Sorry for the noise.

Sun, Apr 26, 1:01 PM · Jails
crest_freebsd_rlwinm.de added a comment to D46284: Add the ability have executable jail.conf.

For some reason Phabricator doesn't register that I edited two additional files in the latest patch I uploaded and the raw diff doesn't include them either?!?

Sun, Apr 26, 1:00 PM · Jails
crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.

Second attempt to update the other source files too.

Sun, Apr 26, 12:45 PM · Jails
crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.
Sun, Apr 26, 12:42 PM · Jails
crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.

Use the parser's existing stack of nested jails instead of incorrectly assuming the last jail parsed is also the current jail. This incorrect assumption is not true after one or more jail blocks have been closed and no new jail block has been opened.

Sun, Apr 26, 12:40 PM · Jails
crest_freebsd_rlwinm.de added a comment to D46284: Add the ability have executable jail.conf.

As discussed putting this feature behind a paranoia flag to not cause issues for anyone that just happens to have an accidentally executable jail.conf(5) makes it effectively useless.

Sun, Apr 26, 10:23 AM · Jails
crest_freebsd_rlwinm.de added a comment to D46284: Add the ability have executable jail.conf.

Reformatted the code to 80 columns.

Sun, Apr 26, 10:21 AM · Jails
crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.

Reformat the code to 80 columns.

Sun, Apr 26, 10:20 AM · Jails
crest_freebsd_rlwinm.de added inline comments to D46284: Add the ability have executable jail.conf.
Sun, Apr 26, 9:10 AM · Jails

Sat, Apr 25

crest_freebsd_rlwinm.de added a comment to D46284: Add the ability have executable jail.conf.

Switch to single line comments inside the open_file() function.

Sat, Apr 25, 2:57 PM · Jails
crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.

Use single line comments in open_file() where appropriate.

Sat, Apr 25, 2:55 PM · Jails
crest_freebsd_rlwinm.de added a comment to D46284: Add the ability have executable jail.conf.

Replace fexecve(2) with execve(2) since fexecve(2) doesn't work with (shell) scripts unless /dev/fd is mounted with the non-standard "nodup" option.

Sat, Apr 25, 1:50 PM · Jails
crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.

Use normal pointer syntax for the pid pointer instead of pid_t pid[static 1].

Sat, Apr 25, 1:47 PM · Jails
crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.
Sat, Apr 25, 1:40 PM · Jails

Feb 11 2026

antranigv_freebsd.am added a watcher for Jails: antranigv_freebsd.am.
Feb 11 2026, 4:47 PM

Jan 15 2026

dtxdf closed D54660: jexec: Add -e parameter to customize the environment.
Jan 15 2026, 5:35 AM · Jails
jamie accepted D54660: jexec: Add -e parameter to customize the environment.
Jan 15 2026, 12:18 AM · Jails

Jan 14 2026

dtxdf added a comment to D54660: jexec: Add -e parameter to customize the environment.

Thank you!

Jan 14 2026, 7:14 PM · Jails
dtxdf updated the diff for D54660: jexec: Add -e parameter to customize the environment.
  • Use jexec_args variable with all parameters in both getopt calls.
Jan 14 2026, 7:14 PM · Jails
jamie added inline comments to D54660: jexec: Add -e parameter to customize the environment.
Jan 14 2026, 6:45 PM · Jails
dtxdf updated the diff for D54660: jexec: Add -e parameter to customize the environment.
  • Add missing error handling for putenv(3).
Jan 14 2026, 12:33 PM · Jails
dtxdf added a comment to D54660: jexec: Add -e parameter to customize the environment.

Why does it matter that putenv(3) doesn't create a copy?

Jan 14 2026, 6:05 AM · Jails
dtxdf updated the diff for D54660: jexec: Add -e parameter to customize the environment.
  • Avoid memory allocations.
  • Parse -e twice. Once to verify correctness. Again to set the variable.
Jan 14 2026, 5:57 AM · Jails
jamie added a comment to D54660: jexec: Add -e parameter to customize the environment.

Why does it matter that putenv(3) doesn't create a copy?

Jan 14 2026, 12:50 AM · Jails
dtxdf updated the diff for D54660: jexec: Add -e parameter to customize the environment.

Align putenv_copy() function declaration for consistency.

Jan 14 2026, 12:49 AM · Jails
dtxdf updated the diff for D54660: jexec: Add -e parameter to customize the environment.

Since putenv(3) does not create a copy, I had to implement a function to emulate the old behavior, so now setenv(3) is used after parsing the environment variable.

Jan 14 2026, 12:49 AM · Jails

Jan 12 2026

ziaee added a reviewer for D54660: jexec: Add -e parameter to customize the environment: manpages.
Jan 12 2026, 12:20 PM · Jails
zlei added a reviewer for D54660: jexec: Add -e parameter to customize the environment: Jails.
Jan 12 2026, 6:50 AM · Jails

Jan 11 2026

dtxdf requested review of D54660: jexec: Add -e parameter to customize the environment.
Jan 11 2026, 10:59 PM · Jails

Dec 29 2025

aregvardanyan17_gmail.com added a watcher for Jails: aregvardanyan17_gmail.com.
Dec 29 2025, 1:56 PM

Aug 26 2025

jamie requested changes to D46284: Add the ability have executable jail.conf.
Aug 26 2025, 8:14 PM · Jails

Aug 12 2025

jamie accepted D46284: Add the ability have executable jail.conf.
Aug 12 2025, 5:06 PM · Jails

Jul 22 2025

crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.

Document new -x flag in jail(8).

Jul 22 2025, 8:12 PM · Jails
crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.
Jul 22 2025, 8:10 PM · Jails

Jul 17 2025

jamie accepted D46284: Add the ability have executable jail.conf.

I had considered that the -l (exec clean) flag should be considered, but decided it really only makes sense for keeping the jail environment clean.

Jul 17 2025, 3:50 PM · Jails

Jul 12 2025

crest_freebsd_rlwinm.de updated the diff for D46284: Add the ability have executable jail.conf.

Put the executable jail.conf(5) behind the -x option (as chicken bit).

Jul 12 2025, 11:55 AM · Jails

Feb 27 2025

dave_freedave.net added a comment to D49158: ng_eiface(4) and ng_iface(4) should play better with vnet(9).

I vastly under appreciated that folks rely upon the ng_eiface not moving with the struct ifnet. Probably because I've been using them in jails for over a decade and only recently noticed myself.

Feb 27 2025, 8:34 PM · Jails, network
glebius added a comment to D49158: ng_eiface(4) and ng_iface(4) should play better with vnet(9).
In D49158#1121374, @zec wrote:

Your obsession with getting rid of the "flawed" if_vmove() is noted, but for the sake of other people who may have a different view, and who have applications relying on this very concept for 20+ years, please do not take that route.

Feb 27 2025, 7:38 PM · Jails, network
zec added a comment to D49158: ng_eiface(4) and ng_iface(4) should play better with vnet(9).

I do not like the plan. The picture drawn shows that a netgraph node in one vnet is connected to a node in a different vnet. This is basically a violation of the idea of vnet. Virtualized stacks should communicate with each other via network protocols, not kernel pointers. The only legal exclusion is epair(4).

Feb 27 2025, 7:13 PM · Jails, network