Brian Somers [Sun, 25 Mar 2001 20:06:08 +0000 (20:06 +0000)]
Issue a ``quit'' after other ppp commands given on the command line and
then wait for the connection to be closed by the peer.
This means that commands such as ``pppctl ... show links'' will
display the correct output again (rather than truncating it depending
on how much data arrived in the last packet).
Joerg Wunsch [Sun, 25 Mar 2001 09:53:07 +0000 (09:53 +0000)]
This is another MFC candidate.
Fix a serious bug in sppp where anyone could obtain a successful PAP
authentication by supplying a null password. I've only stumpled across
the PR while browsing for all sppp-related PRs.
Mike Heffner [Sun, 25 Mar 2001 04:57:05 +0000 (04:57 +0000)]
Merge various changes from OpenBSD and NetBSD.
o remove panic() in favor of err(3) and use err(3) functions
consistently throughout
o use stat(2)'s S_IS* macros rather than S_IF*
o [r]index -> str[r]chr
o convert some static buffers to dynamic ones
o use real tempfiles rather than reopening the same templates
o rename some functions that clash with libc
o convert wait_status from union to int and use wait(2) status macros
o fix multiple potential buffer overflows
o fix a few comments
o add $FreeBSD$
Brian Somers [Sun, 25 Mar 2001 01:34:27 +0000 (01:34 +0000)]
If we're adding an interface address that is already one of the interface's
aliases with the same netmask and destination, don't remove it and then
re-add exactly the same thing.
This means that static (non-sticky) routes that use the interface address
(or destination address) as a destination will not suddenly evaporate when
IPCP comes up (not unless the negotiated IPs have changed anyway).
Bosko Milekic [Sat, 24 Mar 2001 23:47:52 +0000 (23:47 +0000)]
Move the atomic() mbstat.m_drops incrementing to the MGET(HDR) and
MCLGET macros in order to avoid incrementing the drop count twice.
Otherwise, in some cases, we may increment m_drops once in m_mballoc()
for example, and increment it again in m_mballoc_wait() if the
wait fails.
Cameron Grant [Sat, 24 Mar 2001 23:10:29 +0000 (23:10 +0000)]
mega-commit.
this introduces a new buffering mechanism which results in dramatic
simplification of the channel manager.
as several structures have changed, we take the opportunity to move their
definitions into the source files where they are used, make them private and
de-typedef them.
the sound drivers are updated to use snd_setup_intr instead of
bus_setup_intr, and to comply with the de-typedefed structures.
the ac97, mixer and channel layers have been updated with finegrained
locking, as have some drivers- not all though. the rest will follow soon.
David E. O'Brien [Sat, 24 Mar 2001 17:28:06 +0000 (17:28 +0000)]
Revert the warning elimination in rev 1.292. It breaks the Alpha build with:
/usr/src/usr.sbin/sysinstall/menus.c:1323: initializer element is not computable at load time
/usr/src/usr.sbin/sysinstall/menus.c:1323: (near initialization for `MenuNetworking.items[9].aux')
David E. O'Brien [Sat, 24 Mar 2001 09:37:48 +0000 (09:37 +0000)]
List of distfile contents to delete using `rm' and `find -delete'.
Simular to the FREEBSD-Xlist used with `tar -X ... -xf'.
This file is typically used when one starts with the GDB anoncvs repo
rather than a release tarball.
David E. O'Brien [Sat, 24 Mar 2001 09:01:31 +0000 (09:01 +0000)]
Sigh. I should know better than to commit a one line change from a PR
w/o a full compile test, even when the PR seemed so authoritative on the
subject...
David E. O'Brien [Sat, 24 Mar 2001 08:44:28 +0000 (08:44 +0000)]
Restore the careful preservation of .depend (rev 1.78 of Makefile.i386)
that I removed in my last commit dealing with `make depend' bogons.
This commit has some races, but hopefully they are too short to matter.
Unfortuneatly, neither .newdep nor .olddep is removed by `make clean'.
David E. O'Brien [Sat, 24 Mar 2001 08:27:57 +0000 (08:27 +0000)]
Fix a problem where we were switching npxproc from underneath processes
running in process context in order to run interrupt handlers. This
caused a big smashing of the stack on AMD K6, K5 and Intel Pentium (ie, P5)
processors because we are using npxproc as a flag to indicate whether
the state has been pushed onto the stack.
Peter Wemm [Sat, 24 Mar 2001 04:40:49 +0000 (04:40 +0000)]
This is kind of a hack, but it should work. Currently, world is broken
because libc/rpc/key_call.c references uname(), and ps/print.c also
defines uname(), and ps is linked statically. This leads to a symbol
clash. The userland uname(3) kinda sucked anyway as the hostname
etc was too short. And since the libc rpc interface now uses
the utsname.nodename which gets truncated, I was tempted into doing
something about it. Create a new userland uname function, called
__xuname() which takes an extra argument that allows you to change
the size of the fields. uname() becomes a static inline function
in sys/utsname.h that passes the extra argument in. struct utsname
has its field members expanded by default now in userland.
We still provide a 'uname' externally linkable function for things
that either think that they ``know'' the utsname format and assume
32 character strings and bypass the include file, or objects that
are linked against old libcs. ie: just about every plausible
case that I can think of is covered. Should we ever change the
default lengths again, a libc major bump should not be required
as the size is now passed to the function.
XXX the uname(2) in the kernel is for FreeBSD 1.1 binary compatability!
All the uname(3) functions that are exported to userland are actually
implemented in libc with sysctl. uname(1) uses sysctl directly and
does not call uname(3).
David E. O'Brien [Sat, 24 Mar 2001 01:58:31 +0000 (01:58 +0000)]
Import the setjump/longjump exception handling fixes from GCC 2.95.3.test3
that were removed from GCC 2.95.3.test4 and the subsequent release due
to problems on HP-UX. However, they work just fine on all the BSD's.
W/o these patches the following program segmentation faults if compiled
with -O2 (but not -Os or -O or -O0):
#include <stdio.h>
class A {
public:
A() { printf("c'tor A\n"); }
~A(){ printf("d'tor A\n"); }
};
class foo : public A {
public:
foo() { printf("C'tor foo\n"); throw 8; }
~foo() { printf("D'tor foo\n"); }
};
Peter Wemm [Sat, 24 Mar 2001 00:34:12 +0000 (00:34 +0000)]
Slightly de-bogify the uname() declarations.
1: there is no global 'struct utsname utsname' in the kernel.
2: the __P() stuff handles the __STDC__ stuff, so the extra ifdef is
redundant.
Cameron Grant [Sat, 24 Mar 2001 00:22:01 +0000 (00:22 +0000)]
add support for opti924 and opti930 chips
both should work in non-pnp mode, the 924 should also work in its rather
braindead pnp mode- it will adopt port 0x530 unless given hints due to it
starting up in soundblaster mode and thus not requesting a valid mss port
address.
Submitted by: George Reid <greid@ukug.uk.freebsd.org>
Søren Schmidt [Fri, 23 Mar 2001 20:55:28 +0000 (20:55 +0000)]
Fix the problem with some drives not reporting back when the
are busy blanking and erasing CD-RW media.
This fixes burncd's premature returns from blanking/erasing
that caused trouble.
Joerg Wunsch [Fri, 23 Mar 2001 19:51:12 +0000 (19:51 +0000)]
(MFC candidate, see below).
When we get an Open event in stopped state, experience shows that this
is usually means we've somehow missed a previous Down event. This has
occasionally bitten people for the IPCP layer with ISDN, apparently a
previously aborted IPCP negotiation must have caused this. As a
bandaid, we quickly pretent a Down event by advancing to starting
state; this effectively implements the `restart' option mentioned in
RFC 1663.
While i'm not yet fully convinced this is the best thing to do (and is
fully compliant with RFC 1661), i've seen a number of reports here on
the German mailing lists where people have been bitten by the previous
behaviour which usually causes quickly looping ISDN reconnects (thus
loss of money...), and where just this patch fixes the problem.
For this, i'd even like to see it MFC'd if possible.
Submitted by: Helmut Kreft <kreft@zeus.ai-lab.fh-furtwangen.de>
Assar Westerlund [Fri, 23 Mar 2001 19:38:21 +0000 (19:38 +0000)]
disable SRA
this impacts negatively to POLA since once autologin is enabled,
telnet will prompt for a password using getpass() and thus not allow
the usual signal characters or C-]
Maxim Sobolev [Fri, 23 Mar 2001 18:45:24 +0000 (18:45 +0000)]
- Add which(1)-like functionality into pkg_info;
- fix a harmless bug in match_installed() function introduced in my last
commit;
- uniformely reorder includes across files.
Submitted by: Garrett Rooney <rooneg@electricjellyfish.net>
Not objected by: jkh, -ports
Alexander Langer [Fri, 23 Mar 2001 14:05:05 +0000 (14:05 +0000)]
- DECLARE_MODULE needs SYSINIT -> include sys/kernel.h
- modeventhand_t declares a pointer to a function, so it can't be
used as a forward declaration (d'oh!)
Fix a bug with setting the soft updates option from a script.
Eliminate an old warning brought about by insufficient foresight when creating
the Menu structure. Have I ever mentioned that sysinstall really needs to
be rewritten?