Turn off error messages from locate(1), we can't do very much about
its database not being ok anyway at this time.
Closes PR # bin/2183: whereis returns environ...
matches what's in ypserv/yp_extern.h (which I changed when I added the
async DNS stuff). The conflict broke the build of rpc.yppasswdd.
Pointed out by: bde
- A major 11th hour, last second, untested commit!
Build some infrastructure to clean up the compat lib distributions, and
also allow them to be installed from the source tree rather than having
to to and get the tarballs from freefall or a CD. Some tweaks to
/etc/make.conf are in the pipeline to enable it.
This came about because it became apparent that we'd have to change the
compat21.tgz tarball to fix the NIS problem with 2.1.x binaries. Since
it's tar..gz.uu, doing this would have caused a huge repository change
and we may as well try and fix it once and for all. Now, adding/removing
libraries should have MUCH less repository impact.
Peril sensative sunglasses: on!
Flame proof suit: on!
Concept reviewed by a stream of ascii representing the opinion of: jkh
Changes casually reviewed by: jkh (but not actually tested)
Add a little more sophistication to the md5 grep command.
Change the md5 checksum logic a bit. Now, the message is printed
out for every successfully/unsuccessfully matched checksum, and it
aborts at the end if there was a mismatch. Also, make missing checksum
and IGNORE file inconsistency fatal, as there is now no reason to have
a missing checksum.
Closes PR # kern/1065.
While i was at it, also reject IO requests that are not an integer
multiple of the device blocksize.
Submitted by: vak@crox.net.kiae.su (Serge V.Vakulenko)
Confirmed by: Georg-W. Koltermann (gwk@cray.com)
workings of #error in particular. He also broke the 2.2 build with this
change, leading me to wonder whether or not the changes were ever even
tested. Folks, I'm happy to see people work directly on 2.2 like
this and will continue to encourage Nate to make direct commits, but
please TEST before committing! I think that's a more than reasonable
prerequisite, and this code could never have worked at all, leading me to
believe that Nate skipped this most basic of steps.
- yp_dblookup.c: Create non-DB specific database access functions.
Using these allows access to the underlying database functions without
needing explicit knowledge of Berkeley DB. (These are used only
when DB_CACHE is #defined. Other programs that use the non-caching
functions (yp_mkdb, ypxfr, yppush, rpc.yppasswdd) shouldn't notice
the difference.)
- yp_dnslookup: Implement async DNS lookups. We send our own DNS
requests using UDP and put the request in a queue. When the response
arrives, we use the ID in the header to find the corresponsing queue
entry and then send the response to the client. We can go about our
business and handle other YP requests in the meantime. This way, we
can deal with time consuming DNS requests without blocking and without
forking.
- yp_server.c: Convert to using new non-DB-specific database access
functions. This simplifies the code a bit and removes the need for
this module to know anything about Berkeley DB. Also convert the
ypproc_match_2_svc() function to use the async DNS lookup routines.
- yp_main.c: tweak yp_svc_run() to add the resolver socket to the
set of descriptors monitored in the select() loop. Also add a
timeout to select(); we may get stale DNS requests stuck in the
queue which we want to invalidate after a while. If the timeout
hits, we decrement the ttl on all pending DNS requests and nuke
those requests that aren't handled before ttl hits zero.
- yp_extern.h: Add prototypes for new stuff.
- yp_svc_udp.c (new file): The async resolver code needs to be able
to rummage around inside the RPC UDP transport handle in order to
work correcty. There's basically one transport handle, and each time
a request comes in, the transaction ID in the handle is changed.
This means that if we queue a DNS request, then we handle some other
unrelated requests, we will be unable to send the DNS response because
the transaction ID and remote address of the client that made the DNS
request will have been lost. What we need to do is save the client
address and transaction ID in the queue entry for the DNS request,
then put the transaction ID and address back in the transport handle
when we're ready to reply. (And then we have to undo the change so
as not to confuse any other part of the server.) The trouble is that
the transaction ID is hidden in an opaque part of the transport handle,
and only the code in the svc_udp module in the RPC library knows how
to handle it. This file contains a couple of functions that let us
read and set the transaction ID in spite of this. This is really a
dirty trick and I should be taken out and shot for even thinking about
it, but there's no other way to get this stuff to work.
- Makefile: add yp_svc_udp.c to SRCS.
connecting to a host immediately in the foreground.
I would like to be able to run ppp from a script so that my script can be
sure that it is connected to the 'net before it continues running:
# Dial up the internet.
ppp -background myprovider || exit 1
do-some-net-command
# Hang up the modem.
kill -HUP `cat /var/run/ppp.tun0.pid`
Another problem is that the current ppp calls its process id file
`/var/run/PPP.server', which may conflict if you have more than one IP
tunnel interface available.
Closes PR#1469
Submitted by: Gord Matzigkeit <gord@enci.ucalgary.ca>