summaryrefslogtreecommitdiffstats
path: root/lib/libjail
Commit message (Collapse)AuthorAgeFilesLines
* MFC r317036:pfg2017-05-071-3/+3
| | | | | | | | | | | libjail: make allocation in jailparam_all() somewhat more robust. Unsign some variables involved in allocation as they will never be negative anyways. Provide some bounds checking through reallocarray(3). This is all very unlikely to have any visible effect. Reviewed by: jamie
* First pass through library packaging.gjb2016-02-041-0/+1
| | | | Sponsored by: The FreeBSD Foundation
* Add a package for jail(8) and related utilities.gjb2016-01-201-0/+2
| | | | Sponsored by: The FreeBSD Foundation
* META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.bdrewery2015-11-251-1/+0
| | | | | | | | This both avoids some dependencies on xinstall.host and allows bootstrapping on older releases to work due to lack of at least 'install -l' support. Sponsored by: EMC / Isilon Storage Division
* Revert r284417 it is not necessary anymorebapt2015-06-151-1/+1
|
* Enforce overwritting SHLIBDIRbapt2015-06-151-1/+1
| | | | | | | | | Since METAMODE has been added, sys.mk loads bsd.mkopt.mk which ends load loading bsd.own.mk which then defines SHLIBDIR before all the Makefile.inc everywhere. This makes /lib being populated again. Reported by: many
* Add META_MODE support.sjg2015-06-131-0/+20
|\ | | | | | | | | | | | | | | | | | | | | 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
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-272-7/+7
| |\ | |/ |/|
| * Updated dependenciessjg2014-05-161-1/+1
| |
| * Updated dependenciessjg2014-05-101-0/+2
| |
| * Updated dependenciessjg2013-03-111-0/+1
| |
| * Updated dependenciessjg2013-02-161-2/+0
| |
| * Updated/new Makefile.dependsjg2012-11-081-0/+3
| |
| *-. Sync from headsjg2012-11-041-13/+17
| |\ \
| * | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+17
| | |/ | |/| | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | In preparation for using clang's -Wcast-qual:jamie2014-11-252-7/+7
| |/ |/| | | | | | | | | | | | | Use __DECONST (instead of my own attempted re-invention) for the iov parameters to jail_get/set(2). Similarly remove the decost-ish hack from execvp's argv, except the __DECONST is only added at very end. While I'm at it, remove an unused variable and fix a comment typo.
* | Fix some memory allocation errors:jamie2012-10-041-13/+17
|/ | | | | | | | | * jail_setv will leak a parameter name if jailparam_import fails. * jailparam_all loses the jailparam pointer on realloc error (a clear freshman mistake). * If jailparam_init fails, the caller doesn't need to jailparam_free the buffer. That's not really clear, so set things to NULL allowing jailparam_free to work without error (though it's still not required).
* The fix in r235291 re-broke the "allow.nomount" case. Re-fix itjamie2012-05-221-12/+14
| | | | by testing for the right parameter name.
* The linker isn't consistent in the ordering of dynamic sysctls, so don'tjamie2012-05-111-13/+25
| | | | | assume that the unnamed final component of "security.jail.param.foo." is one less than the "foo" component. It might be one greater instead.
* Handle the case where a boolean parameter is also a node.jamie2012-03-011-30/+23
| | | | | PR: bin/165515 MFC after: 2 weeks
* Introduce signed and unsigned version of CTLTYPE_QUAD, renamingmdf2011-01-191-3/+12
| | | | existing uses. Rename sysctl_handle_quad() to sysctl_handle_64().
* Find a jail's type as part of jailparam_init rather than waiting untiljamie2010-10-271-10/+4
| | | | | | it's absolutely necessary. MFC after: 1 week
* mdoc: fix manlint warnings by unbreaking mdoc syntaxuqs2010-10-081-1/+1
|
* Whitespace and comment fixes.jamie2010-08-311-4/+2
| | | | MFC after: 3 days
* Don't over-allocate array values in jailparam_export.jamie2010-08-311-6/+9
| | | | | | Fix a little comment typo. MFC after: 3 days
* Make it clear in the example that jailparam_export's return valuejamie2010-08-311-1/+3
| | | | | | should be freed. MFC after: 3 days
* Don't copy and return a potentially unset buffer when jail_get fails.jamie2010-07-151-6/+10
|
* Don't import parameter values in jail_getv, except for the search key.jamie2010-07-151-71/+87
| | | | | | | | | | Remove the internal jailparam_vlist, in favor of using variants of its logic separately in jail_setv and jail_getv. Free the temporary parameter list and exported values in jail_setv and jail_getv. Noted by: Stanislav Uzunchev MFC after: 3 days
* realloc() with a proper amount of memory.ru2010-02-171-1/+1
| | | | MFC after: 3 days
* Build lib/ with WARNS=6 by default.ed2010-01-021-2/+0
| | | | | | | | | Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and lower it when needed. I'm setting WARNS?=0 for secure/. It seems secure/ includes the Makefile.inc provided by lib/. I'm not going to touch that directory. Most of the code there is contributed anyway.
* Add a null pointer check so "name" can be used as a key parameter injamie2009-12-171-1/+1
| | | | | | | | jailparam_get. PR: bin/141692 Submitted by: delphij MFC after: 3 days
* Fixed markup (mostly) errors.ru2009-09-211-48/+54
|
* Some jail parameters (in particular, "ip4" and "ip6" for IP addressjamie2009-07-252-60/+89
| | | | | | | | | restrictions) were found to be inadequately described by a boolean. Define a new parameter type with three values (disable, new, inherit) to handle these and future cases. Approved by: re (kib), bz (mentor) Discussed with: rwatson
* Fix dynamic (re)allocation logic in jailparam_set and jailparam_get.jamie2009-06-251-34/+72
| | | | | | Touch up jailparam_import a bit while I'm at it. Approved by: bz (mentor)
* Add libjail, a (somewhat) simpler interface to the jail_set and jail_getjamie2009-06-245-0/+1448
system calls and the security.jail.param sysctls. Approved by: bz (mentor)
OpenPOWER on IntegriCloud