aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/jexec
Commit message (Collapse)AuthorAgeFilesLines
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326276
* Strip EOL whitespace in usr.sbin/{jail,jexec}Ed Maste2017-11-101-1/+1
| | | | Notes: svn path=/head/; revision=325664
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Define which of the username options (-u/-U) to jexec(8) is the default.Benedict Reuschling2016-04-231-1/+2
| | | | | | | | | | | | Bump Dd. PR: 207587 Submitted by: dewayne@heuristicsystems.com.au MFC after: 3 days Sponsored by: Essen Hackathon 2016 Notes: svn path=/head/; revision=298524
* Add a package for jail(8) and related utilities.Glen Barber2016-01-201-0/+2
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=294447
* Run a shell in the jail when no command is specified.Jamie Gritton2015-07-122-41/+101
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=285420
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-2/+1
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+22
| | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | Convert usr.sbin to LIBADDBaptiste Daroussin2014-11-251-2/+1
|/ | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275054
* The last big commit: let usr.sbin/ use WARNS=6 by default.Ed Schouten2010-01-021-1/+0
| | | | Notes: svn path=/head/; revision=201390
* Add libjail, a (somewhat) simpler interface to the jail_set and jail_getJamie Gritton2009-06-242-16/+8
| | | | | | | | | system calls and the security.jail.param sysctls. Approved by: bz (mentor) Notes: svn path=/head/; revision=194869
* Whitespace fix.Jamie Gritton2009-06-231-1/+1
| | | | | | | Approved by: bz (mentor) Notes: svn path=/head/; revision=194709
* In preparation for raising NGROUPS and NGROUPS_MAX, change baseBrooks Davis2009-06-191-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | system callers of getgroups(), getgrouplist(), and setgroups() to allocate buffers dynamically. Specifically, allocate a buffer of size sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow). This (or similar gymnastics) is required for the code to actually follow the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime and where getgroups may return {NGROUPS_MAX}+1 results on systems like FreeBSD which include the primary group. In id(1), don't pointlessly add the primary group to the list of all groups, it is always the first result from getgroups(). In principle the old code was more portable, but this was only done in one of the two places where getgroups() was called to the overall effect was pointless. Document the actual POSIX requirements in the getgroups(2) and setgroups(2) manpages. We do not yet support a dynamic NGROUPS, but we may in the future. MFC after: 2 weeks Notes: svn path=/head/; revision=194494
* Add support for the arbitrary named jail parameters used by jail_set(2)Jamie Gritton2009-05-273-193/+26
| | | | | | | | | | | | | | | | | and jail_get(2). Jail(8) can now create jails using a "name=value" format instead of just specifying a limited set of fixed parameters; it can also modify parameters of existing jails. Jls(8) can display all parameters of jails, or a specified set of parameters. The available parameters are gathered from the kernel, and not hard-coded into these programs. Small patches on killall(1) and jexec(8) to support jail names with jail_get(2). Approved by: bz (mentor) Notes: svn path=/head/; revision=192896
* - Style: size_t can't be negative.Ruslan Ermilov2009-04-041-17/+11
| | | | | | | | | | | | | | | | - Don't exit with a zero status code when no jails are configured on a system. - Style: simplify some code constructs. - If a single jail cannot be found, let the caller print a nicer diagnostic message. Reviewed by: bz MFC after: 3 days Notes: svn path=/head/; revision=190694
* Correctly check the number of prison states to not access anythingBjoern A. Zeeb2008-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) Notes: svn path=/head/; revision=185899
* MFp4:Bjoern A. Zeeb2008-11-293-77/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=185435
* Fix some bugs/complaints:Michael Reifenberger2008-05-292-22/+31
| | | | | | | | | | | | - make addr2jid static - add -h Flag for hostname/ip-number search - s,strncmp,strcmp, in addr2jid - return jid only if found once Requested by: some Notes: svn path=/head/; revision=179415
* Add CAUTIONS section to the manpage and update .Dd.Michael Reifenberger2008-05-262-2/+6
| | | | | | | | | | | Spelling fix. PR: bin/119305 (reminded by Frank Behrens) Suggested by: rwatson, maxim MFC after: 2 weeks Notes: svn path=/head/; revision=179327
* Extend jexec to accept hostname or ip-number besides jail-id.Michael Reifenberger2008-05-262-4/+60
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=179319
* Markup fixes.Ruslan Ermilov2006-09-291-0/+1
| | | | Notes: svn path=/head/; revision=162806
* Sync usage() with manpage's SYNOPSIS.Ruslan Ermilov2006-09-291-1/+1
| | | | Notes: svn path=/head/; revision=162801
* Add -u and -U which functions like the jail(8) that allowXin LI2006-04-193-6/+80
| | | | | | | | | | commands to be executed under a different credential. PR: bin/95777 Submitted by: clsung Notes: svn path=/head/; revision=157864
* Make jexec duplicate the actions of the shell searching for anBosko Milekic2003-07-041-2/+2
| | | | | | | | | | | executable file even if the specified action/filename does not contain a '/' character; convert execv() to execvp(). Submitted by: Christian S.J. Peron <maneo@bsdpro.com> PR: bin/54109 Notes: svn path=/head/; revision=117235
* excute: typo; possible replacements: excite, excuse.Ruslan Ermilov2003-05-311-4/+4
| | | | Notes: svn path=/head/; revision=115478
* o Add jls(8) for listing active jails.Mike Barcroft2003-04-093-0/+121
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. Notes: svn path=/head/; revision=113277