summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd
AgeCommit message (Collapse)Author
2014-10-25Remove unnecessary netinet/in_systm.h include.Lawrence Teo
ok millert@
2014-10-16use reallocarray(). Looked at a few times by doug, I am sure.Theo de Raadt
2014-10-12Remove possibility of mutiplicative integer overflow by not multiplying.Bret Lambert
Instead of the widespread-but-overflow-prone while (newlen < wanted) { newlen *= 2; } idiom, just realloc() for the space requested by the caller and check for additive overflow. Also change type of 'newlen' variable from int to size_t to avoid overflows there. Pointed out by deraadt@ ok reyk@
2014-10-08obvious reallocarray()Theo de Raadt
2014-08-18Sync proc.c with httpd. httpd needs SIGUSR1 but snmpd will ignore itReyk Floeter
now instead of terminating the process. ok blambert@
2014-07-21Switch from <sys/endian.h> or <machine/endian.h> to the new,Philip Guenther
being-standardized <endian.h> ok deraadt@ millert@ beck@
2014-07-12Sync msgbuf_write() changes from relayd.Reyk Floeter
Please note that proc.c should be kept identical in relayd, iked and snmpd (currently without the includes). ok benno@
2014-07-04Track whether a process is a zombie or not yet fully built via flagsPhilip Guenther
PS_{ZOMBIE,EMBRYO} on the process instead of peeking into the process's thread data. This eliminates the need for the thread-level SDEAD state. Change kvm_getprocs() (both the sysctl() and kvm backends) to report the "most active" scheduler state for the process's threads. tweaks kettenis@ feedback and ok matthew@
2014-06-23The second level of the CTL_NET sysctl is a PF_*, not an AF_*Philip Guenther
inconsistent usage in route(8) noted by Gregor Best (gbe (at) ring0.de)
2014-06-03Handle the event parameter of libevent callback function as a bitYASUOKA Masahiko
mask. Also remove redundant imsg_event_add calls. Fixes come from usr.sbin/ospfd/control.c ok reyk
2014-05-23clean up after the traphandler children, otherwise they will live onSebastian Benoit
as zombies. ok blambert
2014-05-16improve logging messages and style; requested by and ok reykMike Belopuhov
2014-05-14Sync ktable code with bgpd to fetch, store and perform lookups inMike Belopuhov
multiple routing tables. Currently it doesn't do anything useful but it's a prerequisite for any future work in this direction. ok sthen, reyk, blambert
2014-05-08Bring back restricted sockets, inadvertantly removed inBret Lambert
previous proc.c update ok reyk@
2014-05-07use calloc. from peter maloneTed Unangst
2014-05-06no need to include rand.h now the RAND_seed() calls are gone.Jonathan Gray
ok reyk@
2014-05-04With the recent change by deraadt@ to introduce kern.nosuidcoredump=3,Reyk Floeter
we don't need the horrible debug hack anymore that disabled privdrop and chroot to get core dumps of privsep processes. No functional change for the normal binary, only if it is compiled with the non-default -DDEBUG option.
2014-04-28fix memory leakBret Lambert
ok reyk@
2014-04-28Add support for exporting ARP table via ipNetToMediaTable OID.Mike Belopuhov
With help from blambert@ and sthen@, tested by sthen@, benno@ and myself; ok blambert
2014-04-28better proc id name (it handles traps, not alerts) for theBret Lambert
snmp trap handler
2014-04-25sort; ok blambertJason McIntyre
2014-04-25Remove NULL pointer dereference, which jsg insists I notBret Lambert
call a use-after free, from error path. found by and ok jsg@
2014-04-25Support running user-defined actions on receipt of snmp traps.Bret Lambert
testing sthen@ much man page guidance jmc@ ok reyk@
2014-04-24fix copied text in error stringBret Lambert
ok reyk@
2014-04-21Copy the updated proc.c from relayd to use the same file. AdjustReyk Floeter
snmpd accordingly. ok sthen@
2014-04-20Just to be pedantic, fail if strlcpy managed to overflow the socket path.Reyk Floeter
2014-04-20Partially revert the previous: snmp_agentx_ping() didn't leak the pduReyk Floeter
because it is added to a list on the handle and eventually released later with the handle itself. This confuses leak detection tools like clang, so at least add a comment that it is not a leak. ok blambert@
2014-04-20Fix a small leak in the error path.Reyk Floeter
2014-04-18round up some enemy sympathizers found calling RAND_seed().Ted Unangst
ok beck reyk
2014-04-14sundry macro chop;Jason McIntyre
2014-04-14No need to include ber.h here, probably overlooked while importing.andre
ok blambert@
2014-04-14Make snmpd use the AgentX protcol for accepting trap requests.Bret Lambert
AgentX notifications are the only portion implemented right now; get in the tree to flesh out the remainder. ok reyk@ benno@
2014-04-14Fix the following idiom in the following way:Bret Lambert
arc4random_buf(seed, sizeof(seed)); RAND_seed(seed, sizeof(seed)); + explicit_bzero(seed, sizeof(seed)); ok reyk@
2014-04-08Use VM_UVMEXP instead of VM_METER for memory usages and directlyMartin Pieuchot
include <sys/vmmeter.h> where it is needed instead of relying on it being included by <uvm/uvm_extern.h>. miod@ likes it, ok guenther@
2014-03-16lint is dead (long live the lint!), so stop using it as a cpp conditionalPhilip Guenther
(namespace pollution!) or talking about its opinion on code. ok krw@
2014-02-14remove unused function that distracts from cleaning up the imsg_flush() messFlorian Obser
OK hennig@, benno@
2014-01-22relax the cfg file secrecy check slightly to allow group readabilityHenning Brauer
default permissions and mtree NOT changed. prodded by benno, ok phessler benno jmatthew theo pelikan florian
2014-01-18Remove -Wbounded: it is now the compiler default.Martynas Venckus
2013-11-26remove "clever" shortcut that might bite later, ok gilles bennoHenning Brauer
2013-11-25use u_char for buffers in yylex, for ctype callsSebastian Benoit
found by millert@, ok deraadt@
2013-11-21split kernel parts of the if.h into a separate header file if_var.hMike Belopuhov
which allows us to modify ifnet structure in a relatively safe way; discussed with deraadt, ok mpi
2013-11-13handle msgbuf_write() returning EAGAINSebastian Benoit
ok reyk
2013-10-30another simple %i to %d conversion for obviousnessTheo de Raadt
2013-10-19Fix receipt of OID varbinds when sending trapsBret Lambert
ok reyk@
2013-10-17Less ambiguous wording concerning control socket configuration options.Bret Lambert
requested by and ok deraadt@
2013-10-17Update snmpd(8) to use the proc.c privsep style from iked and relayd.Reyk Floeter
ok sthen@ deraadt@
2013-10-16some .Pa;Jason McIntyre
2013-10-16no more -r; ok blambertJason McIntyre
2013-10-16 1) move the creation of 'restricted' communication socketsBret Lambert
into snmpd.conf 2) add the ability to specify an alternate 'control' socket location 3) allow for the creation of multiple 'restricted' sockets (but only one control socket, for the time being) Committing slightly ahead of schedule in order to clear the pipeline for a few other upcoming changes. ok reyk@, sthen@
2013-10-02Fix GETBULK mode that got broken with r1.14.Reyk Floeter
ok sthen@