summaryrefslogtreecommitdiffstats
path: root/lib/libjail
Commit message (Collapse)AuthorAgeFilesLines
* 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