summaryrefslogtreecommitdiff
path: root/usr.sbin/traceroute
AgeCommit message (Collapse)Author
2016-10-21some text cleanup and remove an irrelevant note; ok florianJason McIntyre
2016-10-20some macro fixes for the options list;Jason McIntyre
2016-10-20try to make DESCRIPTION read like it was written for one program, not two;Jason McIntyre
ok florian
2016-09-28Always do the setgroups, setresgid and setresuid even if if theFlorian Obser
unprivileged user is not present instead of erroring out. This lets ping and traceroute work in restricted enviornments like the bgplg chroot. Problem reported by sthen@ input & prodding deraadt@
2016-09-27Drop privileges to newly added _traceroute user/group.Florian Obser
It does not buy us much when called as a unpriv user. But if run as root we can now lose privileges. Input deraadt@ OK benno@, sthen@
2016-09-19Only allow standard dot notation for IPv4 addresses as target.Florian Obser
We can get rid of inet_aton(3) and use the AF independent getaddrinfo(3). OK natano@, krw@, millert@, claudio@
2016-09-03rearrange code: traceroute.c now only contains main() and usage(),Sebastian Benoit
worker.c contains all other functions, and i tracked down which global variables are used in which file and marked them accordingly with static (or not). No functional change, just the basis of further work. ok florian@, deraadt@
2016-03-30for some time now mandoc has not required MLINKS to functionJason McIntyre
correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
2016-02-12pledge for "dns" if -A is passed, even with -n.Sebastien Marie
The -A (Look up the AS number for each hop address) use DNS service. ok jca@ sthen@
2015-11-06"source" doesn't need to be a global. While here, the correct spellingFlorian Obser
is NULL. Noticed while trying to hoist the source address selection from traceroute into ping / ping6.
2015-10-09Change all tame callers to namechange to pledge(2).Theo de Raadt
2015-10-03like ping, traceroute is a setuid root priv-drop which holds a sockraw.Theo de Raadt
we can tame it substantially with "stdio inet", plus "dns" if the -n option is missing. a successful exploit against it then cannot create files, or perform a variety of other operations, as described in the tame(2) man page. florian helped me a fair bit hoisting initization code upwards in ping, ping6, and traceroute, to make tame work here.
2015-09-14Avoid .Ns right after .Pf, it's pointless.Ingo Schwarze
In some cases, do additional cleanup in the immediate vicinity.
2015-08-30warnx(3) has an implicit \n at the end.Florian Obser
pointed out by deraadt@
2015-07-16The return type of memset(3) is void. No need for a cast.Florian Obser
No object change.
2015-03-11port the idea of using clock_gettime(CLOCK_MONOTONIC) for measuringDavid Gwynne
intervals from src/sbin/ping/ping.c r1.115. > use clock_gettime(CLOCK_MONOTONIC) to get timestamps to measure the > interval between sending a ping and getting a reply for it. > > this makes it resistant against local wall clock changes, which can > skew the intervals reported or make them go negative. this version puts clock_getting in a local gettime() function that converts to a struct timeval that all the previous callers of gettimeofday expect to get. requested by deraadt@ florian@
2015-02-11Replace base 10 strtol with strtonum.Florian Obser
OK krw@, tedu@, deraadt@
2015-02-09clean up flags++ instances around getopt()Theo de Raadt
ok florian
2015-01-20HOST_NAME_MAX + 1 is big enough for gethostname(3); this array hasFlorian Obser
been one char too big when it was defined in terms of MAXHOSTNAMELEN. While here, NI_MAXHOST is big enough for getnameinfo(3). OK benno@
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-12-09Use memmove() instead of strlcpy() for an overlapping string copyTodd C. Miller
so we don't rely on undefined behavior. OK deraadt@
2014-10-25Remove unnecessary netinet/in_systm.h include.Lawrence Teo
ok millert@
2014-09-08obvious cases of missing .An;Ingo Schwarze
found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
2014-06-06Update description of optional argument "datalen" to reality.Florian Obser
Issue pointed out by, tweak and "looks ok" jmc@
2014-06-05Reduce code running as root by trying to create all needed socketsFlorian Obser
first, remember which failed, drop privs and then decide which sockets are needed and close the others. Only error out if the creation of a needed socket failed. That is it is non-fatal if tracerouting an INET4 address and the INET6 socket creations failed. prodding deraadt@; OK benno@
2014-06-04datalen is additional data, sync traceroute6 to traceroute. Also "nnFlorian Obser
byte packets" in the first line of traceroute output is the length of the complete IP packet, fix this for traceroute6. OK benno@
2014-06-04Replace ICMP6ECHOLEN define with sizeof()Florian Obser
OK benno@
2014-05-28a void function should not be returning anything.Daniel Dickman
ok florian@
2014-05-01change some argument names in order to give some consistency between tracerouteJason McIntyre
and traceroute6; i also fudged the formatting to allow SYNOPSIS to display a bit nicer, and for usage() to look like SYNOPSIS; ok florian
2014-04-29a bit more merge for traceroute6 stuff, and some consistency fixes;Jason McIntyre
help/ok florian
2014-04-28whitespace cleanup while reading result of florian's recent (very nice) workTheo de Raadt
2014-04-27zap a ton of silly Tn, and uppercase TTL; a few other minor tweaks along theJason McIntyre
way;
2014-04-26Link traceroute6 to traceroute, thus completing the merge.Florian Obser
I was originally sent on this little errand by deraadt@. OK sthen@, benno@ (Committing from a bus somewhere in germany on its way to berlin.)
2014-04-25add traceroute6 to NAME, and knock out some unneeded Bk/Ek;Jason McIntyre
2014-04-25MLINKS traceroute.8 traceroute6.8Florian Obser
"sure" jmc@
2014-04-25Merge traceroute6 man page with traceroute.Florian Obser
"sure" jmc@
2014-04-23Merge traceroute6 into traceroute.Florian Obser
Not yet enabled in the build. OK benno@
2014-04-23KNFFlorian Obser
OK benno@
2014-04-23Prepare merge: check AFFlorian Obser
OK benno@
2014-04-23missing break; not reachableFlorian Obser
OK benno@
2014-04-23No need to set protocol in hints.Florian Obser
OK benno@
2014-04-23zap redundant castFlorian Obser
OK benno@
2014-04-23Introduce check_tos to unclutter the main loop.Florian Obser
OK benno@
2014-04-23move AF independet setsockopts downFlorian Obser
OK benno@
2014-04-23Add error checking to sysctl. While there pass in an int otherwiseFlorian Obser
it failes with ENOMEM in traceroute. OK benno@
2014-04-23Prepare for merge: s/icmp_code/icmp4_code/ and use icmp_code forFlorian Obser
the AF switch. OK benno@
2014-04-23Prepare for merge: s/packet_ok/packet_ok4/ and use packet_okFlorian Obser
for the AF switch.
2014-04-23Prepare merge: introduce struct sockaddr *from, *to to be used inFlorian Obser
AF independet places. OK benno@
2014-04-23Prepare merge: s/to/to4/; s/from/from4/Florian Obser
OK benno@
2014-04-23Make this compile with -Wall et al.Florian Obser
OK benno@