| #
0140dc4a
|
| 08-Dec-2025 |
Seth Hoffert <Seth.Hoffert@gmail.com> |
man typos: Fix pf.conf.5 and jail.2 typos
MFC after: 3 days Signed-off-by: Seth Hoffert <seth.hoffert@gmail.com> Closes: https://github.com/freebsd/freebsd-src/pull/1919
|
| #
ef2f36be
|
| 01-Sep-2025 |
Olivier Certner <olce@FreeBSD.org> |
jail.2: Mention EPERM is returned on open directories
The manual page does not directly mention this reason for getting EPERM, instead referring the reader to chroot(2). We have had some questions
jail.2: Mention EPERM is returned on open directories
The manual page does not directly mention this reason for getting EPERM, instead referring the reader to chroot(2). We have had some questions about it recently, in part due to a bug (fixed), and this case is not an obvious permission/problem, so let's be more explicit.
PR: 280809 Reviewed by: jamie MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52319
show more ...
|
| #
d81b337d
|
| 10-Sep-2025 |
Jamie Gritton <jamie@FreeBSD.org> |
jaildesc: remove file-mode-based access controls
Jail descriptors were given a file-like mode, user, and group, for the purpose of controlling how the descriptor may be used. This is too far remove
jaildesc: remove file-mode-based access controls
Jail descriptors were given a file-like mode, user, and group, for the purpose of controlling how the descriptor may be used. This is too far removed from the file paradigm to make sense. Remove it in favor of a better access control method to be added, such as Capsicum.
Also add missing code in jaildesc_fill_kinfo.
Reported by: crest at rlwinm.de, kib MFC after: 3 days
show more ...
|
| #
16f600dc
|
| 09-Sep-2025 |
Jamie Gritton <jamie@FreeBSD.org> |
jaildesc: replace EBADF with EINVAL
Following fd9e09cb, EBADF is not the suitable error code for a non- jail descriptor passed to jail_set, jail_get, jail_attach_fd, and jail_remove_fd.
Reported by
jaildesc: replace EBADF with EINVAL
Following fd9e09cb, EBADF is not the suitable error code for a non- jail descriptor passed to jail_set, jail_get, jail_attach_fd, and jail_remove_fd.
Reported by: kib
show more ...
|
| #
851dc7f8
|
| 04-Sep-2025 |
Jamie Gritton <jamie@FreeBSD.org> |
jail: add jail descriptors
Similar to process descriptors, jail desriptors are allow jail administration using the file descriptor interface instead of JIDs. They come from and can be used by jail_s
jail: add jail descriptors
Similar to process descriptors, jail desriptors are allow jail administration using the file descriptor interface instead of JIDs. They come from and can be used by jail_set(2) and jail_get(2), and there are two new system calls, jail_attach_jd(2) and jail_remove_jd(2).
Reviewed by: bz, brooks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D43696
show more ...
|
| #
8269e767
|
| 14-Nov-2023 |
Brooks Davis <brooks@FreeBSD.org> |
libsys: relocate implementations and manpages
Remove core system call implementations and documentation to lib/libsys and lib/libsys/<arch> from lib/libc/sys and lib/libc/<arch>/<sys>. Update paths
libsys: relocate implementations and manpages
Remove core system call implementations and documentation to lib/libsys and lib/libsys/<arch> from lib/libc/sys and lib/libc/<arch>/<sys>. Update paths to allow libc to find them in their new home.
Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908
show more ...
|
| #
ed31b3f4
|
| 30-Nov-2023 |
Jamie Gritton <jamie@FreeBSD.org> |
jail: Don't allow jail_set(2) to resurrect dying jails.
Currently, a prison in "dying" state (removed but still holding resources) can be brought back to alive state via "jail -d", or the JAIL_DYING
jail: Don't allow jail_set(2) to resurrect dying jails.
Currently, a prison in "dying" state (removed but still holding resources) can be brought back to alive state via "jail -d", or the JAIL_DYING flag to jail_set(2). This seemed like a good idea at the time.
Its main use was to improve support for specifying the jid when creating a jail, which also seemed like a good idea at the time. But resurrecting a jail that was partway through thr process of shutting down is trouble waiting to happen.
This patch deprecates that flag, leaving it as a no-op for creating jails (but still useful for looking at dying jails). It sill allows creating a new jail with the same jid as a dying one, but will renumber the old one in that case. That's imperfect, but allows for current behavior.
Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D28150
show more ...
|
| #
fa9896e0
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
|
| #
d4380c0c
|
| 19-Feb-2021 |
Jamie Gritton <jamie@FreeBSD.org> |
jail: Change both root and working directories in jail_attach(2)
jail_attach(2) performs an internal chroot operation, leaving it up to the calling process to assure the working directory is inside
jail: Change both root and working directories in jail_attach(2)
jail_attach(2) performs an internal chroot operation, leaving it up to the calling process to assure the working directory is inside the jail.
Add a matching internal chdir operation to the jail's root. Also ignore kern.chroot_allow_open_directories, and always disallow the operation if there are any directory descriptors open.
Reported by: mjg Approved by: markj, kib MFC after: 3 days
show more ...
|
| #
c542c43e
|
| 16-Aug-2018 |
Jamie Gritton <jamie@FreeBSD.org> |
Revert r337922, except for some documention-only bits. This needs to wait until user is changed to stop using jail(2).
Differential Revision: D14791
|
| #
284001a2
|
| 16-Aug-2018 |
Jamie Gritton <jamie@FreeBSD.org> |
Put jail(2) under COMPAT_FREEBSD11. It has been the "old" way of creating jails since FreeBSD 7.
Along with the system call, put the various security.jail.allow_foo and security.jail.foo_allowed sy
Put jail(2) under COMPAT_FREEBSD11. It has been the "old" way of creating jails since FreeBSD 7.
Along with the system call, put the various security.jail.allow_foo and security.jail.foo_allowed sysctls partly under COMPAT_FREEBSD11 (or BURN_BRIDGES). These sysctls had two disparate uses: on the system side, they were global permissions for jails created via jail(2) which lacked fine-grained permission controls; inside a jail, they're read-only descriptions of what the current jail is allowed to do. The first use is obsolete along with jail(2), but keep them for the second-read-only use.
Differential Revision: D14791
show more ...
|
| #
ee8d6bd3
|
| 30-May-2016 |
Jamie Gritton <jamie@FreeBSD.org> |
Mark jail(2), and the sysctls that it (and only it) uses as deprecated. jail(8) has long used jail_set(2), and those sysctl only cause confusion.
|
| #
e94b881b
|
| 10-Feb-2016 |
Jamie Gritton <jamie@FreeBSD.org> |
Remove man page references to rndassociates.com, which has been taken over by a domain squatter.
|
| #
91b24c18
|
| 26-Apr-2012 |
Jamie Gritton <jamie@FreeBSD.org> |
A new jail(8) with a configuration file, ultimately to replace the work currently done by /etc/rc.d/jail.
MFC after: 3 months
|
| #
50d675f7
|
| 29-Mar-2012 |
Eitan Adler <eadler@FreeBSD.org> |
Remove trailing whitespace per mdoc lint warning
Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days
|
| #
6b99842a
|
| 12-Feb-2012 |
Ed Schouten <ed@FreeBSD.org> |
Globally replace u_int*_t from (non-contributed) man pages.
The reasoning behind this, is that if we are consistent in our documentation about the uint*_t stuff, people will be less tempted to write
Globally replace u_int*_t from (non-contributed) man pages.
The reasoning behind this, is that if we are consistent in our documentation about the uint*_t stuff, people will be less tempted to write new code that uses the non-standard types.
I am not going to bump the man page dates, as these changes can be considered style nits. The meaning of the man pages is unaffected.
MFC after: 1 month
show more ...
|
| #
e9d3a32f
|
| 08-Feb-2012 |
Jamie Gritton <jamie@FreeBSD.org> |
Acknowledge that jail_attach and jail_remove can return EPERM.
MFC after: 1 week
|
| #
40229872
|
| 20-Oct-2010 |
Jamie Gritton <jamie@FreeBSD.org> |
Remove a section that went to jail(8), and fix a small grammar error.
|
| #
edfa427c
|
| 02-Aug-2010 |
Joel Dahl <joel@FreeBSD.org> |
Spelling fixes.
|
| #
b97457e2
|
| 23-Jun-2009 |
Jamie Gritton <jamie@FreeBSD.org> |
Add a limit for child jails via the "children.cur" and "children.max" parameters. This replaces the simple "allow.jails" permission.
Approved by: bz (mentor)
|
| #
0304c731
|
| 27-May-2009 |
Jamie Gritton <jamie@FreeBSD.org> |
Add hierarchical jails. A jail may further virtualize its environment by creating a child jail, which is visible to that jail and to any parent jails. Child jails may be restricted more than their
Add hierarchical jails. A jail may further virtualize its environment by creating a child jail, which is visible to that jail and to any parent jails. Child jails may be restricted more than their parents, but never less. Jail names reflect this hierarchy, being MIB-style dot-separated strings.
Every thread now points to a jail, the default being prison0, which contains information about the physical system. Prison0's root directory is the same as rootvnode; its hostname is the same as the global hostname, and its securelevel replaces the global securelevel. Note that the variable "securelevel" has actually gone away, which should not cause any problems for code that properly uses securelevel_gt() and securelevel_ge().
Some jail-related permissions that were kept in global variables and set via sysctls are now per-jail settings. The sysctls still exist for backward compatibility, used only by the now-deprecated jail(2) system call.
Approved by: bz (mentor)
show more ...
|
| #
b38ff370
|
| 29-Apr-2009 |
Jamie Gritton <jamie@FreeBSD.org> |
Introduce the extensible jail framework, using the same "name=value" interface as nmount(2). Three new system calls are added: * jail_set, to create jails and change the parameters of existing jails
Introduce the extensible jail framework, using the same "name=value" interface as nmount(2). Three new system calls are added: * jail_set, to create jails and change the parameters of existing jails. This replaces jail(2). * jail_get, to read the parameters of existing jails. This replaces the security.jail.list sysctl. * jail_remove to kill off a jail's processes and remove the jail. Most jail parameters may now be changed after creation, and jails may be set to exist without any attached processes. The current jail(2) system call still exists, though it is now a stub to jail_set(2).
Approved by: bz (mentor)
show more ...
|
| #
7074cfa2
|
| 29-Apr-2009 |
Jamie Gritton <jamie@FreeBSD.org> |
With the permission of phk@ change the license on remaining jail code to a 2 clause BSD license.
Approved by: phk Approved by: bz (mentor)
|
| #
73de1e83
|
| 06-Jan-2009 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Document the special loopback address behaviour of jails.
PR: kern/103464 Submitted by: brueffer (correct markup) Reviewed by: brueffer MFC after: 2 weeks
|
| #
413628a7
|
| 29-Nov-2008 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
MFp4: Bring in updated jail support from bz_jail branch.
This enhances the current jail implementation to permit multiple addresses per jail. In addtion to IPv4, IPv6 is supported as well. Due to
MFp4: Bring in updated jail support from bz_jail branch.
This enhances the current jail implementation to permit multiple addresses per jail. In addtion to IPv4, IPv6 is supported as well. Due to updated checks it is even possible to have jails without an IP address at all, which basically gives one a chroot with restricted process view, no networking,..
SCTP support was updated and supports IPv6 in jails as well.
Cpuset support permits jails to be bound to specific processor sets after creation.
Jails can have an unrestricted (no duplicate protection, etc.) name in addition to the hostname. The jail name cannot be changed from within a jail and is considered to be used for management purposes or as audit-token in the future.
DDB 'show jails' command was added to aid debugging.
Proper compat support permits 32bit jail binaries to be used on 64bit systems to manage jails. Also backward compatibility was preserved where possible: for jail v1 syscalls, as well as with user space management utilities.
Both jail as well as prison version were updated for the new features. A gap was intentionally left as the intermediate versions had been used by various patches floating around the last years.
Bump __FreeBSD_version for the afore mentioned and in kernel changes.
Special thanks to: - Pawel Jakub Dawidek (pjd) for his multi-IPv4 patches and Olivier Houchard (cognet) for initial single-IPv6 patches. - Jeff Roberson (jeff) and Randall Stewart (rrs) for their help, ideas and review on cpuset and SCTP support. - Robert Watson (rwatson) for lots and lots of help, discussions, suggestions and review of most of the patch at various stages. - John Baldwin (jhb) for his help. - Simon L. Nielsen (simon) as early adopter testing changes on cluster machines as well as all the testers and people who provided feedback the last months on freebsd-jail and other channels. - My employer, CK Software GmbH, for the support so I could work on this.
Reviewed by: (see above) MFC after: 3 months (this is just so that I get the mail) X-MFC Before: 7.2-RELEASE if possible
show more ...
|