summaryrefslogtreecommitdiff
path: root/usr.sbin/binmiscctl/binmiscctl.c
Commit message (Collapse)AuthorAgeFilesLines
* binmiscctl(8): miscellaneous cleanupKyle Evans2020-11-071-11/+11
| | | | | | | | | | | | - Bad whitespace in Makefile. - Reordered headers, sys/ first. - Annotated fatal/usage __dead2 to help `make analyze` out a little bit. - Spell a couple of sizeof constructs as "nitems" and "howmany" instead. MFC after: 1 week Notes: svn path=/head/; revision=367441
* Don't leak resources on duplicate -m or -M arguments. Last one wins.Warner Losh2017-12-281-0/+2
| | | | | | | CID: 1204385, 1204384 Notes: svn path=/head/; revision=327262
* binmiscctl should use modfind instead of kldfindSean Bruno2017-07-281-1/+2
| | | | | | | | | | | | | | | | | kldfind() only matches kernel modules, so if you link imgact_binmisc directly into the kernel, binmiscctl can't find it, tries to load it, and errors out with: Can't load imgact_binmisc kernel module: File exists A quick search of other base commands shows that the correct procedure is to call modfind(), and then try kldload() if that fails. PR: 218593 Submitted by: Dan Nelson <dnelson_1901@yahoo.com> MFC after: 1 week Notes: svn path=/head/; revision=321658
* Another attempt at resolving CID 1305629. The test of cmd == -1Don Lewis2016-05-131-1/+1
| | | | | | | | | | | | may make Coverity think that other negative values of cmd (used as an index) are possible. Testing < 0 is a more common idiom in any case. Reported by: Coverity CID: 1305629 Notes: svn path=/head/; revision=299687
* Revert r299584:Don Lewis2016-05-131-1/+1
| | | | | | | | | | Mark usage() as __dead2 so that Coverity doesn't think that execution continues after the call and uses a negative array subscript. Requested by: bde Notes: svn path=/head/; revision=299588
* Mark usage() as __dead2 so that Coverity doesn't think that executionDon Lewis2016-05-131-1/+1
| | | | | | | | | | continues after the call and uses a negative array subscript. Reported by: Coverity CID: 1305629 Notes: svn path=/head/; revision=299584
* If no arguments are passed to a subcommand that requires arguments,Sean Bruno2015-02-151-1/+3
| | | | | | | | | | | error out before we deref a null pointer in the check for max length. Thanks to otis in IRC for the bug report. MFC after: 3 days Notes: svn path=/head/; revision=278827
* Check for invalid length or more than max length for the interpreter, insteadSean Bruno2015-01-281-1/+1
| | | | | | | | | | | of the validity of the string pointer holding the interpreter. Submitted by: sson Reviewed by: dim MFC after: 3 days Notes: svn path=/head/; revision=277853
* Add Stacey Son's binary activation patches that allow remapping ofSean Bruno2014-04-081-0/+508
execution to a emumation program via parsing of ELF header information. With this kernel module and userland tool, poudriere is able to build ports packages via the QEMU userland tools (or another emulator program) in a different architecture chroot, e.g. TARGET=mips TARGET_ARCH=mips I'm not connecting this to GENERIC for obvious reasons, but this should allow the kernel module to be built by default and enable the building of the userland tool (which automatically loads the kernel module). Submitted by: sson@ Reviewed by: jhb@ Notes: svn path=/head/; revision=264269