summaryrefslogtreecommitdiffstats
path: root/usr.sbin/jls
Commit message (Collapse)AuthorAgeFilesLines
* Make sure that the direct jls invocations prints somethingbz2008-12-141-17/+31
| | | | | | | | | | | | reasonable close to and in the same format as it had always. r185435 said it would try that but I had been living with jail patches for too long to actually remember the single-line format when adding backwards compatibility back in p4. Reported by: Philipp Wuensche <cryx-freebsd@h3q.com> Tested by: Philipp Wuensche <cryx-freebsd@h3q.com> MFC after: 4 weeks (just for me to get the mail)
* Correctly check the number of prison states to not access anythingbz2008-12-111-2/+2
| | | | | | | | | | | | outside the prison_states array. When checking if there is a name configured for the prison, check the first character to not be '\0' instead of checking if the char array is present, which it always is. Note, that this is different for the *jailname in the syscall. Found with: Coverity Prevent(tm) CID: 4156, 4155 MFC after: 4 weeks (just that I get the mail)
* MFp4:bz2008-11-293-26/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Sync code with the error report: calloc(number, 1) is equivalent topjd2005-08-191-1/+1
| | | | malloc(number).
* Not sure why, but SYSCTL_OUT() can sometimes keep returning ENOMEMpjd2005-08-151-11/+17
| | | | | | | | | | | | | | | | | | in sysctl_jail_list(). Because of this, jls(8) could enter into an endless loop. The strange thing is, that we can call jls(8) while the other one is in loop and it will succeed - SYSCTL_OUT() will not return ENOMEM there. Maybe SYSCTL_OUT() returns first ENOMEM, because there is no memory, but is marking some memory range as wired even on failure and another SYSCTL_OUT() calls are not going to succeed, because process exceeds limit of wired memory? ENOVMCLUE. Anyway. Fix jls(8) to ignore ENOMEM and retry only 4 times. Submitted by: Niklas Saers PR: kern/79245 MFC after: 3 days
* IP addresses can be up to 15 characters long, not 12.mike2003-04-221-2/+2
| | | | PR: 50904
* Fixed an err() format error in rev.1.1. This should have been fatalbde2003-04-171-1/+1
| | | | | since WARNS was high in rev.1.1, but __printf0like() has been temporarily disabled for 9 months.
* o Add jls(8) for listing active jails.mike2003-04-093-0/+134
o Add jexec(8) to execute a command in an existing jail. o Add -j option for killall(1) to kill all processes in a specified jail. o Add -i option to jail(8) to output jail ID of newly created jail.
OpenPOWER on IntegriCloud