Commit Graph

3427 Commits

Author SHA1 Message Date
Brian Somers
492e660800 Allow 6 byte interface names (for >tun99) 1998-01-11 02:59:22 +00:00
Brian Somers
86ca062379 Pause according to the redial setting when dialing manually.
Pointed out by: Berend de Boer <berend@compuserve.com>
1998-01-10 21:51:31 +00:00
Wolfram Schneider
d7f712093f Rename the pwd_mkdb(8) option '-c' to '-C' for better compatiblity
with BSD/OS.
1998-01-10 17:27:28 +00:00
Steve Price
f8ddb109a4 Minor brace gymnastics so that /etc/wall_cmos_clock is really
created.

PR:		5473
Submitted by:	MIHIRA Yoshiro <sanpei@yy.cs.keio.ac.jp>
1998-01-10 15:55:11 +00:00
Brian Somers
98baf7c8fd Implement Reset{Req,Ack} properly, as per rfc 1962.
(I completely mis-read the rfc last time 'round!)

This means:
  o Better CCP/WARN Reset diagnostics.
  o After we've sent a REQ and before we've received an ACK, we drop
    incoming compressed data and send another REQ.
  o Before sending an ACK, re-sequence all pending PRI_NORMAL data in
    the modem queue so that pending packets won't get to the peer
    *after* the ResetAck.
  o Send ACKs with the `identifier' from the REQ frame.
  o After we've received a correct ACK, duplicate ACKs are ok (and will
    reset our history).
  o Incorrect ACKs (not matching the last REQ) are moaned about and dropped.

Also,

  o Calculate the correct FCS after compressing a packet.  DEFLATE
    *may* produce an mbuf with more than a single link in the chain,
    but HdlcOutput didn't know how to calculate the FCS :-(
  o Make `struct fsm'::reqid a u_char, not an int.
    This fix will prevent us from sending id `255' 2,000,000,000 times
    before wrapping to `0' for another 2,000,000,000 sends :-/
  o Bump the version number a little.

The end result:  DEFLATE now works over an unreliable link layer.
                 I can txfr a 1.5Mb kernel over a (rather bad) null-modem
                 cable at an average of 21679 bytes per second using rcp.
Repeat after me: Don't test compression using a loopback ppp/tcp setup as
                 we never lose packets and therefore never have to reset!
1998-01-10 01:55:11 +00:00
Jordan K. Hubbard
cac1743203 MF22: Additional paranoia in cleanup. 1998-01-09 14:52:18 +00:00
Brian Somers
0ca7cafb96 Zap any addresses on the network side of the `tun' as soon
as we've successfully opened the /dev side.
1998-01-08 23:47:57 +00:00
Jordan K. Hubbard
07eb524cb0 Don't assume install script is directly runnable - use sh -c. 1998-01-08 11:27:06 +00:00
Kazutaka YOKOTA
1f150ac44b Added accent (dead) key support to syscons and kbdcontrol.
With a keymap with accent key definitions loaded to syscons, you press
an accent key followed by a regular letter key to produce an accented
letter.  Press an accent key followed by the space bar to get the
accent letter itself.

Code is based on the ideas and work by jmrueda@diatel.upm.es and
totii@est.is.

PR: i386/4016

- Added keywords for accent (dead) keys: dgra, dacu, dcir, dtil...
- Recognize accent map definitions.
<accent_map_definition> ::= <accent_key_name> <accent_char> <accent_map>
<accent_key_name> ::= dgra | dacu | dcir | dtil | dmac | dbre | ddot |
                      duml | dsla | drin | dced | dapo | ddac | dogo |
                      dcar
<accent_map> ::= <map_entry>
               | <map_entry> <accent_map>
<map_entry> ::= ( <regular_letter_char> <accented_char> )
- Use ioctls PIO_DEADKEYMAP and GIO_DEADKEYMAP to set and get the accent
  key map table in syscons.
- Made the output for the -L option more intelligible and look like
  initializers in kbdtables.h.
- Reorganized print functions in order to print the accent key map.
1998-01-07 08:43:28 +00:00
Philippe Charnier
f51758d62c Typo. 1998-01-07 07:43:04 +00:00
John Dyson
5821aa7f1b Make pstat.c compile, since in the new kernel code, VVMIO doesn't
exist anymore.
1998-01-06 05:33:28 +00:00
Brian Somers
4e9914b708 Correct the return value of ReportProtStatus() ("show proto").
Submitted by: Dave Bodenstab <imdave@mcs.net>
1998-01-06 00:58:31 +00:00
Kazutaka YOKOTA
851c9886fd Added some notes on cut&paste functions and button assignment. 1998-01-05 12:38:13 +00:00
Philippe Charnier
cfebbb6c1a Use err(3). Change Synopsis to SYNOPSIS (needed for macro expansion) and
add SEE ALSO.
1998-01-05 07:19:15 +00:00
Brian Somers
9c97abd8c3 o Allow the use of HISADDR as the first arg to "add".
o Allow a forth argument in ppp.secret, specifying a new
  label.  This gives control over which section of
  ppp.link{up,down} is used based on the authenticated user.
o Support random address ranges in ppp.secret (not just in ppp.conf).
o Add a AUTHENTICATING INCOMING CONNECTIONS section to the man page.
o Add a bit more about DEFLATE in the man page.
o Fix the incorrect "you must specify a password in interactive
  mode" bit of the manual.
o Space things in the man page consistently.
o Be more precice about where you can use MYADDR, HISADDR and INTERFACE
  in the "add" command documentation.
1998-01-05 01:35:20 +00:00
Brian Somers
e1375e2807 Make it clear that using "add ...." in ppp.conf when
not in -auto mode isn't a good idea, and that the
add should be done in ppp.linkup instead.

Change "add 0 0 HISADDR" to "add default HISADDR".  It's
more intuitive.
1998-01-04 21:28:49 +00:00
Brian Somers
512db5555c Don't scribble on the stack if our input packet is
bigger than our MRU.  Moan and drop the packet
instead.
1998-01-04 20:26:37 +00:00
Brian Somers
79d1bdaedb Initialize CcpInfo protocols to -1 (none, not OUI).
Don't Call Term() for an algorithm that hasn't been Init()d.
1998-01-04 20:25:41 +00:00
Bruce Evans
e6b3e43e33 Restored xref to diskless(8). diskless(8) existed but was not installed.
PR:		2153
1998-01-01 11:02:45 +00:00
Paul Traina
1c1351793c Handle frame relay, decode ATM VP/VC info, and handle ISO over FR. 1998-01-01 04:13:54 +00:00
Brian Somers
2a279fed14 Allow "set device" to close the open modem if we're in
interactive mode.
Use `netfd' in fcntl() and tc[gs]etattr() calls rather than
the hard coded descriptor 0.
Use _FILENO constants from unistd.h

This un-breaks things after my recent `close(0)' in interactive
mode.

Close STDIN_FILENO, and open _PATH_TTY O_RDONLY as `netfd'.  This
has the effect of allowing `show route' to output more than about
a page of data (on FreeBSD, not OpenBSD....).  I have no idea why,
except that it was a direct consequence of the tcsetattr() in
TtyCommandMode().  My previous fix (closing descriptor 0) `fixed'
this because all calls to tcsetattr() failed :-(
1997-12-30 23:22:31 +00:00
Brian Somers
05d83ad6a4 Typo in error message. 1997-12-30 20:02:50 +00:00
Brian Somers
adac5b72cc Use inet_aton() before gethostbyname()
Suggested by: Christian Sandberg <christian@yes.no>
              Eivind Eklund <perhaps@yes.no>
1997-12-30 20:02:32 +00:00
Brian Somers
65eea2e0fa Allow "add! dst mask gw" (note the ``!'') to do an
RTM_CHANGE if the RTM_ADD fails with an EEXIST.
Allow "delete! dst" (note the ``!'') to silently
fail if the RTM_DELETE fails with an ESRCH.
Also, make the ESRCH and EEXIST error conditions
more understandable to the casual observer.
1997-12-30 02:45:48 +00:00
Alexander Langer
a228025e10 Added copyright (taken from natd.c).
Approved by:	Ari Suutari <ari@suutari.iki.fi>
1997-12-30 00:38:56 +00:00
Brian Somers
f7d8bb14f0 Don't complain that someone's changed the clock unless the time
after a select() interrupt is more than 1 second past what
should have been the end time.
We may just be running on an over-burdened machine.
1997-12-29 22:23:52 +00:00
Brian Somers
b2167e32a4 Show how much time is left before timing out in the
`show timeout' output.
Remove ipIdleSecs variable - it's not used.
1997-12-29 22:23:13 +00:00
Jordan K. Hubbard
de92741516 gateway -> gateway_enable
Pointed out by: Susie Ward <sward@voltage.net>
1997-12-29 20:07:17 +00:00
Brian Somers
b1cbb71c91 Don't expect select() to adjust the passed time when it's
interrupted with a SIGALRM.  In fact, select() sets the
passed time to zero, making the previous implementation
terminate always after 1/10th of a second !

Also, deal with someone changing the clock while we're
sleeping (and restart the whole sleep).

Dangers pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org>
1997-12-28 21:55:05 +00:00
James Raynard
bf58fc2646 Fix a couple of stray apostrophes. 1997-12-28 20:52:56 +00:00
Brian Somers
09411a5af3 Initialize mbuf::pnext.
Complain to LogERROR if we have internal inconsistency (not LogDEBUG).
1997-12-28 02:56:43 +00:00
Brian Somers
c60f92ca71 If a packet causes a dial, continue to test whether it's
blocked in the output filter.  If so, proceed with the
dial despite dropping the packet.
1997-12-28 02:46:26 +00:00
Brian Somers
1208d55b60 Allow initial sequence numbers less than what we're expecting.
When CCP is originally negotiated, the only thing we can be
sure about is that we've started adding data to the inflate
dictionary either before or at the same time as the peer.  This
is ok, 'cos DEFLATE is a `sliding window' compressor.
1997-12-28 02:17:06 +00:00
Garrett Wollman
8ff467c6b7 Fix top-of-form bogon. 1997-12-27 20:49:39 +00:00
Steve Price
039016310d Another sysconfig -> rc.conf fix.
PR:		5374
Submitted by:	Studded <Studded@dal.net>
1997-12-27 19:40:20 +00:00
Alexander Langer
f13f9fada7 Typo/$Id$ police. 1997-12-27 19:31:11 +00:00
Brian Somers
de7453bb2a Write to the routing socket as uid 0. It's not good enough
to just open it as uid 0 under OpenBSD.
1997-12-27 19:23:13 +00:00
Steve Price
ff2dff3d42 Fix some minor formatting bugs.
PR:		5216
Submitted by:	Masahiro Sekiguchi <seki@sysrap.cs.fujitsu.co.jp>
1997-12-27 18:54:23 +00:00
Brian Somers
e7250038b6 Show who closes the diagnostic connection.
Show the IP range (if specified) in "show ipcp".
Close unused descriptors 0 and 2 in interactive mode.
Pass (size_t *) rather than (int *) to sysctl().
1997-12-27 13:45:57 +00:00
Brian Somers
fcabffd883 Remove bogus timeout code in Receive().
Don't read(fd, buffer, 0) and think ppp has closed the
connection when `buffer' is full, instead, flush most of
buffer to the terminal and read() for a reasonable length.
This fixes "show route" when there's more than 2k of
routing output.
1997-12-27 13:44:42 +00:00
Brian Somers
313572f3e3 Allow (and document) execution of commands from within
our chat script.
You can now even run chat(8) - see ppp.conf.sample.
1997-12-27 07:22:12 +00:00
Tim Vanderhoek
a86f3c5dee "This is the add^H^H^Hinfo module."
Pedantic comment fix.

PR:		bin/5188
Submitted by:	Alex [3]garbanzo@hooked.net
1997-12-26 05:29:29 +00:00
Tim Vanderhoek
dfb9495b2a Use consistent spelling,
writeable -> writable (recall prior debate over this? :-)
	initialise -> initialize
	recognise -> recognize

Merry Christmas! :)
1997-12-25 09:36:42 +00:00
Wolfram Schneider
86e2983aa5 Small bugfix: store $uid_start instead hard coded value 1000
in /etc/adduser.conf.
1997-12-24 11:44:14 +00:00
Brian Somers
b40d784ebf Correct copyright.
Requested by: Eivind Eklund <perhaps@yes.no>
1997-12-24 10:28:38 +00:00
Brian Somers
70ee81ff6b Cosmetic (style):
sizeof(var) -> sizeof var
  sizeof type -> sizeof(type)

Suggested by: J Wunsch <j@uriah.heep.sax.de>
1997-12-24 09:29:17 +00:00
Brian Somers
f9925914f1 Use sizeof cftypes128 for NCFTYPES128 macro, not sizeof cftypes !
Lucky that sizeof cftypes < sizeof cftypes128
1997-12-24 09:28:11 +00:00
Brian Somers
6fefd43684 strncpy(x,y,sizeof(x)) --> strncpy(x,y,sizeof(x)-1)
Suggested by: Philippe Charnier <charnier@lirmm.fr>
              Theo de Raadt <deraadt@cvs.openbsd.org>
1997-12-23 22:38:55 +00:00
Kazutaka YOKOTA
30ee7535d4 - Added support for a new MouseMan model (4 buttons, no wheel).
Based on the report from Dave Bodenstab.
- Turn off PnP COM device enumeration procedure if the user explicitly
  specifies a protocol type with the "-t" option.
- Accept "-t auto".  Now the user may entirely omit the "-t" option
  in the command line, or specify "-t auto" in order to make moused
  detect an appropriate protocol type automatically.  In the
  previous version, moused did so only if the "-t" option is absent
  in the command line. ("-t auto" won't disable PnP COM device
  enumeration.)
- Updated the man page.
1997-12-23 08:04:38 +00:00
Alexander Langer
c62b41d9d5 YTK fix. 1997-12-22 23:00:35 +00:00
Brian Somers
4401489a4a Don't forget to ntohs(sin.sin_port) (DUH!) 1997-12-22 02:28:18 +00:00
Brian Somers
abbdf4e916 Charles Mott created these (and told me via email that
they were BSD copyright).  Use his name, not mine.
1997-12-21 14:28:24 +00:00
Brian Somers
c39934ea32 Add (BSD) copyright headers. 1997-12-21 12:11:13 +00:00
Brian Somers
0ec82e961e Cosmetic: Test for comment lines after the lenght has been established.
Pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org>
1997-12-21 03:41:23 +00:00
Brian Somers
8fe71e0656 Allow multiple (comma seperated) devices on the "set device" line.
Submitted by: Derek Inksetter <derek@saidev.com>
1997-12-21 03:16:19 +00:00
Brian Somers
25ee22f573 Cosmetic: Tidy up.
Submitted by:	Theo de Raadt <deraadt@cvs.openbsd.org>
1997-12-21 02:37:49 +00:00
Brian Somers
857a4bf337 Mention that leading whitespace is ignored when identifying comments. 1997-12-21 02:34:27 +00:00
Brian Somers
2e14bb4605 Zero struct sockaddr_??s before filling them in.
Suggested by: Theo de Raadt <deraadt@cvs.openbsd.org>
1997-12-21 02:27:32 +00:00
Brian Somers
aa2e5be7ae Allow leading whitespace before '#' when identifying comments.
Submitted by: Dave Bodenstab <imdave@mcs.net>
1997-12-21 02:11:48 +00:00
Brian Somers
bb1d272c41 Correct the "how to find out if the line is up" example. 1997-12-21 01:21:40 +00:00
Brian Somers
0ecc184e10 Cosmetic: Remove blank lines, add .Pp where necessary.
Submitted by:	Theo de Raadt <deraadt@cvs.openbsd.org>
1997-12-21 01:07:13 +00:00
Sean Eric Fagan
267ffcab5c Add a copyright and license statement, at the request of Jordan. 1997-12-20 18:34:49 +00:00
Bruce Evans
389bd59ff7 Never create the destination directory at install time.
Don't build things at install time.
Don't override the (correct) clean rule.
Rewrote all the rules and cleaned up.
1997-12-20 00:40:05 +00:00
Bruce Evans
100c897389 Handle the ``maintenance'' case better.
Fixed some style bugs.
1997-12-19 23:56:18 +00:00
Brian Somers
5a76e22406 Reset our "ifaddr" to zero if the "set ifaddr" fails in
-auto mode.  This makes ppp correctly exit if you kick it
off twice in auto mode with the same label (read: interface).
1997-12-19 18:11:05 +00:00
Brian Somers
f5fb6bd02a If the peer asks for IP 0.0.0.0, choose an IP ourselves
without looking for it in our IP list (and if found, trying
to ifconfig it!).
1997-12-19 04:49:53 +00:00
Bruce Evans
5ce43a5e9b Install sysctl in /sbin. It is used in some cases in network_pass1(),
before /usr is mounted if /usr has type nfs.
1997-12-18 15:34:08 +00:00
Brian Somers
16f81f6873 Replace
strcpy(a, b);  /* a and b are the same size */

with

  strncpy(a, b, sizeof(a));
  a[sizeof(a)-1] = '\0';

Making the code `correct at a glance'.

Suggested by: Theo de Raadt <deraadt@cvs.openbsd.org>
1997-12-18 01:10:13 +00:00
Brian Somers
31746f5580 "No reply from ppp" -> "Connection closed".
"No reply" sounds like the message didn't get through (for
example when you `pppctl xxxx quit all'.
1997-12-18 00:29:56 +00:00
Brian Somers
a09d09cbe7 Don't log the actual password when command-logging
"passwd xxxx".
1997-12-18 00:28:36 +00:00
Brian Somers
d27d502ce6 Don't depend on a u_long being 32 bits.
Pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org>
1997-12-17 21:22:05 +00:00
Brian Somers
a19363a911 char filename[200] => char filename[MAXPATHLEN]
Pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org>
1997-12-17 21:22:01 +00:00
Brian Somers
58f264e1f1 Log the source of client connections to the diagnostic port.
Disallow connections from port numbers <1024 as low port numbers
can only really mean trouble (ftp bounces etc.).

Discussed at length with: Theo de Raadt <deraadt@cvs.openbsd.org>
1997-12-17 21:21:56 +00:00
Brian Somers
865f3ab28a Remove useless comparison. 1997-12-17 21:21:53 +00:00
Brian Somers
e3b4c40068 If we've got a descriptor table that's bigger than an
fd_set, make sure that all descriptors >2 are closed
when we start - otherwise we're asking for a dump in
FD_SET().

Problem pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org>
1997-12-17 21:21:47 +00:00
Brian Somers
72ca96bfa5 o Log ******** instead of the actual password for "set authkey"
when command logging is switched on.
o Display ******** for the authkey for "show auth"
o Document how \P should be used, and document the other chat escapes
  while I'm there.
o Make sure the full command is displayed when a compound command
  fails - ie, "set novar rubbish" should say "set novar: Invalid command"
  rather than "novar: Invalid command"

Problem pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org> (among others)
1997-12-17 21:21:42 +00:00
Garrett Wollman
3a0a936baa Add -Wno-unused so that ``make world'' can complete successfully.
GCC suppresses the warning for ``standard'' header files, but since the
headers do not come from the ``standard'' place in a ``make world'', GCC
doesn't get it.
1997-12-17 19:38:33 +00:00
Bruce Evans
8355db991e BSDify. 1997-12-17 19:32:54 +00:00
Bruce Evans
f34b67af93 Don't use LDDESTDIR. Just put the -L arg in LDADD. 1997-12-17 15:11:43 +00:00
Bruce Evans
bd29cad15f Use the default LIBOWN, etc. instead of clobbering the defaults to bin,
etc., so that (this part of) `LIBOWN=... make world' can be run by users
other than root.  Actually, use BINOWN instead of LIBOWN, since the files
that we install in /usr/libdata are not libraries, and LIBOWN is not
used for anything else in /usr/libdata.

Rewrote all the rules and cleaned up.
1997-12-17 13:04:18 +00:00
Bruce Evans
1783bbf630 LIBOWN -> BINOWN, etc. There are no libraries here. 1997-12-17 12:38:42 +00:00
Bruce Evans
6935938329 Use the default LIBOWN, etc. instead of clobbering the defaults to bin,
etc., so that (this part of) `LIBOWN=... make world' can be run by users
other than root.  Actually, BINOWN instead of LIBOWN, since fonts are not
libraries.  Only one owner of (non-setuid) installed files is really
supported.
1997-12-17 12:31:58 +00:00
Bruce Evans
a2d1e2fbf5 Fixed missing DPADD by removing empty LDADD. 1997-12-17 11:13:26 +00:00
Bruce Evans
13b6695c0c Fixed building with NOSHARED=YES. libncurses depends on libmytinfo but
libmytinfo was not mentioned explicitly.  The bug was hidden by the
linkage of libncurses to libmytinfo in the shared library case.
1997-12-17 10:06:51 +00:00
Brian Somers
4754552a07 Remove an unnecessary (and wrong) cast. 1997-12-17 00:26:58 +00:00
Brian Somers
83c0952d1c Fix a potential overflow where, if the label passed on the command
line is > LINE_LEN (512 bytes), we scribble (*blush*).

Hinted at by: Theo de Raadt <deraadt@cvs.openbsd.org>

Change sprintf(buf, "fixedstring") to strcpy(buf, "fixedstring").
1997-12-17 00:19:25 +00:00
James Raynard
22ec24834e Typo alert (cosmetic). 1997-12-16 22:23:52 +00:00
Bruce Evans
b732d6bad5 Fixed DPADD. 1997-12-16 17:53:39 +00:00
Bruce Evans
53d0e9f018 Fixed DPADD. 1997-12-16 17:43:33 +00:00
Brian Somers
b399b74b2d Wrap long lines
Submitted by:	Greg Lehey <grog@lemis.com>
1997-12-16 00:32:35 +00:00
Brian Somers
8511968cda Correct return values from alias routines. 1997-12-15 23:34:05 +00:00
Brian Somers
abf533d806 Use LogWARN for command usage messages and unrecognised
commands, not LogCOMMAND.
1997-12-15 20:21:47 +00:00
Brian Somers
32ca334139 Do 2 passes when "delete all"ing. The first pass removes
all RTF_WASCLONED routes, and the second removes the
others.  This avoids the situation where we've added an
RTF_CLONING route (such as ``default''), created some
clones, then deleted the CLONING route before the
WASCLONED route(s).  Without the two passes, we get
errno (not rtm_errno) set to ESRCH when deleting the
WASCLONED route, despite the deletion succeeding !

Also:
  Enhance the route operation failure diagnostics.
  Make portability #ifdefs a bit more generic.
1997-12-15 20:21:15 +00:00
Kazutaka YOKOTA
5d6618fa17 Oops, I forgot to set `cflag' in some cases when initializing the
mouse port.
1997-12-15 02:57:45 +00:00
Guido van Rooij
f2c90b9538 Oops..The default behaviour should be *not* to log all succeeded
requests. If you want this extra loggin, add the -l option.
1997-12-13 19:50:14 +00:00
John Polstra
14e6f796cd Fix a segmentation violation that happened if "auth" was in the
options file but there was no suitable secret in the secrets file.
1997-12-13 05:27:29 +00:00
Sean Eric Fagan
d7b7dcba41 Change the ioctls for procfs around a bit; in particular, whever possible,
change from

	ioctl(fd, PIOC<foo>, &i);

to

	ioctl(fd, PIOC<foo>, i);

This is going from the _IOW to _IO ioctl macro.  The kernel, procctl, and
truss must be in synch for it all to work (not doing so will get errors about
inappropriate ioctl's, fortunately).  Hopefully I didn't forget anything :).
1997-12-13 03:13:49 +00:00
Brian Somers
bcc332bdb0 Allow random IP number allocation to peer.
Validate the peers suggested IP by attempting to make a routing table
entry.
Give up IPCP negotiation if the peer NAKs us with an unusable IP.
Always SIOCDIFADDR then SIOCAIFADDR when configuring the tun device.
Using SIOCSIFDSTADDR allows duplicate dst addresses (which we don't
want)!!!
Allow up to 200 interface names (was 50) (now that ppp can play server
properly).
Up the version number (1.5 -> 1.6).

Cosmetic:
  Log unexpected CCP packets in the CCP log rather than the ERROR log.
  Log unexpected Config Reqs in the appropriate LCP/IPCP/CCP log rather
  than the ERROR log.
  Log failed route additions and deletions with WARN, not TCPIP.
  Log the option id and length for unrecognised IPCP options.
  Change some .Sq to .Ar in the man page.
1997-12-13 02:37:33 +00:00
Bruce Evans
760cf7b24a Fixed printing of and comparison with d_typename[]. It is not always
null terminated.
1997-12-12 18:01:57 +00:00
Bruce Evans
f073fe0e04 MF22 (oops, I committed it to the wrong tree yesterday).
Changed lots of %ld's in format strings back to %d.  %ld was right
when daddr_t was long, but Lite2 changed daddr_t to int32_t which
is implemented as `int' on i386's.
1997-12-12 17:58:31 +00:00
Bruce Evans
484b65d5d8 Fixed the usual multiplication overflow bug in an lseek() offset calculation.
The scan for bad sectors was broken for offsets >= 4G on 32-bit systems.
1997-12-11 07:27:06 +00:00
Bruce Evans
65dafcf329 Merged from Lite2 (fix misformattings in copyright). 1997-12-11 07:12:10 +00:00
Guido van Rooij
690c488d0a Fix some style bugs.
Submitted by:	bruce
1997-12-10 20:33:59 +00:00
Brian Somers
67a886fb97 natd 1_10 => 1_11
Cosmetic style changes
  Use u_short for port values.
Submitted by:	Ari Suutari <ari@suutari.iki.fi>
1997-12-10 02:14:57 +00:00
Guido van Rooij
f51631d732 Log all failed mount attempts.
Also add a flag (-l) so mountd will also log all succeeded requests
to mountd.
1997-12-09 18:43:44 +00:00
Brian Somers
038a366695 Deal with inflate() returning avail_in == avail_out == 0
We must call inflate again in case there's any pending output
despite our input buffer being empty.  If the output buffer
is in fact already flushed, inflate() returns Z_BUF_ERROR.
There isn't really an error !
1997-12-08 20:22:12 +00:00
Brian Somers
d4395dc80b Correct usage of add' and delete'. 1997-12-08 20:09:10 +00:00
Kazutaka YOKOTA
f8b013e208 Explicitly state that the -t option is required only when the
moused command is not able to detect the appropriate protocol for the
give mouse automatically.

Suggested by: sos
1997-12-08 11:54:42 +00:00
Philippe Charnier
18970b8398 Use Pa for files and Ar for arguments. 1997-12-08 07:43:13 +00:00
Nate Williams
50b5ec4154 - Changed strcmp to strncmp for checking the CIS manufacturer strings,
since we only store CIS_MAXSTR data, and the users may stick the
  'entire' CIS string returned from the card in /etc/pccard.conf and
  cause the comparison to (bogusly) fail.

Submitted by:	Brad Karp <karp@eecs.harvard.edu>
1997-12-08 06:35:07 +00:00
Brian Somers
b0624e7fc6 Fix PAP, CHAP & LQR req (I broke the byte ordering when
I did the deflate re-org).
Make PAP & CHAP negotiation prettier in the log file.
If both PAP & CHAP are `enabled' and the peer NAKs CHAP
suggesting PAP, be friendly and REQ PAP the next time.
This is in line with the rfc.
1997-12-07 23:55:29 +00:00
Jonathan M. Bresler
7f19cd73cb update hub.mc with the latest set of anti-spam rules
Submitted by:	jmb
1997-12-07 16:59:28 +00:00
Kazutaka YOKOTA
5f436cfb7b The `moused' daemon is made to support various serial mouse
protocols to recognized extra buttons and wheel/roller. It now has
PnP COM device support code, thus, some recent mouse products are
automatically detected and an appropriate protocol is selected.
The `-i' option will print the result of auto-detection.

- Added support for the following SERIAL mice:
      ALPS GlidePoint, MS IntelliMouse, Kensington Thinking Mouse
  (Genius NetMouse, NetMouse Pro, ASCII MieMouse, Logitech MouseMan+,
  FirstMouse+ are compatible with MS IntelliMouse, when connected
  to a serial port, thus requires no explicit support)
- Added PnP serial mouse identification capability as defined
  by Microsoft and Hayes in "Plug and Play External COM Device
  Specification, rev 1.00".  This support will enable us to identify
  the correct protocol to use, or choose a compatible protocol for the
  given mouse.
- Utilize new ioctls defined in `mouse.h' to get hardware and protocol
  information on PS/2 and bus mouse devices.  Try to guess the correct
  protocol and port combination based on the obtained info.
- Use MOUSE_SETLEVEL ioctl.
- Use constants defined in `mouse.h' rather than using own definitions.
- A New command line option.  The -i option prints the information
  collected though the PnP code and psm/mse ioctls mentioned above,
  and just quits.  This is to test `moused's ability, or inability, to
  detect the correct protocol for the given mouse automatically.
- A new command line option.  The -m option maps a physical button
  to a logical button.
- A new command line option.  The -z option maps the Z axis movement to
  another axis or a pair of buttons.
- Add other options: -3, -C -F -P.
- Added a handler for SIGHUP.  This has been suggested by somebody in the
  past (I don't remember who).  He wanted this because he wants to attach
  or detach a mouse while his laptop is suspended.  Now `moused' will
  reopens and reinitialize the specified port whenever a SIGHUP is
  received.  I don't know how useful this can be...
1997-12-07 08:11:16 +00:00
Brian Somers
f01e577b07 Only allow one arg to `delete' - the mask & gateway aren't necessary.
Delete AF_LINK routes as well as AF_INET.
Allow the word `default' as the arg to `delete' or in place of the
first two args (dest & netmask) to `add'.
Accept INTERFACE as the third arg to `add'.

  You can now say `add default interface' to create a default route
  through the tun interface.  It's reported that subsequent bind()s
  will bind to a broadcast address and not to the address currently
  assigned to the tun device - this is the first step towards
  supporting that first connection that was around from before the
  dynamic IP negotiation....
1997-12-07 04:09:15 +00:00
Peter Wemm
ded275c6ec explicitly set MAN8 since only MAN1 is defaulted. 1997-12-07 02:35:18 +00:00
Peter Wemm
766c9acef4 Add $Id$ 1997-12-07 02:30:43 +00:00
Peter Wemm
57b1764ffb delete -static, add $Id$ 1997-12-07 02:29:28 +00:00
Peter Wemm
e6489fd8e4 add procctl 1997-12-07 02:27:48 +00:00
Brian Somers
b6871831e5 Correct cftypes128 index. 1997-12-06 22:43:58 +00:00
John Polstra
79031fd714 Fix incorrect format string in call to errx(). 1997-12-06 17:55:07 +00:00
Brian Somers
27c20503c6 Reverse my previous change and use htons() on an int
instead of htonl() !

This results in the int a,b,c,d changing to b,a,c,d,
but as it's subsequently coerced to a u_short, the
ultimate answer is correct.

If this isn't fixed properly soon (by the author) I'll
have a look at it again.

Noted by:	eivind & ari@suutari.iki.fi
1997-12-06 12:00:32 +00:00
John Polstra
9aa446f543 Add missing argument to warn() call. 1997-12-06 05:37:18 +00:00
Sean Eric Fagan
c430992a81 First checkin of the procctl program. 1997-12-06 04:19:09 +00:00
Brian Somers
4bfaee9023 Understand ``sockaddr_dl''s where sdl_nlen != 0 1997-12-04 18:49:39 +00:00
Brian Somers
702026bc21 Remove duplicate REJECTED macro.
Remove extraneous pointers.
1997-12-04 18:49:35 +00:00
Brian Somers
ea6610416a Initialize ccpstate when CCP comes down.
Remove extraneous pointers.
1997-12-04 18:49:32 +00:00
Brian Somers
0c9d3d050e Parenthesise the REJECTED macro. 1997-12-04 18:49:28 +00:00
Brian Somers
774326ed2e Identify rejected protocol types according to rfc1700. 1997-12-04 18:49:26 +00:00
Brian Somers
4bc84b8c11 Fix the CCP Type field value for DEFLATE.
(I *really* meant to do this  *before* committing the
deflate changes in the first place - oops).

Pppd is horribly broken in this respect - refer to the
ppp man page for details.  Ppp *WON'T* negotiate deflate
with pppd by default - you must ``enable'' and ``accept''
``pppd-deflate'' in your config.

While I'm in there, update the cftypes in ccp.c so that
we recognise some more protocols (we don't actually do
anything with them - just send a REJ).
1997-12-03 23:28:02 +00:00
Brian Somers
0053cc58a9 Abstract the CCP layer a level.
Add DEFLATE support.
1997-12-03 10:23:54 +00:00
Garrett Wollman
b7f84b25e9 Document the new long names for printcap capabilities. 1997-12-02 21:41:40 +00:00
Garrett Wollman
4a1a0dbedb Mega lpd/lpd upgrade, part I:
- Get rid of a lot of the static variables which were shared by
  many routines and programs in the suite.
- Create an abstract interface to the printcap database, so that
  other retrieval and iteration mechanisms could be developed
  (e.g., YP, Hesiod, or automatic retrieval from a trusted server).
- Give each capability a human-readable name in addition to the historic
  two-character one.
- Otherwise generally clean up a lot of dark corners.  Many still remain.
- When submitting jobs, use the official login name record (from getlogin())
  if there is one, rather than reverse-mapping the uid.

More to come...
1997-12-02 20:46:22 +00:00
Jonathan M. Bresler
8ac5e37330 improve anti-spam rulesets: check_relay, check_mail, check_rcpt.
break each ruleset into identified sections. (called groups).
	note which groups can be reordered.
	each group accepts and returns the same strings,
		as much as possible.
	reactivate Paul Vixie's RBL (in check_mail)
	add rules to limit mail relaying to a list of hosts and domains
		in the R class (check_rcpt, not active on hub.freebsd.org)

Submitted by:	 jmb
1997-11-30 23:28:26 +00:00
Andrey A. Chernov
19df0544a0 Sleep 10secs after kill -HUP instead of 3secs, some daemons like Apache
may have log time to re-configure
1997-11-30 18:58:18 +00:00
Joerg Wunsch
4cafd31252 Remove an extraneous ".kbd" that crept in for the Swiss German
keyboard map.

Submitted by:	georg.wagner@ubs.com
1997-11-26 22:48:24 +00:00
Brian Somers
fc85e494d0 Display connect time as 0 if we've never been
connected.
Pointed out by: Jeff Kletsky <Jeff@wagsky.com>
1997-11-26 02:16:10 +00:00
Nate Williams
4d1fabf000 - Don't worry about the previous state of the card (insert/removed), and
instead Do The Right Thing when the kernel states a card was
  inserted/removed.  This isn't a complete fix, but better than nothing.

Reviewed by:	Guido van Rooij <guido@gvr.org>
1997-11-25 19:15:59 +00:00
Brian Somers
132502aa4d Fix the help command (broken when I re-prototyped
all the commands).
1997-11-23 20:05:18 +00:00
Brian Somers
82ceff74d2 Up the version number to 1.5. 1997-11-22 13:47:02 +00:00
Brian Somers
9cb1d89ee2 Understand how to derive the names of interfaces
when they aren't ordered.  This is probably vital
for laptop support ;-I
1997-11-22 13:46:02 +00:00
Brian Somers
b6e82f33ef Fix prototypes.
Remove extraneous decls.
Add ``const'' to several places.
Allow ``make NOALIAS=1'' to remove IP aliasing.
Merge with OpenBSD - only the Makefiles vary.

We can now survive a compile with
  -Wall -Wbad-function-cast -Wcast-align -Wcast-qual
  -Winline -Wmissing-declarations -Wmissing-prototypes
  -Wnested-externs -Wpointer-arith -Wredundant-decls
  -Wshadow -Wstrict-prototypes -Wwrite-strings -Wchar-subscripts
(although the Makefile just contains -Wall).
1997-11-22 03:37:54 +00:00
Nate Williams
ae8d0ca416 - Renamed log_1s() to logmsg(). 1997-11-19 02:31:41 +00:00
Nate Williams
ec3383fb48 - Include <pccard/cardinfo.h> instead of <pccard/card.h> which was recently
renamed.
1997-11-18 21:08:14 +00:00
Brian Somers
f9e4a0ca7d Allow zero args to "cvs log". 1997-11-18 19:38:27 +00:00
Brian Somers
082798e7bd Fix interactive mode so that it doesn't require a passwd (again!). 1997-11-18 18:17:25 +00:00
Brian Somers
9a0b991f97 Add throughput logging (disabled by default).
Use "enable throughput" to see modem & IPCP throughput.
Removed an extraneous prompt()
1997-11-18 14:52:08 +00:00
Brian Somers
841cf58dbc Remove the outq error in "show modem". 1997-11-18 08:49:03 +00:00
Brian Somers
b264e1d275 DropClient() when read() returns 0 (as it did before). 1997-11-18 07:33:23 +00:00
John Polstra
f40b2bd44f Fix: too many arguments passed to fprintf(). 1997-11-18 05:56:03 +00:00
John Polstra
24032eebaf Fix incorrect format string detected by "-Wformat". 1997-11-18 03:41:51 +00:00