directory entries already in readdir and caches the results instead
of waiting for each individial getattr from the kernel. For
high-latency links the difference in "ls -l" is quite astounding
and even on my lan "ls -lR" is faster than for nfs in a normal
directory hierarchy (i.e. not one artifically setup to have thousands
of files per directory).
TODO: implement some sort of bandwidth/latency measurement in the
code and enable or disable this option based on than information
(and a command-line flag).
by christos@. The comment reads:
# This program is set 0550 because, as security(8) states, it has
# the potential to deplete kernel memory, under certain conditions.
* Sprinkle const.
* Use EXIT_FAILURE instead of 1.
* Use err(), errx().
* Use calloc() instead of malloc()+memset().
* timedc:
* Non-terminated hostnames or unknown tsp_type could
cause a crash due to out-of-bounds reads in msite().
* Check the received packet size.
* Merged duplicated code into functions.
* Moved variables into the relevant scopes.
* Use connect() so that only the receiver can reply,
send()/recv() can be used and rejected packets
are immediately noticed by recv() instead of causing
timeouts.
* Updated manpage.
use of a raw socket for ICMP; thus there is also no need to differ
between privileged and unprivileged commands.
* Switch to user "nobody" after allocating the raw socket.
* Close all file descriptors above 2 (just in case).
* Check the packet size and sender address in daydiff().
* priv_resources(): Use bind() instead of bindresvport() because an
reserved port is not required. This also resolves the interoperability
issue reported in PR bin/35479.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
* Remove a few trailing whitespaces
* Rearrange and join to one #if for some headers
Patch contributed by Slava Semushin <slava.semushin@gmail.com>
in private mail.
internal structures around. (yay for assuming that pointers can be held in
an int. bah.)
Not sure if it actually _works_ on amd64, but as the output on my i386
doesn't change pre/post-patching, that seems good enough for now.