summaryrefslogtreecommitdiffstats
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* MFC r313356:ngie2017-02-141-1/+1
| | | | Fix typos in comments (returing -> returning)
* MFC r313358,r313360:ngie2017-02-141-6/+6
| | | | | | | | | | r313358: Sort sys/ #includes and zap an unnecessary trailing space nearby r313360: Sort sys/ #includes some more
* MFC r308312: vidcontrol: improve error handling in vt(4) font loadingemaste2017-02-101-18/+26
| | | | PR: 209078
* MFC r274583: Default to use 10 seconds as nap interval instead of 1.delphij2017-02-102-2/+2
|
* MFC r289172,r290254:ngie2017-02-097-16/+2
| | | | | | | | | | | | | | | | r289172: Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity r290254: Remove unused variable (SRCDIR)
* MFC r304142: ensure stripe size is non-zero multiple of 4096rpokala2017-02-081-6/+20
| | | | | | | | Ensure that the sector size is a multiple of 4096 to avoid creating unaligned partitions when the actual sector size is hidden from us. NOTE: This change was MFCed to stable/11 months ago as as r304448; I'm just MFCing it back one more stream.
* MFC r312694: Make CTL ramdisk backend a real RAM disk.mav2017-02-071-2/+17
| | | | | | | | | | | | | | | | | If "capacity" LU option is set, ramdisk backend now implements featured thin provisioned disk, storing data in malloc(9) allocated memory blocks of pblocksize bytes (default PAGE_SIZE or 4KB). Additionally ~0.2% of LU size is used for indirection tree (bigger pblocksize reduce the overhead). Backend supports all unmap and anchor operations. If configured capacity is overflowed, proper error conditions are reported. If "capacity" LU option is not set, the backend operates mostly the same as before without allocating real storage: writes go to nowhere, reads return zeroes, reporting that all LBAs are unmapped. This backend is still mostly oriented on testing and benchmarking (it is still a volatile RAM disk), but now it should allow to run real FS tests, not only simple dumb dd.
* MFC r311471:ngie2017-02-041-3/+9
| | | | | Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into sendmail.
* MFC r311744,r312328,r312329,r312330:ngie2017-02-043-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r311744: Document bsd.snmpmod.mk from a high-level r312328: Add a make target (smilint) for running smilint tool against BMIBS Running smilint against MIB definitions is useful in finding functional problems with MIB definitions/descriptions. This is inspired by the smilint targets defined in usr.sbin/bsnmpd/modules/{snmp_hostres,snmp_mibII}/Makefile Document all of the variables that are involved in running the smilint target, as well as all of the prerequisites to running it. r312329: Remove ad hoc smilint targets made standard in bsd.snmpmod.mk in r312328 r312330: Add smilint target to subdir targets so "make smilint" here will run the smilint target in subdirs While here, convert a path that's .CURDIR relative to SRCTOP
* MFC r311469:ngie2017-02-041-3/+8
| | | | | Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into ypserv.
* MFC r311472:ngie2017-02-042-4/+10
| | | | | Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into amd(8).
* MFC r311470:ngie2017-02-041-4/+10
| | | | | Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of always building support into rpcbind.
* MFC r312105,r312162:ngie2017-02-042-2/+16
| | | | | | | | | | | | | | | | | | | | | r312105: Conditionalize libwrap support into inetd based on MK_TCP_WRAPPERS This will allow inetd to stand by itself without libwrap. Relnotes: yes r312162: Fix up r312105 - Only #include tcpd.h when LIBWRAP is true to avoid header include errors - Only define whichaf when LIBWRAP is true to avoid -Wunused warning and to avoid issues with structs being defined that should only be defined when tcpd.h is included. Pointyhat to: ngie
* MFC r311160, r311210, r311288, r311292, r311298, r311340asomers2017-02-021-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r311160: misc minor fixes in mpr(4) sys/dev/mpr/mpr_sas.c * Fix a potential null pointer dereference (CID 1305731) * Check for overrun of the ccb_scsiio.cdb_io.cdb_bytes buffer (CID 1211934) sys/dev/mpr/mpr_sas_lsi.c * Nullify a dangling pointer in mprsas_get_sata_identify * Fix a memory leak in mprsas_SSU_to_SATA_devices (CID 1211935) Reported by: Coverity (partially) CID: 1305731 1211934 1211935 Reviewed by: slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8880 r311210: Quell Coverity for diskinfo(8) * CID 1198994: Don't run the speed disk on a disk with no sectors * CID 1011442: Don't call close(2) if open(2) fails * CID 1011161: Use snprintf instead of sprintf * CID 1009825: Check the return value of lseek Reported by: Coverity CID: 1198994 1011442 1011161 1009825 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311288: Delete dead code in chat(8) It's always been dead, ever since first import in 1994. It's still dead in OpenBSD's version, too. Reported by: Coverity CID: 270586 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311292: Remove dead code in rpc_parse.c It's been dead ever since it was imported from TI-RPC in 1995. The dead code is still present in Illumos today, but was removed from NetBSD in 2006. Reported by: Coverity CID: 270097 Obtained from: NetBSD MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311298: Remove dead code in dhclient(8) The offending code has been dead ever since the import from OpenBSD in r195805. OpenBSD later deleted that entire function. Reported by: Coverity CID: 500059 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311340: Misc Coverity fixes for tail(1) CID 1006402: Initialize stack variable CID 271580: Don't leak memory when ENOMEM. Reported by: Coverity CID: 271580 1006402 MFC after: 4 weeks Sponsored by: Spectra Logic Corp
* MFC r312009:ngie2017-01-161-3/+29
| | | | | | Add license preamble for r286964; credit to asomers While here, clean up trailing whitespace
* MFC r311740:ngie2017-01-162-4/+6
| | | | | | | | Improve the smilint target in the hostres and mibII modules - Mark the smilint target .PHONY so it's always executed when requested - Leverage .PATH for BMIBS instead of spelling the path out longhand for them
* MFC r311758:ngie2017-01-161-1/+3
| | | | | | | Add a REVISION section to track changes for the BEGEMOT-ATM-FREEBSD-MIB MIB file There haven't been any changes to the MIB definition, so the REVISION remains static at the version it was imported at
* MFC r311741,r311761:ngie2017-01-162-0/+16
| | | | | | | | | | | | | | | | | r311741: Add a REVISION section to track changes for the hostres module There haven't been any changes to the MIB definition, so the REVISION remains static at the version it was imported at r311761: Add a REVISION section to track changes for the BEGEMOT-NETGRAPH MIB file This change also documents the modification harti made to a handful of objects in r122758 (the max OCTET STRING width was increased from 15 to 31 octets)
* MFC r311739:ngie2017-01-137-8/+8
| | | | | | Use SRCTOP instead of spelling out the full path with .CURDIR This helps condense the output for CFLAGS and .PATH
* MFC r310892,r310894,r310989:ngie2017-01-131-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r310892: Don't call snmp_pdu_free(..) until finished with the pdu and when ready to allocate a new one via snmp_pdu_create(..) This fixes bsnmpwalk, so it no longer crashes after r310729 r310894: snmp_pdu_free the right object at the right time in snmptool_walk r310892 was on the right track, but unfortunately it was resolving the problem incorrectly and accidentally leaking memory in the process. - Call snmp_pdu_free on req before calling snmp_pdu_create on it at the bottom of the outer while loop - Call snmp_pdu_free on resp after calling snmpwalk_nextpdu_create in the inner loop r310989: Call snmp_pdu_free on req/resp with a consistent, correct pattern - snmp_pdu_free should be called before snmp_pdu_create is called again - snmp_pdu_free should be called on the resp to snmp_dialog when successful Tested with the following bsnmp commands: % export SNMPUSER=bsnmp SNMPPASSWD=bsnmptest % SNMP_ARGS="-A proto=sha -C context='' -K -P proto=des -v 3 -r 0" % bsnmpset $SNMP_ARGS sysLocation="MyAgent" % bsnmpget $SNMP_ARGS sysLocation % bsnmpwalk $SNMP_ARGS
* MFC r311290,r311293,r311294:ngie2017-01-131-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | r311290: Use strlcpy instead of strcpy when copying the bridge name to ifr.ifr_name to avoid buffer overflows CID: 1006735, 1006737, 1006738 r311293: bridge_do_pfctl: allocate mib_name dynamically using asprintf This is being done to reduce wasted space, simplify complexity in the code, and to quell a Coverity warning about buffer overruns. warning about buffer overruns. CID: 1006736 r311294: style cleanup - bridge_pf_dump: use nitems instead of spelling it out longhand - bridge_do_pfctl: sort variables by alignment for type
* MFC r311709:ngie2017-01-131-6/+6
| | | | | | | Style(9) fixes - Sort sys/ #includes - Use nitems instead of hardcoding the length of `mib`
* MFC r311711,r311712,r311713:ngie2017-01-131-53/+49
| | | | | | | | | | | | | | r311711: Clean up trailing whitespace r311712: Sort #includes r311713: Use nitems(mib) instead of hardcoding mib's length
* MFC r310633: Add MAX_LUNS overflow safety checks.mav2017-01-101-0/+10
| | | | | While this MAX_LUNS limitation is too synthetic and should be removed, it is better to enforce it while it is here.
* MFC r310614: Don't assign rtjp twice.delphij2017-01-091-2/+1
|
* MFC r310611:delphij2017-01-091-3/+1
| | | | | | - pstat(8) does not accept any arguments other than getopt() args, so don't bother to adjust argc/argv after getopt() loop. - Make a string pointer constant.
* MFC r311393:ngie2017-01-091-2/+2
| | | | | OS_getSystemUptime: use nitems for calculating the number of elements in a sysctl mib instead of hardcoding the number 2
* MFC r311291:ngie2017-01-071-2/+2
| | | | bridge_get_pfval: use nitems instead of spelling it out longhand
* MFC r310497:ngie2017-01-073-42/+36
| | | | | | | | Warning message cleanup - Use warn instead of warnx + strerror(errno) - Remove unnecessary trailing newline from a warnx call - Add missing spaces following "," in syslog and warn* calls
* MFC r310954,r310987,r311222:ngie2017-01-072-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r310954: Set value->v.octetstring.len to a correct value on malloc success/failure The previous code always set value->v.octetstring.len to len, regardless of the result from the malloc call. This misleads the caller on malloc failure. Set .len to len on success and 0 on failure. CID: 1007590 r310987: snmp_output_err_resp, snmp_output_resp: allocate `object` using calloc, not on the stack Some of the callers try to determine whether or not `object` is valid by testing the value for NULL, which will never be true if it's a stack value, so in order to be clear and correct down the call stack, use a heap allocated object. This also addresses a Coverity issue by initializing all of `object` via calloc CID: 1006392 r311222: Fix logical inversion when checking result from calloc in snmp_output_err_resp(..) CID: 1368195
* MFstable/11 r311465:ngie2017-01-061-4/+3
| | | | | | | | | MFC r311175: Swap parameters around with parse_syntax_strval(..) for consistency with other parse_* APIs in bsnmp* Noted by: bz
* MFC r310356: Add support for locally assigned RFC 4122 UUID LUN identifiers.mav2017-01-051-2/+5
|
* MFC r311005cy2017-01-041-1/+1
| | | | Fix up grammar.
* MFstable/11 r311215:ngie2017-01-041-3/+8
| | | | | | | | | | MFC r310711: Don't explicitly build tcp wrappers support into bsnmpd; make it conditional on MK_TCP_WRAPPERS != "no" This likely fixes an issue seen where some of the USE_TCPWRAPPERS code didn't work as advertised
* MFstable/11 r311212:ngie2017-01-041-1/+4
| | | | | | MFC r310665: Only build/install usr.sbin/bsnmpd/modules/snmp_hast if MK_HAST != no
* MFstable/11 r311209:ngie2017-01-041-1/+4
| | | | | | MFC r310664: Only build/install usr.sbin/bsnmpd/modules/snmp_wlan if MK_WIRELESS != no
* MFstable/11 r311152:ngie2017-01-031-2/+2
| | | | | | MFC r310986: snmp_output_resp: style(9): sort variables by alignment
* MFstable/11 r310896:ngie2016-12-311-0/+99
| | | | | | MFC r310654: Install snmpmod.3 as all of the bsnmpd APIs it documents
* MFstable/11 r310902:ngie2016-12-311-8/+8
| | | | | | MFC r310669: style(9): clean up whitespace
* MFstable/11 r310911:ngie2016-12-311-0/+1
| | | | | | MFC r310668: style(9) fixes: clean up leading whitespace
* MFstable/11 r310905:ngie2016-12-311-1/+1
| | | | | | MFC r310667: style(9) fixes: clean up leading whitespace
* MFstable/11 r310901:ngie2016-12-3124-70/+70
| | | | | | MFC r310648: style(9): clean up trailing whitespace
* MFstable/11 r310899:ngie2016-12-317-20/+23
| | | | | | | | | | | | | | | | | | MFC r310666,r310675: r310666: style(9) fixes - Clean up trailing whitespace - Fix variable type alignment in storage_OS_get_swap(..) r310675: Fix the build by moving the initializers for len/nswapdev down below the declarations Pointyhat to: ngie
* MFC 308664,308742,308743sephe2016-12-296-3/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 308664 hyperv/vss: Add driver and tools for VSS VSS stands for "Volume Shadow Copy Service". Unlike virtual machine snapshot, it only takes snapshot for the virtual disks, so both filesystem and applications have to aware of it, and cooperate the whole VSS process. This driver exposes two device files to the userland: /dev/hv_fsvss_dev Normally userland programs should _not_ mess with this device file. It is currently used by the hv_vss_daemon(8), which freezes and thaws the filesystem. NOTE: currently only UFS is supported, if the system mounts _any_ other filesystems, the hv_vss_daemon(8) will veto the VSS process. If hv_vss_daemon(8) was disabled, then this device file must be opened, and proper ioctls must be issued to keep the VSS working. /dev/hv_appvss_dev Userland application can opened this device file to receive the VSS freeze notification, hold the VSS for a while (mainly to flush application data to filesystem), release the VSS process, and receive the VSS thaw notification i.e. applications can run again. The VSS will still work, even if this device file is not opened. However, only filesystem consistency is promised, if this device file is not opened or is not operated properly. hv_vss_daemon(8) is started by devd(8) by default. It can be disabled by editting /etc/devd/hyperv.conf. Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: kib, mckusick Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8224 308742 hyperv/vss: Nuke unused variables. Submitted by: markj Reported by: markj Sponsored by: Microsoft 308743 hyperv/vss: Install the userland daemon to /usr/sbin instead of / Submitted by: markj Reported by: markj Sponsored by: Microsoft
* MFstable/11 r310563:ngie2016-12-261-3/+6
| | | | | | | | | MFC r310196: Fix some minor typos with begemotBridgeTpLearnedEntryDiscards and begemotBridgeTpMaxAddresses Bump LAST-UPDATED for the MIB, per the change
* MFstable/11 r310561:ngie2016-12-261-3/+3
| | | | | | | | | MFC r310203: Clean up parse_ip(..) - Clean up trailing whitespace - Fix variable alignment
* MFC r308493, r308619: Update amd from am-utils 6.1.5 to 6.2.cy2016-12-233-38/+321
| | | | | | | | | | Used extensively on my network over the past ten weeks. Reviewed by: pfg, brooks Suggested by: pfg Obtained from: ftp://ftp.am-utils.org/pub/am-utils/ Relnotes: yes Differential Revision: D8405
* MFC r308806asomers2016-12-163-0/+3
| | | | | | | | | | Speed up pw operations that edit /etc/group or /etc/passwd r285050 fixed a bug in pw that could lead to /etc/passwd or /etc/group corruption on power loss. However, it fixed it by opening those files with O_SYNC, which is very slow, especially on ZFS. This change replaces O_SYNC with appropriately placed fsync()s instead, which is much faster. Using a ZFS tmpdir, the time to run pw's kyua tests drops from 245s to 35s.
* MFC r307402: Guard against bad service name argument(s) to load_rc_config()dteske2016-12-121-1/+3
|
* MFC r309803:bapt2016-12-121-1/+1
| | | | | | | Fix pw groupshow <gid> PR: 204676 Submitted by: longwitz@incore.de
OpenPOWER on IntegriCloud