peter [Thu, 28 May 1998 13:20:35 +0000 (13:20 +0000)]
Only pre-build the "default" libcrypt, since it gets to set the symlinks
for the rest of the build. I'm not certain, but I think this determines
which crypt() goes into /sbin/init. This change shouldn't hurt anyway. :-)
peter [Thu, 28 May 1998 12:31:42 +0000 (12:31 +0000)]
Urgent fix for bootstrap target. If the old symlinks are pointing to the
real source tree, the bootstrap target would attempt have cpio copy the
files over themselves, unlinking them first. I think this only happened
with make -DNOCLEAN world at the transition between a symlinked
objdir/tmp/usr/include/{sys,net,..} and real files.
julian [Thu, 28 May 1998 07:31:30 +0000 (07:31 +0000)]
Use AF_LINK rather than AF_UNSPEC to set an ethernet multicast address.
This is obviously not a terribly used function as it's apparently been
broken forever.
It IS possible that this fix is wrong and that the KERNEL is wrong
(in which case you should fix if_ethersubr.c) either way it certainly has more hope of
working now than before. I'd take it to 2.2 except that obviously no-one cares :-)
peter [Thu, 28 May 1998 06:59:50 +0000 (06:59 +0000)]
Grumble Grumble.. so this is how src/sys/ufs/lfs kept coming back... The
mtree in make world was following symlinks and creating directories in the
source tree and causing cvs to break (since CVS/Entries was missing).
peter [Wed, 27 May 1998 18:50:01 +0000 (18:50 +0000)]
Replace the partial symlink tree to src/sys/* in $OBJDIR/tmp/usr/include
with real copies. I'm sick of !@#&!^!@#*& mtree chowning directories in
my src/sys/* tree after it follows the symlinks. I still believe that
mtree is broken for doing this (introduced in mtree.c rev 1.5).
peter [Wed, 27 May 1998 18:42:36 +0000 (18:42 +0000)]
If building and installing libdescrypt, do it first so that the symlinks
point to it rather than libscrypt.
This was how it was done prior to libscrypt being added in. This should
stop more people getting burnt with the /usr/lib -> /usr/lib/aout
transition, and the same when the ELF libs come online.
peter [Wed, 27 May 1998 16:55:49 +0000 (16:55 +0000)]
If we are logging into a cvs pserver with the username of "anoncvs",
and we have not done an explicit 'cvs login', then use a default password
of "anoncvs". This allows things like:
setenv CVSROOT :pserver:anoncvs@anoncvs.freebsd.org:/cvs
cvs checkout src (without doing the normal 'cvs login' for pserver mode)
but this runs over the :pserver: protocol rather than the more troublesome
rsh. Naturally, the server had better be running in -R (readonly) mode :-)
peter [Wed, 27 May 1998 16:33:43 +0000 (16:33 +0000)]
On the other hand, when /usr/bin/as is really a link to objformat, it's not
helpful to stop it running /usr/libexec/aout/as for real while bootstrapping.
Only force a strict path when we really have built all the tools in
$OBJDIR/tmp/usr/libexec/*.
peter [Wed, 27 May 1998 16:27:18 +0000 (16:27 +0000)]
Make cvs really ignore a pserver password when the passwd field of the
CVSROOT/passwd file is empty. A 'cvs login' still seems to be required
since the cvs client doesn't seem to believe it's possible to not need
a password (yet :-). This is intended for cheap anoncvs use.
peter [Wed, 27 May 1998 15:40:35 +0000 (15:40 +0000)]
Move objformat after binutils, otherwise we get chicken/egg problems when
building ELF. It may be that binutils and objformat need to both be moved
earlier in the list though, but that can wait till the dust settles.
peter [Wed, 27 May 1998 15:26:12 +0000 (15:26 +0000)]
Add a new long flag that causes cvs to ignore the CVSROOT/passwd file.
This is mostly intended for use on freefall where we'd like to provide
a passwd file for easy anoncvs mirroring access, but don't want to open
up the pserver on freefall itself.
While here, some initial tweaks intended for allowing an empty pserver
password. I'm not sure that this works yet.
peter [Wed, 27 May 1998 15:19:23 +0000 (15:19 +0000)]
Remove my hacks for capturing stdout/stderr through the protocol channel
while calling libdiff. It's too ugly and not worth the recursion problems
when there is a malloc failure (which writes to stderr - now diverted via
the buf system, which calls malloc, which causes another error message etc).
We can live with the standard artificial slowdown, but reduce the time a
bit and only delay when we really need to (ie: when running as a server).
The usleep time could probably use some tuning, it basically needs to
replace the time that it used to take to fork a large process, exec gnudiff
and the time that gnudiff took before writing the initial output.
This eliminates a whole mess of other hacks I was considering that changed
use of xmalloc to alloca() etc. It was going too fast in the wrong
direction.
phk [Wed, 27 May 1998 09:25:22 +0000 (09:25 +0000)]
"make world" replaces /bin/rmail even when NO_SENDMAIL has been set to
true in /etc/make.conf. Both qmail and smail use a different rmail, so
replacing rmail is a Bad Thing.
PR: 6762
Reviewed by: phk
Submitted by: Bill Trost <trost@cloud.rain.com>
jb [Wed, 27 May 1998 00:44:58 +0000 (00:44 +0000)]
Make a copy of the caller's iovec array, mallocing if necessary,
and modify that if the writev() syscall does not completely write
all bytes in a single call.
jb [Wed, 27 May 1998 00:41:22 +0000 (00:41 +0000)]
Remove error check from call to set the file descriptor to non-blocking
instead of explicitly ignoring some errors. This allows for the case
where a device is naturally non-blocking.
wpaul [Tue, 26 May 1998 23:42:24 +0000 (23:42 +0000)]
Ignore 'invalid' interrupts that occur while the interface is down.
These are probably generated by other PCI devices sharing the TLAN's
interrupt. The programmer's guide says to simply re-enable interrupts
and return if one of these is detected.
sos [Tue, 26 May 1998 20:12:56 +0000 (20:12 +0000)]
ELF preparation step 2:
Move a.out libraries to /usr/lib/aout to make space for ELF libs.
Make rtld usr /usr/lib/aout as default library path.
Make ldconfig reject /usr/lib as an a.out library path.
Fix various Makefiles for LIBDIR!=/usr/lib breakage.
This will after a make world & reboot give a system that no
longer uses /usr/lib/*, infact one could remove all the old
libraries there, they are not used anymore.
We are getting close to an ELF make world, but I'll let this
all settle for a week or two...
dg [Tue, 26 May 1998 11:34:30 +0000 (11:34 +0000)]
Fixed logic in the test to drop ICMP echo and timestamp packets when
net.inet.ip.icmp.bmcastecho = 0 by removing the extra check for the
address being a multicast address. The test now relies on the link
layer flags that indicate it was received via multicast. The previous
logic was broken and replied to ICMP echo/timestamp broadcasts even
when the sysctl option disallowed them.
Reviewed by: wollman
jmb [Tue, 26 May 1998 02:28:18 +0000 (02:28 +0000)]
code was using wrong temporary variable "i", in place of "j".
i contains the contents of the EP_W0_CONFIG_CTRL register.
i was being used as the array index into an array on the stack.
jb [Mon, 25 May 1998 21:45:52 +0000 (21:45 +0000)]
When doing a blocking write, keep looping until all the bytes are
written without returning to the caller. This only occurs on pipes
where either the number of bytes written is greater than the pipe
buffer or if there is insufficient space in the pipe buffer because the
reader is reading slower than the writer is writing.
fenner [Mon, 25 May 1998 20:16:05 +0000 (20:16 +0000)]
Use select() timeouts instead of SIGALRM to schedule packet transmission.
Fixes bin/6649 and removes the last abusive signal handler.
Use SO_TIMESTAMP to get the kernel to timestamp packets on reception.
Fixes bin/5658 and provides slightly better accuracy.
Explicitly zero and terminate the IP options when using -R.
sos [Mon, 25 May 1998 17:34:42 +0000 (17:34 +0000)]
ELF preparation step 1:
Move our old a.out utils to /usr/libexec/aout.
Enable binutils and put the utils in /usr/libexec/elf
Enable objformat, a little helper program that calls the right
utils based on /etc/objformat and $OBJFORMAT.
This will enable the ELF generating tools.
Remember that this is only step one, the system is still compiled
and run in a.out format ONLY.
Problem left to solve: The BSD manpages wins over the GNU equivalents
as the are installed last. We need to distinguish between the manpages
somehow...
julian [Mon, 25 May 1998 10:37:48 +0000 (10:37 +0000)]
Add optional code to change the way that divert and ipfw work together.
Prior to this change, Accidental recursion protection was done by
the diverted daemon feeding back the divert port number it got
the packet on, as the port number on a sendto(). IPFW knew not to
redivert a packet to this port (again). Processing of the ruleset
started at the beginning again, skipping that divert port.
The new semantic (which is how we should have done it the first time)
is that the port number in the sendto() is the rule number AFTER which
processing should restart, and on a recvfrom(), the port number is the
rule number which caused the diversion. This is much more flexible,
and also more intuitive. If the user uses the same sockaddr received
when resending, processing resumes at the rule number following that
that caused the diversion. The user can however select to resume rule
processing at any rule. (0 is restart at the beginning)
To enable the new code use
option IPFW_DIVERT_RESTART
This should become the default as soon as people have looked at it a bit
julian [Mon, 25 May 1998 08:44:31 +0000 (08:44 +0000)]
Hide the interface name in the sin_zero section of the sockaddr_in
passed to the user process for incoming packets. When the sockaddr_in
is passed back to the divert socket later, use thi sas the primary
interface lookup and only revert to the IP address when the name fails.
This solves a long standing bug with divert sockets:
When two interfaces had the same address (P2P for example) the interface
"assigned" to the reinjected packet was sometimes incorect.
Probably we should define a "sockaddr_div" to officially hold this
extended information in teh same manner as sockaddr_dl.
julian [Mon, 25 May 1998 07:41:23 +0000 (07:41 +0000)]
Take the user's "IGNORE_DIVERT" argument from where the user put it
and not from the PCB which HAPPENS to contain the same number most
of the time, but not always.
steve [Mon, 25 May 1998 03:34:52 +0000 (03:34 +0000)]
Allow a user in group 0 to su(1) to root if their primary
group is 0 in /etc/passwd even if they aren't listed
as a member in /etc/group. This is more inline with
what the group manpage says.
PR: 6696
Submitted by: Max Euston <meuston@jmrodgers.com>
brian [Mon, 25 May 1998 02:22:38 +0000 (02:22 +0000)]
o Don't try to transfer tty device descriptors as there's no way of
transferring session rights with them. Instead, create two
`/bin/cat' processes. A new child is spawned and disassociated from
the terminal and the parent, which continues with the rest of the ppp
process. Meanwhile, the parent spawns another child, and both the
parent and child exec the `/bin/cat' commands with the appropriate
descriptors. This way, the session is owned by the parent, and the
tty is held open.
o Close LCPs that have done a TLF and are now in ST_STOPPED before
calling Down. This prevents them from trying to come back up again
after the peer has shut them down (it seems a bit strange that the
rfc says that a Down in ST_STOPPED will cause a TLS etc).
o Don't try to set the physical link name pointer when we're receiving
and renaming a datalink. The physical hasn't been created yet, and as
it happens, the garbage physical pointer happens to be the value of another
physical - so we're pointing that other physical name at ourselves.
yeuck.
o Re-arrange the order of things in main (DoLoop()). We now handle
signals only after the select and not before the UpdateSet. It's
possible that either a signal (FSM timeout) or a descriptor_Read()
brings a link down, after which we'd better tidy up any dead direct
and 1off descriptors before calling UpdateSet() again.
o Mention when we detect a PPP packet when we see one before the link
is up (then start LCP as before).
eivind [Sun, 24 May 1998 21:51:50 +0000 (21:51 +0000)]
Don't blow away parts of the sourcetree on a 'make clean'. This was
only harmful for building from a read-only filesystem - the parts
blown away were old rm'ed directories.
fenner [Sun, 24 May 1998 18:41:04 +0000 (18:41 +0000)]
Take IP options into account when calculating the allowable length
of the TCP payload. See RFC1122 section 4.2.2.6 . This allows
Path MTU discovery to be used along with IP options.
PR: problem discovered by Kevin Lahey <kml@nas.nasa.gov>
dg [Sun, 24 May 1998 14:59:57 +0000 (14:59 +0000)]
The ipt_ptr field is 1-based (see TCP/IP Illustrated, Vol. 1, pp. 91-95),
so it must be adjusted (minus 1) before using it to do the length check.
I'm not sure who to give the credit to, but the bug was reported by
Jennifer Dawn Myers <jdm@enteract.com>, who also supplied a patch. It
was also fixed in OpenBSD previously by andreas.gunnarsson@emw.ericsson.se,
and of course I did the homework to verify that the fix was correct per
the specification.
PR: 6738
peter [Sun, 24 May 1998 14:41:56 +0000 (14:41 +0000)]
Convert a couple of large allocations to use zones rather than malloc
for better packing. This means that we can choose better values for the
various hash entries without having to try and get it all to fit within
an artificial power of two limit for malloc's sake.
amurai [Sun, 24 May 1998 03:03:10 +0000 (03:03 +0000)]
Primary verison of NetBIOS over TCP/IP. Now you can connect Windows
DOMAIN as DOMAIN user through NAT function. See also RFC1002 for
futher detail of SMB structure.
brian [Sat, 23 May 1998 22:24:50 +0000 (22:24 +0000)]
o Move our prompt descriptor list outside of the bundle.
It's now dealt with by the `server' object. This simplifies
things as we only have one list of prompt descriptors and
the log_ routines check prompt::logactive to determine
whether it should be used for output.
o Include the MP socket UpdateSet() result in bundle::UpdateSet().
o Don't select on the tun device unless we're in NETWORK
phase or AUTO mode.
o Stop the idle timer when we go to DEAD phase. We may
have transferred a link and not had a chance to kill
it.
o Don't fail when trying to unlink our transferred datalink
from our descriptor lists just before the transfer.
o Add our link descriptor to the write set if we got a short
write the last time (physical::out is set).
o Log the connection source address when a connection is closed.
o Remove descriptor::next field. Descriptor lists are not required
any more.
brian [Sat, 23 May 1998 17:05:28 +0000 (17:05 +0000)]
o Make sure we adjust our min seq and process any outstanding queued
incoming fragments when a link goes down.
o Don't use the minimum sequence numbers of links that aren't open.
o Understand sequence number wrapping when determining the minimum
sequence number.
o Add & adjust a few comments.