Commit Graph

3470 Commits

Author SHA1 Message Date
Jordan K. Hubbard c922e45175 MF22: match entries for wfd 1998-01-22 21:14:31 +00:00
Søren Schmidt f5dee08294 Use /bin/pwd instead of a potentially shell builtin that does
not return the "real" path.
This makes it possible to have the .o files put in the /usr/obj
hierachy instead of in the /usr/src one.
1998-01-22 19:34:31 +00:00
Philippe Charnier 2cc11a3c27 Add rcsid. Add usage() with up to date flag list. Use err(3). 1998-01-22 07:28:26 +00:00
Philippe Charnier a7a63eccb9 Convert to mdoc format. Document missing flags. 1998-01-22 07:26:08 +00:00
Jordan K. Hubbard 9d8d61fb4d Add entry for SMC 9432TX cards (tx driver). 1998-01-21 19:25:49 +00:00
Brian Somers 4d834db441 Use the sockaddr_dl with the link#, not the ethernet address
when creating proxy arp entries.
1998-01-21 12:52:14 +00:00
Brian Somers 217e186518 Don't assume that a computer can have no more than
256 interfaces (mine doesn't).  Instead, find local
interface addresses using sysctl().
1998-01-21 10:55:39 +00:00
Jordan K. Hubbard 8b1643d2c6 I must have been smoking crack when I made this change. Using sh -c
in a vsystem() call is just a ludicrous way of calling sh -c "sh -c ..."
Whoops!  I don't know my own bloody code here!
1998-01-21 06:08:35 +00:00
Brian Somers aa8e05197c Remove unused #includes.
Make various bits static.
Remove unused variables.
Submitted by: eivind
1998-01-21 02:15:33 +00:00
Warner Losh 07d19529ee Quote filenames more agressively.
Reviewed by:	jkh
Submitted by:	Hubert Feyrer
1998-01-21 00:12:56 +00:00
Brian Somers 49b239e0d2 Allow an optional delay when specifying "set openmode active".
The delay defaults to 1 sec (as it always has) unless we've done
a ~p in interactive mode or we've actually detected a HDLC frame.
This is now cleanly implemented (via async timers) so that it is
possible for LCP to come up despite the delay if an LCP REQ is
received.

This will hopefully solve situations with slow servers or slirp
scenarios (where ECHO is left on the port for a second or so before
the peer enters packet mode).

Also, ~p in interactive mode no longer changes the value of the default
openmode delay and -dedicated mode enters packet mode in the right state
according to the value of openmode.
1998-01-20 22:47:48 +00:00
Bruce Evans a798ce2eac Converted to Lite2 mount interface - use vfc_typenum from the
already looked up vfsconf struct for nfs instead of MOUNT_NFS.
Removed related FreeBSD ifdefs.
1998-01-20 15:22:27 +00:00
Bruce Evans 66a655bcf6 Merged from Lite2. Get the filesystem type name directly from the
statfs struct instead of converting from the filesystem type number.
1998-01-20 15:12:24 +00:00
Garrett Wollman 8830deae19 Properly initialize the printer struct.
PR: bin/5519
1998-01-20 14:43:05 +00:00
Bruce Evans 87f01287d2 Removed definition of _NEW_VFSCONF. The new vfsconf interface is now
the default.
1998-01-20 10:40:18 +00:00
Philippe Charnier ffe0efc2a9 Convert to mdoc format. Remove unused vars. Use err(3) and change exit(-1). 1998-01-20 07:30:27 +00:00
Kazutaka YOKOTA f17c00390e Add the PnP string for a Logitech serial mouse model. 1998-01-20 03:38:36 +00:00
Jonathan M. Bresler 141868ce36 update hub's master configuraton file
limit sendmail to 500 messages per run
keeps the process from growing too large
sort the queue by host, not numeric priority
connecting to a host is too expensive,
once we got the connection, ram all the mail down his throat ;>
1998-01-20 01:48:12 +00:00
Bill Paul 844812c437 Also fix ypbind to compile with ANSI-fied /usr/include/rpcsvc. One of
these days I really should rerwite this creature from the ground up.
1998-01-19 23:31:38 +00:00
Jordan K. Hubbard 83ac5c703b Add wfd style devices to detection list (we'll have to put them on the
boot floppy too, of course - hope I still have enough inodes! :)
1998-01-19 23:28:41 +00:00
Brian Somers e2e26133df dlopen(..., RTLD_NOW) rather than RTLD_LAZY.
Pointed out by: John Polstra <jdp@polstra.com>
1998-01-19 22:59:57 +00:00
Brian Somers 677f680c33 sys/types.h -> sys/param.h
Pointed out by: Niklas Hallqvist <niklas@petra.appli.se>
1998-01-19 22:34:20 +00:00
Brian Somers c6fe0cb207 Reimplement proxy-arp address stuff using sysctl(). 1998-01-19 02:59:34 +00:00
Brian Somers d1a3ea477c Allow "set vj" for changing the default number of slots
and whether slot compression is requested.
Don't show current values with "show ipcp" if IPCP isn't
"opened".
1998-01-18 20:49:22 +00:00
Bruce Evans 18e5aee8c1 VVMIO -> VOBJBUF as in pstat.c. 1998-01-17 16:58:55 +00:00
Bruce Evans b49d184b20 Started getting rid of the compatibility cruft for the Lite1 mount()
and the pre-Lite2 vfsconf interfaces.

For quot, just back out revs. 1.1 and 1.2 and change MNT_FFS to
"ufs", so that vfsconf isn't used at all.  Revs. 1.1 and 1.2 were
hacks to get around f_fstypename not being in `struct statfs' in
Lite1.
1998-01-17 16:45:03 +00:00
Brian Somers ced716c30f Remove the necessity of -ldes and -lalias etc from release/Makefile.
When building a release, RELEASE_CRUNCH is defined for a `make' of
the objects required by the crunch of each program.  The object list
is still obtained in the same way, so you must make sure that all
objects are built (empty if necessary) by this make.  ppp/Makefile
provides an example.

Reviewed by: jkh
1998-01-17 14:21:21 +00:00
Jordan K. Hubbard 73dfa4e8d6 MF22: fix to install script handling. 1998-01-17 12:26:19 +00:00
Bruce Evans cc03533c8d Removed most unused includes of <net/if_var.h> outside the kernel. 1998-01-16 17:38:56 +00:00
Jordan K. Hubbard a8d70a4bb7 Adapt to new mount(2) argument syntax.
Submitted by:	bde
1998-01-16 15:07:55 +00:00
Jordan K. Hubbard b46285e3cf Benign changes to support Justin's CAM code. 1998-01-16 12:53:04 +00:00
Philippe Charnier aa05c002fa Add rcsid. Change exit(-1). Use err() instead of warn()/exit(). 1998-01-16 07:17:45 +00:00
Jonathan M. Bresler 561ceaff07 update hub.mc to match what we are currently using:
both /etc/aliases and /etc/majordomo.aliases
sendmail.cw is *not* optional
command and connection timeouts
common hoststat directory for all queues
add fakenames database
clean up spam filter rules
limit the number of message processed each queue run
dont need to check Vixie's RBL in both check_relay and check_mail
1998-01-15 17:39:50 +00:00
Brian Somers 257b72c4fd Free our input mbuf when the FCS is good (oops, memory leak). 1998-01-14 01:47:50 +00:00
Brian Somers d6a02b89fb Lose __libalias_version.
We now look for the biggest of libalias.so.2.*
1998-01-14 01:23:05 +00:00
Kazutaka YOKOTA 2c807029e5 Fix the output of `kbdcontrol -L _keymap_file_' which I broke in the last
commit ;-<  /usr/src/release/sysinstall/Makefile uses it to generate
built-in keymap tables.
1998-01-12 23:53:26 +00:00
Philippe Charnier bee6f9e334 Remove optind (getopt() already knows about it). 1998-01-12 08:01:40 +00:00
Philippe Charnier 373c037f07 Remove optind (getopt() already knows about it). Move -d flag to -c according
to man page.
1998-01-12 08:00:32 +00:00
Brian Somers cc924f9e6f Lose <net/if_var.h> !
This'll require a `make installworld'.
1998-01-11 17:53:27 +00:00
Brian Somers 3a70c9f7bf Make things work when sizeof(long) != 32 (hopefully) 1998-01-11 17:50:49 +00:00
Darren Reed 5905ba8289 change s_port to ntohs(s_port) for printf in DEBUG. 1998-01-11 06:03:35 +00:00
Brian Somers b1435e416f Remember any number of interface names. 1998-01-11 04:45:36 +00:00
Brian Somers b5b4c13254 Remove includes of if_var.h and in_var.h 1998-01-11 04:02:57 +00:00
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