diff options
| author | Jamie Gritton <jamie@FreeBSD.org> | 2026-09-23 23:25:35 +0000 |
|---|---|---|
| committer | Jamie Gritton <jamie@FreeBSD.org> | 2026-09-23 23:25:35 +0000 |
| commit | 10a3562a019b4eaaa0f5c50a15d739c43e41e8e7 (patch) | |
| tree | 6b3ab519c36b1de68c3a791d58a42af98eb317ce | |
| parent | 0bd6348b52e1991fafc55128173c989dab36dfd9 (diff) | |
jail: set default root directory for a jail to its parent's root.
All default jail parameter values are an empty or otherwise standard
value, or are copied the jail's parent. A notable exception is the
root directory, which is instead copied from the creating process's
jail. Fix that to be in line with everything else.
This change affects only the default when no path is specified; if
a path of "/" is explicitly given, that will still be the creating
process's root directory.
| -rw-r--r-- | sys/kern/kern_jail.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 869da730ff77..69cb003b9fda 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -1818,7 +1818,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) namelc = ""; if (path == NULL) { path = "/"; - root = mypr->pr_root; + root = ppr->pr_root; vref(root); } strlcpy(pr->pr_hostuuid, DEFAULT_HOSTUUID, HOSTUUIDLEN); |
