summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r311108:kib2017-01-091-65/+41
| | | | Move common code from kern_statfs() and kern_fstatfs() into a new helper.
* MFC r310615:kib2017-01-091-11/+2
| | | | Change knlist_destroy() to assertion.
* MFC r311055:kib2017-01-091-20/+20
| | | | Remove unneeded externs keywords. Reindent long lines.
* MFC r311640arybchik2017-01-097-10/+41
| | | | | | | | | | sfxge(4): allow DMA descs to cross 4k boundary on EF10 Siena has limitation on maximum byte count and 4k boundary crosssing (which is stricter than maximum byte count). EF10 has limitation on maximum byte count only. Sponsored by: Solarflare Communications, Inc.
* MFC r311639arybchik2017-01-091-1/+3
| | | | | | | | | sfxge(4): treat EFX_LINK_UNKOWN as link down It is safer to consider EFX_LINK_UNKNOWN as link down. link_mode is set to EFX_LINK_UNKNOWN on port stop and fini. Sponsored by: Solarflare Communications, Inc.
* MFC r311638arybchik2017-01-091-2/+1
| | | | | | sfxge(4): use SFXGE_LINK_UP() to report link up state Sponsored by: Solarflare Communications, Inc.
* 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 r310609: Don't use high precision clock for expiration as only seconddelphij2017-01-091-7/+7
| | | | portion is used.
* MFC r310608: Avoid use after free.delphij2017-01-091-4/+6
|
* MFC r311114:ngie2017-01-091-1/+7
| | | | Build libexec/kadmind when MK_GSSAPI != no because it requires gssapi
* MFC r311112,r311115:ngie2017-01-092-3/+15
| | | | | | | | | | | | r311112: libgssapi_{krb5,ntlm,spnego} requires MK_GSSAPI != no; conditionalize their building on the knob r311115: Conditionalize adding ${KRB5DIR}/lib/gssapi/krb5/gkrb5_err.et to ETSRCS if MK_GSSAPI != "no"
* MFC r311505:ngie2017-01-091-1/+1
| | | | Remove unnecessary __unused attribute attached to `ctx` in op_begemot_mibII(..)
* MFC r311384:ngie2017-01-091-1/+1
| | | | op_usm_users: fix indentation in SNMP_OP_SET block
* MFC r311382:ngie2017-01-091-6/+3
| | | | Use calloc instead of malloc + memset(.., 0, ..)
* 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 r310984,r311102:ngie2017-01-091-8/+4
| | | | | | | | | | r310984: Use calloc instead of malloc + memset(.., 0, ..) r311102 (by pfg): Cleanup inelegant calloc(3) introduced in r310984.
* MFC 306564: Expose kernel-only errno values if _WANT_KERNEL_ERRNO is defined.jhb2017-01-092-5/+2
| | | | | | | | | | | The kernel uses a few negative errno values for internal conditions such as requesting a system call restart. Normally these errno values are not exposed to userland. However, kdump needs access to these values as some of then can be present in a ktrace system call return record. Previously kdump was defining _KERNEL to gain access to ehse values, but was then having to manually declare 'errno' (and doing it incorrectly). Now, kdump uses _WANT_KERNEL_ERRNO instead of _KERNEL and uses the system-provided declaration of errno.
* MFC r267546 (by alc):kib2017-01-081-77/+59
| | | | | | | | | | | | | | | | | | | | | | | | Tidy up the early parts of vm_map_insert(). MFC r267645 (by alc): When MAP_STACK_GROWS_{DOWN,UP} are passed to vm_map_insert() set the corresponding flag(s) in the new map entry. Pass MAP_STACK_GROWS_DOWN to vm_map_insert() from vm_map_growstack() when extending the stack in the downward direction. MFC r267850 (by alc): Place the check that blocks map entry coalescing on stack entries in vm_map_simplify_entry(). MFC r267917 (by alc): Delay the call to crhold() in vm_map_insert() until we know that we won't have to undo it by calling crfree(). Eliminate an unnecessary variable from vm_map_insert(). MFC r311014: Style fixes for vm_map_insert(). Tested by: pho
* MFC r311446: Fix bootverbose affecting code logic in r294558.mav2017-01-081-2/+3
| | | | Reported by: Jilles Tjoelker <jilles@stack.nl>
* MFC 306563: Decode arguments to truncate and ftruncate.jhb2017-01-071-0/+6
| | | | | In particular, decode the off_t argument as a 64-bit argument to fix decoding for 32-bit processes.
* MFC r310982:kib2017-01-071-36/+22
| | | | Ansify vm/vm_pager.c. Style.
* MFC r310925:kib2017-01-071-1/+0
| | | | Remove unused declaration.
* MFC r311245:ngie2017-01-071-0/+3
| | | | | | tty: don't leak s after opening it with openpty CID: 978321
* MFC r311247:ngie2017-01-071-0/+3
| | | | | | mkfifoat_fd: close dfd after use to avoid leaking it CID: 978286
* MFC r311248:ngie2017-01-071-0/+3
| | | | | | mknodat_fd: close dfd after use to avoid leaking it CID: 978287
* MFC r311235:ngie2017-01-071-0/+3
| | | | | | ttyname_err: close fd if it was opened successfully CID: 978292
* MFC r311240:ngie2017-01-071-0/+3
| | | | | | | | kqueue_desc_passing: initialize m.msg_flags to 0 This mutes an uninitialized scalar warning from Coverity CID: 979620
* MFC r311273:ngie2017-01-071-0/+3
| | | | | | setrlimit_basic: don't leak buf; free it on completion CID: 978311
* MFC r311228:ngie2017-01-071-0/+3
| | | | | | ftok_link: don't leak fd CID: 978291
* MFC r311250:ngie2017-01-071-0/+3
| | | | | | mincore_resid: free buf after use CID: 978304
* MFC r311271:ngie2017-01-071-0/+3
| | | | | | stat_symlink: don't leak fd; close the file descriptor when done CID: 978314
* MFC r311269:ngie2017-01-071-0/+12
| | | | | | | | swapcontext1: test for getcontext(3) and swapcontext(3) success properly The beforementioned libcalls both succeed if the return codes aren't -1 CID: 976790, 976791
* MFC r311249:ngie2017-01-072-1/+22
| | | | | | {strchr,strlen}_basic: don't leak the dlopen'ed handle; close after use CID: 978299, 978300
* MFC r311272:ngie2017-01-071-0/+3
| | | | | | | | | revoke_perm: don't leak fd at the end of the test; close it This code is unused on FreeBSD, but it mutes a valid Coverity warning which would be true on NetBSD CID: 978311
* MFC r311246:ngie2017-01-071-0/+3
| | | | | | fexecve: don't leak fd on fexecve(2) failure; close before calling err CID: 978285
* MFC r311270:ngie2017-01-071-0/+3
| | | | | | pipe_restart: free f on function exit to quell complaint from Coverity CID: 978307
* MFC r311291:ngie2017-01-071-2/+2
| | | | bridge_get_pfval: use nitems instead of spelling it out longhand
* MFC r310501:ngie2017-01-071-18/+7
| | | | | | | | | | | | Be more strict about IpAddress type in snmp_value_parse(..) - Use inet_pton with AF_INET instead of doing longhand with sscanf. - Use gethostbyname2 with AF_INET to ensure that the hostname isn't accidentally parsed with another address family, e.g. AF_INET6. NB: IpAddress per RFC-2578 is IPv4 only. Work is in progress to add the InetAddress type and friends documented in RFC-4001 and elsewhere (which supports IPv4, IPv6, and more).
* MFC r310952:ngie2017-01-071-3/+3
| | | | | | | | | | | MIB-II: use strlcpy instead of strcpy when copying {descr,name} This is of course to avoid buffer overruns The remaining strcpy instance in the module needs to be audited for correctness CID: 1006827, 1006828
* MFC r310957,r310958,r310960:ngie2017-01-073-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | r310957: Use strlcpy when copying `com` to pdu->community to avoid potential buffer overruns CID: 1006823, 1006824 r310958: Initialize ret to SNMPD_INPUT_OK at the top of snmp_input_start(..) to avoid returning an uninitialized value There are some really complicated, snakey if-statements combined with switch statements that could result in an invalid value being returned as `ret` CID: 1006551 r310960: Similar to r310954, set .len to 0 on malloc failure and to `len` only on success
* 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 r310931,r310942,r310988:ngie2017-01-071-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | r310931: Use strdup in snmp_parse_server(..) when possible instead of malloc+strcpy This simplifies the code and mutes a Coverity warning about sc->cport being improperly allocated CID: 1018247 r310942: Unbreak the build by passing the string to strdup, not its length Pointyhat to: ngie r310988: snmp_discover_engine: fix up req/resp (PDU object) handling a bit - Call snmp_pdu_free on req and resp when done with the objects - Call snmp_pdu_free on req before calling snmp_pdu_create on it again
* 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
* MFC r311242:ngie2017-01-071-0/+3
| | | | | | listen_low_port: check for errors from socket(2) before continuing CID: 976778
* MFC r311239:ngie2017-01-071-0/+3
| | | | | | umask_open: don't leak fd on success CID: 978315
* Regenerate src.conf(5)ngie2017-01-061-14/+6
|
* MFstable/11 r311551:ngie2017-01-061-0/+2
| | | | | | MFC r311136: Add WITH_SSP to silence complaints from mkman about there not being a file
* MFC 306562: Handle 64-bit system call arguments (off_t, id_t).jhb2017-01-061-7/+37
| | | | | | | | | | | | In particular, 64-bit system call arguments use up two register_t arguments for 32-bit processes. They must also be aligned on a 64-bit boundary on 32-bit powerpc processes. This fixes the decoding of lseek(), procctl(), and wait6() arguments for 32-bit processes (both native and via freebsd32). Note that the ktrace system call return record only returns a single register, so the return value of lseek is always truncated to the low 32-bits for 32-bit processes.
* MFC r310821:kib2017-01-061-16/+22
| | | | Style.
OpenPOWER on IntegriCloud