Peter Wemm [Sat, 30 May 1998 16:33:58 +0000 (16:33 +0000)]
When using NFSv3, use the remote server's idea of the maximum file size
rather than assuming 2^64. It may not like files that big. :-)
On the nfs server, calculate and report the max file size as the point
that the block numbers in the cache would turn negative.
(ie: 1099511627775 bytes (1TB)).
One of the things I'm worried about however, is that directory offsets
are really cookies on a NFSv3 server and can be rather large, especially
when/if the server generates the opaque directory cookies by using a local
filesystem offset in what comes out as the upper 32 bits of the 64 bit
cookie. (a server is free to do this, it could save byte swapping
depending on the native 64 bit byte order)
John Hay [Sat, 30 May 1998 07:32:28 +0000 (07:32 +0000)]
Add a test to see if the secure directory exists, before deciding which
crypt library should be used when building bootstrap-libraries. This
make it work on machines that don't have the secure directory.
Thanks to Paul Allenby <pallenby@mikom.csir.co.za> for bringing it to
my attention.
Brian Somers [Fri, 29 May 1998 18:33:10 +0000 (18:33 +0000)]
o If there's a session leader left running for a descriptor
that we're now closing, manually HUP that session leader
so that the tty is fully released.
o Always restart our carrier detect timer in the receiving
process if it was running in the sending process (as we
now *always* pass the descriptor).
o Tweak argv when we go into pause() mode to keep our session
so that ps can see what's going on (without checking for a
`pause' state in `ps -l').
Brian Somers [Fri, 29 May 1998 18:32:11 +0000 (18:32 +0000)]
o Make modes consistent throughout ppp. The same strings are used
in `set mode', `allow modes', on the command line and when
outputting mode names. The strings are matched so that only
enough characters to uniquely identify the string are required,
so you can now
ppp -a mylabel (for auto mode)
ppp -b mylabel (for background mode)
ppp -dd mylabel (for direct dial mode)
etc.
o Make -ddial dial when specified on the command line (oops).
Pointed out by: Alex <garbanzo@hooked.net>
Bill Paul [Fri, 29 May 1998 16:58:46 +0000 (16:58 +0000)]
Don't program the antonegotiation advertisement register in tl_setmode().
I had a reason for doing this, but it violates the principle of least
astonishment. (At some point I may put this back but attach it to one of
the LINK flags so the behavior can be toggled on and off.)
Also replace my tl_calchash() with a much less disgusting and substantially
smaller one supplied by Bill Fenner.
Also check for Satoshi's TMPDIR location of perl when looking around for it.
Clean up an .ifdef which was probably doing the wrong thing in the case
where user wants to override PERL.
Submitted by: jhay
Brian Somers [Thu, 28 May 1998 23:17:51 +0000 (23:17 +0000)]
o #define the name "tun" in defs.h against the future possibility
of supporting architectures with different device names.
o Close /dev/tunX when destroying the bundle.
o Don't forget to close the parent end of the pipe in the child
process when exec'ing a program from a chat script.
o If we close our controlling terminal, ditch the current session
with it, allowing getty(8) (or whatever) to regain control.
o After transferring our controlling terminal descriptor to another
ppp instance, we now fork a new ppp to continue where we left off,
transferring ownership of all uucp locks and the /var/run/tunX.pid
file. Meanwhile the parent closes all file descriptors, defaults
all signals and does a pause() to wait for a HUP after the
transferred descriptor is finally closed.
We don't run /bin/cat any more (again!).
Suggested by: bde
TODO: It seems clocal devices need their pause()d session leader
to be given a manual HUP, as closing the last open descriptor
doesn't do the job.
Brian Somers [Thu, 28 May 1998 23:15:40 +0000 (23:15 +0000)]
o Don't forget to close our transfer socket if we cannot
generate the data to transfer.
o Transfer uucp lock ownership for the transferred device.
o Don't assume we know the correct values of dev_is_modem and
mbits after the transfer.
Peter Wemm [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 Wemm [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 Elischer [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 Wemm [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 Wemm [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 Wemm [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 Wemm [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 Wemm [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 Wemm [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 Wemm [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 Wemm [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 Wemm [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.
"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>
John Birrell [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.
John Birrell [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.
Bill Paul [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.
Søren Schmidt [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...
David Greenman [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
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.
John Birrell [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.
Bill 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.
Søren Schmidt [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 Elischer [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 Elischer [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 Elischer [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 Price [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 Somers [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 Eklund [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.
Bill 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>