| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Imported from: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209368
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r314659:
usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible
This simplifies make logic/output
r314676:
Fix build after r314656
Some of the changes I introduced to use .ALLSRC were correct in spirit,
but incorrect in reality -- in particular, ../Makefile.inc hadn't been
pulled in via bsd.init.mk (via bsd.lib.mk, bsd.prog.mk), so the value
of .ALLSRC (evaluated immediately) was empty. .include bsd.init.mk
explicitly so we can be certain that the values used as dependencies in
the targets are defined when the target recipe has been evaluated.
Reminder: thou shalt separate out separate functional changes before
committing them.
(YUGE) Pointyhat to: ngie
In collaboration with: bdrewery
|
|
|
|
|
|
| |
This is a direct commit since MFCing these changes is impractical.
Sponsored by: Dell EMC Isilon
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r314987:
Use nitems() from sys/param.h.
Reviewed by: asomers
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9944
r314988:
Use nitems() from sys/param.h.
Reviewed by: ume
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9938
r314989:
Use nitems() from sys/param.h and also remove the cast.
Reviewed by: markj
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9937
r314993:
Use nitems() from sys/param.h.
Reviewed by: ngie
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9936
r314994:
Use nitems() from sys/param.h.
Reviewed by: ngie
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9940
r315046:
Use nitems() from sys/param.h
Reviewed by: jhb
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9941
r315047:
Use nitems() from sys/param.h.
Reviewed by: np
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9945
r315048:
Use nitems() from sys/param.h.
MFC after: 3 weeks.
r315049:
Bring back the cast removed in my previous commit to allow us build vmstat
with WARNS 2. This cast was first introduced at r87690.
Reported by: bde, pfg and ngie
MFC after: 3 weeks.
r315102:
Use nitems() from sys/param.h.
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D9943
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make /usr/lib/libbsnmptools.so.0 into an INTERRNALLIB
Although it increases the size of the bsnmp{get,set,walk} binaries by
four on my [amd64] system, it removes the need for producing .debug
files, profiled libraries, and for installing the library itself,
reducing the overall size use on disk by the utilities noted
previously.
Plus, it guards against ABI/API compatibility issues with the library
as it's only used internal to the tools themselves.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
Use SRCTOP instead of spelling out the full path with .CURDIR
This helps condense the output for CFLAGS and .PATH
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
OS_getSystemUptime: use nitems for calculating the number of elements
in a sysctl mib instead of hardcoding the number 2
|
|
|
|
| |
bridge_get_pfval: use nitems instead of spelling it out longhand
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Swap parameters around with parse_syntax_strval(..) for consistency with
other parse_* APIs in bsnmp*
Noted by: bz
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Only build/install usr.sbin/bsnmpd/modules/snmp_hast if MK_HAST != no
|
|
|
|
| |
Only build/install usr.sbin/bsnmpd/modules/snmp_wlan if MK_WIRELESS != no
|
|
|
|
| |
snmp_output_resp: style(9): sort variables by alignment
|
|
|
|
| |
style(9) fixes: clean up leading whitespace
|
|
|
|
| |
style(9) fixes: clean up leading whitespace
|
|
|
|
| |
style(9): clean up whitespace
|
|
|
|
| |
style(9): clean up trailing whitespace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Install snmpmod.3 as all of the bsnmpd APIs it documents
|
|
|
|
|
|
|
| |
Fix some minor typos with begemotBridgeTpLearnedEntryDiscards and
begemotBridgeTpMaxAddresses
Bump LAST-UPDATED for the MIB, per the change
|
|
|
|
|
|
|
| |
Clean up parse_ip(..)
- Clean up trailing whitespace
- Fix variable alignment
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When MAKEOBJDIRPREFIX points to a case-insensitive file system, the
build can break when different source files create the same object
files (case-insensitivity speaking). This is the case for object
files compiled with -fpic and shared libraries. The former uses
an extension of ".So", and the latter an extension ".so". Rename
shared object files from *.So to *.pico to match what NetBSD does.
Also:
o Compile _Exit.c as C99_Exit.c, as it conflicts with _exit.s
o Add entry to UPDATING
o Document .pico extension
|
|
|
|
|
|
|
|
|
| |
The first file in these lists will generate everything else so only
it should be getting a .meta file. With bmake's missing=yes meta
feature these would otherwise cause a rebuild without the
.NOMETA hint.
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
| |
The CMSG_ family of macros take care of alignment, so we don't need r299830
at all, even if it was correct. Put NO_WCAST_ALIGN into Makefile.
Together with: peter
|
|
|
|
|
|
|
|
| |
This now compiles cleanly on all architectures
MFC after: 1 month
Tested with: clang 3.8, gcc 4.2.1, gcc 4.5, make tinderbox
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
| |
This compiles with clang without warnings
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
| |
Fix error messages on failure for calloc/strdup
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
| |
It should be calloc/strdup, not malloc
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
| |
This will cure some -Wformat warnings
MFC after: 1 week
Reported by: clang, gcc
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
| |
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to r299802, it was noted that using nitems on scalar pointers is
invalid.
Use strdup instead of malloc + strlcpy (which is what the old code was doing
anyhow).
MFC after: 1 week
Pointyhat to: ngie
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nitems was wrong too, as it was being tested against a pointer instead of a buffer on
the stack.
Since the old code was just doing malloc, then strlcpy'ing the contents of the source
buffer into the destination buffer, replace it all with a call to strdup..
Reported by: bde
MFC after: 1 week
X-MFC with: r299764, r299770
Supersized Duncecap to: ngie
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
| |
get_token(..) returns int32_t, not enum tok, and in many cases tests for items
not in enum tok (e.g. '('). Make the typing consistent with get_token, which
includes a domino effect of changing enum tok to int32_t.
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Save errno
- Set errno to 0
- Call strtoul
- Test errno (optional, but many calls to strtoul did this afterwards)
Some of the code was setting errno = 0 after calling strtoul, not setting
errno = 0, or setting errno to saved_errno after the call, but before the
test. These all have unwanted behavioral side-effects, depending on the
initial value of errno and whether or not the input to strtoul was correct
or incorrect.
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
| |
How errno is saved before and restored after strtoul calls needs a rethink
MFC after: 1 week
Reported by: gcc 5.x
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
| |
I meant to use nitems, not sizeof(..) with the destination buffer. Using sizeof(..)
on a pointer will always truncate the output in the destination buffer incorrectly
Pointyhat to: ngie
MFC after: 1 week
X-MFC with: r299764
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
| |
in order
to mute a -Wstrlcpy-strlcat-size warning
MFC after: 1 week
Reported by: clang
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
| |
rc cannot be negative -- that was already tested for earlier on in
the function
MFC after: 1 week
Reported by: clang, gcc
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
| |
parse_context, parse_user_security: test for validity of results from
parse_ascii(..) with by casting to int32_t and comparing to -1; comparing
unsigned types to negative values will always be false.
Reported by: clang, Coverity
CID: 1011432, 1011433
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
|
| |
Increase the size of `string` by 1 to account for the '\0' terminator. In the event
that `str` doesn't contain any non-alpha chars, i would be set to MAXSTR, and
the subsequent strlcpy call would overflow by a character.
Remove unnecessary `string[i] = '\0'` -- this is already handled by strlcpy.
MFC after: 1 week
Reported by: clang
Sponsored by: EMC / Isilon Storage Division
|