Commit Graph

3375 Commits

Author SHA1 Message Date
Brian Somers f5c9fce9cd Add Id string. 1997-11-18 00:22:07 +00:00
Brian Somers f3a51f7a0b Notice that ppp has closed the connection properly.
Remove the timeout hack to notice that ppp has closed the connection.
Remove the ``special case'' hacks for "quit" and "bye", as pppctl
now exits immediately when the connection is closed by ppp.
Suggest a secure "set server" line for connecting ppp & pppctl.
Tidy up and correct a few man page typos.
1997-11-18 00:20:29 +00:00
Brian Somers 3b7eb4fb00 Add and use a DropClient() function for closing the diagnostic port.
Call DropClient() from Cleanup() too.
1997-11-18 00:19:34 +00:00
Brian Somers 39f94eddcd Don't SetLabel() 'till we've done the SelectSystem(). This
avoids the situation where we specify label ``x'' on the command
line, and label ``x'' has a ``load y'' command embedded in it.
When the line comes up, we want to use ``x'' from ppp.linkup,
not ``y''.
1997-11-17 01:13:41 +00:00
Brian Somers c7d4711f9e Add id strings to tun.[ch].
Don't try to open ppp.secret if we're never going to use it.
1997-11-17 00:42:41 +00:00
Brian Somers 6a6b4bbb08 Abstract data read from and written to the tun device,
allowing for a possible header on the front of all packets.
In OpenBSD, there's a structure containing the address
family here.
If we're building under OpenBSD, set up the ``flags'' part
of struct tuninfo (not there under FreeBSD) so that we config
the interface as POINTOPOINT.
Prefix prototypes with ``extern'' in os.c for consistency.

These changes are cosmetic under FreeBSD, but allow ppp to
build & work under OpenBSD (bar the srandomdev() stuff,
the inclusing of <net/if_var.h> and some Makefile symantecs).
1997-11-16 22:15:11 +00:00
Bill Paul d8207d546d Some touchups courtesy of Philippe Charnier. 1997-11-16 03:49:12 +00:00
Brian Somers 5d5e507005 Interpret AF_LINK sockaddrs correctly in show/delete route.
Print out inteface names rather than numbers, and use the
same "find out the names" code in SetIfAddr().  This means
that the nasty ioctl(,SIOCGIFCONF,)/realloc loop is now
buried :-)
1997-11-15 02:15:56 +00:00
Brian Somers b351d6b7c3 uucplock is in section 3 not section 8 ! 1997-11-14 20:07:39 +00:00
Brian Somers 9e836af5d9 Update the cftypes arrays according to rfc1700.
Log IPCP reqests as IPCP.
1997-11-14 15:39:15 +00:00
Brian Somers a23e75e150 Allow blank lines in config entries (they aren't terminators). 1997-11-14 15:38:07 +00:00
Jordan K. Hubbard 2a23bb4e4c MF22: Revert part of -p handling. 1997-11-14 01:56:04 +00:00
Brian Somers 9fecb4e63f Use seteuid() instead of setreuid().
The setreuid() page says seteuid is better !
1997-11-13 17:31:52 +00:00
Brian Somers 4562be7470 Don't run if ppp.conf is writable. 1997-11-13 15:35:06 +00:00
Brian Somers 815624cfab Log a warning when a -direct invocation is denied. 1997-11-13 14:44:06 +00:00
Brian Somers d9181b0512 Fix command logging (broken with the "allow" command). 1997-11-13 14:43:20 +00:00
Brian Somers 04da22ce2d Null commit: The last commit made some warning messages clearer. 1997-11-13 12:10:50 +00:00
Brian Somers e445012341 Don't delete interface routes when we do an LcpDown.
They'll get deleted in Cleanup().
1997-11-13 12:09:57 +00:00
Jordan K. Hubbard c6a72fc9d7 The prefix override code was bogus. The original idea was sound
enough, but we're not using the pkg_create tool that way anymore
in the ports collection.

PR:		4894
Submitted by:	Adrian Colley <aecolley@ois.ie>
1997-11-13 11:49:23 +00:00
Jordan K. Hubbard 0985a5c811 Whine when a depended package can't be found at all, vs being found
but failing to load.
PR:		4959
1997-11-13 11:44:42 +00:00
Brian Somers 5ae6fac1d7 Use htonl() rather than htons(). 1997-11-13 11:43:02 +00:00
Julian Elischer 8dc4b495b3 Submitted by: Archie@Whistle.com (Archie Cobbs)
allow teh -a option to work with the  -d option
thus:
arp -d -a now flushes your arp cache.
also fix the -n option so that -an now works correctly.
1997-11-13 01:16:57 +00:00
Brian Somers a272e47d50 Understand networks in the filter rules. We don't
insist on x.x.x.0/24 - x.x.x.x/24 is ok too.
1997-11-12 21:04:21 +00:00
Brian Somers 710e9c2970 Log whether or not IP packets are bloked due to
a filter.
1997-11-12 19:48:45 +00:00
Brian Somers c40e02e7f3 Return correct value from "set loopback".
Output "set ?filter deny host|port" rules correctly
with show ?filter.
Submitted by:	Dave Bodenstab <imdave@mcs.net>
1997-11-12 18:47:30 +00:00
Brian Somers 6143f398f8 Don't attempt to dial if "dial label" has specified
a restricted label.
1997-11-12 16:34:51 +00:00
Brian Somers 6c5a1dc652 Pass a missing arg to LogPrintf(). 1997-11-12 15:50:38 +00:00
Julian Elischer b1f4a44b03 Reviewed by: various.
Ever since I first say the way the mount flags were used I've hated the
fact that modes, and events, internal and exported, and short-term
and long term flags are all thrown together. Finally it's annoyed me enough..
This patch to the entire FreeBSD tree adds a second mount flag word
to the mount struct. it is not exported to userspace. I have moved
some of the non exported flags over to this word. this means that we now
have 8 free bits in the mount flags. There are another two that might
well move over, but which I'm not sure about.
The only user visible change would have been in pstat -v, except
that davidg has disabled it anyhow.
I'd still like to move the state flags and the 'command' flags
apart from each other.. e.g. MNT_FORCE really doesn't have the
same semantics as MNT_RDONLY, but that's left  for another day.
1997-11-12 05:42:33 +00:00
John Polstra ec8f6ad756 Output the estimated battery lifetime as "hh:mm:ss" along with
everything else.  Add a "-t" option for outputting it in raw form.
Define and document the order in which raw values are printed when
more than one is requested on the command line.
1997-11-12 04:16:23 +00:00
Brian Somers adbec73e00 Don't warn that we're waiting for the command to complete if
we've put it in the background (!bg).
1997-11-12 02:10:05 +00:00
Brian Somers a9c503af9d Don't moan about unexpected config req's when in ST_STOPPING. 1997-11-11 23:23:11 +00:00
Brian Somers 12ef29a81a Finish the security improvements:
o Add "allow" command:
      "allow users a b c" gives access to users a, b and c.
      "allow modes auto"  gives those users access to auto mode only.
      "allow users *" and  "allow modes *" are accepted.
      No users and all modes are allowed by default.
    UID 0 can do anything.
  o Set the current label with the "load" and "dial" commands
    so that the call to ppp.linkdown makes sense.
  o Up the verison number.
  o Don't OR MODE_AUTO for -background and -ddial.
  o Don't OR MODE_INTER when we get a diagnostic connection.
  o Allow up to 40 args per line (was 20).
  o "set ifaddr" only changes the interface in AUTO mode (with other
    modes, it happens after IPCP negotiation).
  o Sort command descriptions in the man page.
  o Support -dedicated mode where we just talk ppp forever (no login etc).
1997-11-11 22:58:14 +00:00
Brian Somers d2bb1901e7 Use select() instead of poll() for portabilities sake. 1997-11-11 13:27:47 +00:00
Brian Somers 3d8ad715f4 Fix typo that causes CHAP RESPONSEs to *always*
be damned M$ responses if you've got DES.
1997-11-11 13:08:12 +00:00
Brian Somers f960587c7b Poll the socket descriptor while in el_gets()
so that our display is scribbled over as we
requested.
1997-11-11 12:28:02 +00:00
Brian Somers 3aa7aa46a3 Flush the output stream when doing local logging. 1997-11-11 12:26:34 +00:00
Bill Paul 13170f18a2 Add a ypinit script and man page (script lifted from OpenBSD and haqued
to work on FreeBSD, man page written by me.)

Also change Makefile.yp a little to be more tolerane in the face of
missing source files. Print a message if we can't find /var/yp/master.passwd
telling the user what to do to fix things.
1997-11-10 22:17:13 +00:00
Peter Wemm 5d2af34fa5 remove #include <login_cap.h>, this is included as needed elsewhere now. 1997-11-10 02:51:16 +00:00
Peter Wemm 7649db8638 setusercontext() came into the 2.2 branch just before 2.2.2-release. 1997-11-10 02:32:27 +00:00
Peter Wemm 5818966ae4 Merge sendmail 8.8.8 changes onto mainline. (For all of CVS's warts, when
things like this turn out this easy (ie: it took 30 seconds), it's nice :-)
1997-11-10 02:05:23 +00:00
Peter Wemm ece810a9d6 This commit was generated by cvs2svn to compensate for changes in r31087,
which included commits to RCS files with non-trunk default branches.
1997-11-10 01:58:17 +00:00
Peter Wemm ff37c899d7 Import sendmail-8.8.8
Obtained from: ftp.sendmail.org
1997-11-10 01:58:17 +00:00
Brian Somers bdbc7471d7 Don't Cleanup() in background mode when
we get a "close", the LcpClose() will
eventually do it when we get to PHASE_DEAD.
1997-11-09 23:40:21 +00:00
Brian Somers 116e558a8f Initialize VarAltPhone.
PR:		4993
1997-11-09 22:56:15 +00:00
Brian Somers 8ea8442c9a Don't create a diagnostic socket by default.
Allow a password spec on the "set server" command line.
Use SIGUSR2 to close the diagnostic socket.
Some man page corrections.
1997-11-09 22:07:29 +00:00
Brian Somers d025849c64 Don't ask for a password if it's specified as empty. 1997-11-09 18:51:23 +00:00
Brian Somers 2d77cf0b00 Prompt correctly when ppp *doesn't* ask for a password. 1997-11-09 18:50:34 +00:00
Brian Somers da2a8b4d42 Add the "!include" syntax.
Return 0 from "show" commands.
1997-11-09 17:51:27 +00:00
Brian Somers 86e0293468 Increase chat script sizes to 512
Requested by: Michael Reifenberger <root@totum.plaut.de>
1997-11-09 14:18:55 +00:00
Brian Somers 50454ee744 Remove the use of $HOME/.ppp.* 1997-11-09 13:18:51 +00:00
Brian Somers 6e96766a46 Null commit:
The last modification removed the use of $HOME/.ppp.*
1997-11-09 13:18:18 +00:00
Brian Somers 5106c67149 Introduce ID0 logging.
Stay as the invoking uid as much as possible.
Execution as a normal user is still forbidden for now,
so these changes are pretty ineffective.
The next commit will implement the modifications suggested
on -hackers a number of days ago.
1997-11-09 06:22:49 +00:00
Brian Somers 592fb86275 When responding to a CHAP challenge, don't try to use
ppp.secret to get a key value based on the peers name,
then send the value of AuthName with the encrypted result.
This is *way* too confusing.
Instead, always use AuthName and AuthKey as the documentation
says.
1997-11-09 03:55:27 +00:00
Brian Somers d3a3ec3bb5 Don't include RTA_GATEWAY in rtm_addrs unless it's specified. 1997-11-09 03:22:49 +00:00
Brian Somers 87786af251 Typo police. 1997-11-08 12:37:33 +00:00
Brian Somers 9780ef311d Don't pass global vars as args.
Remove local/global conflicts.
1997-11-08 00:28:11 +00:00
Brian Somers 7d0a1bac71 Style police.
bzero -> memset
index -> strchr
rindex -> strrchr
Use libedit (this should make pppctl a lot more attractive than telnet).
1997-11-07 20:20:15 +00:00
Joerg Wunsch 6d0727f460 Argl! Who's got the pointy hat these days? Hand it over to me, ASAP!
When setting an alarm that didn't trigger, i gotta clear it again
before going on.  Hmpf!
1997-11-07 13:18:50 +00:00
Brian Somers fbff0da4c8 Support interactive mode. 1997-11-07 02:54:49 +00:00
Joerg Wunsch 19a41f3ab7 Pah! I didn't stick to my own advise to adjust the padding... 1997-11-07 00:18:25 +00:00
Joerg Wunsch 5e90d58311 Typo fix that caused the value 0x1234 to be written to a random memory
location.  Also, instead of jumping ot the CPU's restart vector, just
call int 0x19 to reboot.  (Writing hte 0x1234 was a little useless
otherwise.)

PR:		bin/4901
Submitted by:	Jonathan Mini <mini@d198-232.uoregon.edu>
1997-11-07 00:12:55 +00:00
Joerg Wunsch 8518c081b4 Fix some breakage from my last set of changes.
PR:		bin/4892
Submitted by:	Vasim Valejev <vasim@uddias.diaspro.com>
1997-11-07 00:09:40 +00:00
Joerg Wunsch 8f8262da39 Teach tzsetup to understand blank lines in the iso3166 file.
Found by:  evanc@synapse.net (Evan Champion)
1997-11-07 00:07:27 +00:00
Warner Losh 2fd8f469e5 Use warn rather than warnx to report errors opening the APM device.
Nit formatting fix
1997-11-06 23:55:38 +00:00
Mike Smith 41631559ba Bump configvers to 300003 to account for the crd->card (and related)
namespace changes.
1997-11-06 03:11:40 +00:00
Brian Somers 9633be85d7 o Spelling police.
o  Emphasize ``PPP''
o  x-ref other programs
o  Some minor clarifications
1997-11-06 00:25:33 +00:00
David E. O'Brien 48761ea3ad MFS. 1997-11-05 06:11:35 +00:00
Jordan K. Hubbard 8138f33308 Since doc no longer contains the Handbook, stop saying that it does.
Submitted by:	Joao Carlos Mendes Luis <jonny@coppe.ufrj.br>
1997-11-04 23:44:22 +00:00
Brian Somers a1e8f9372a Introduce [local] to "set log [local] ...". This spits
logging out to the screen in terminal mode - should be
good for installation problem diagnosis.
1997-11-04 01:17:05 +00:00
Philippe Charnier 73aabc1f3c Cosmetics in yp_error() and usage(). 1997-11-03 07:53:44 +00:00
Andrey A. Chernov 0435c15004 Log run-time parsing errors now
Use getpwnam before getpwuid since two users with same uids can exists
(affects new login classes code only)

The same fixes as in inetd: by default run `system crontab things' with
daemon login class now, not restrict them to user class breaking
compatibility with old way (so-called nobody limits problem)

Implement user[:group][/login-class] syntax in system crontab
for more flexible control (the same as in inetd)
1997-11-02 17:22:20 +00:00
James Raynard 6632f06e7a Typo alert. 1997-11-02 00:58:39 +00:00
Justin M. Seger 50aedc813b Fix typo: 129.168.128.0 -> 192.168.128.0
PR:		docs/4871
Submitted by:	sec@42.org
1997-11-01 15:55:09 +00:00
Philippe Charnier 0b10309e4d Make all strings representing hostnames to be NUL-terminated within
MAXHOSTNAMELEN chars, like everywhere else in the system, so that strcpy()s
and printf()s won't fail.
1997-10-31 12:33:14 +00:00
Dima Ruban 3e2e58f12e Add possibility to specify maximum number of connections per minute
for a given IP address.
This should be very effective against DoS attacks.
1997-10-29 21:49:04 +00:00
Jordan K. Hubbard d424167c3c Do chflags properly even when running multi-user. 1997-10-29 07:47:06 +00:00
Philippe Charnier 5e24be183a Back out strcpy() -> strncpy() changes. According to Bruce, they are unneeded.
Check the return value of gethostname() like in timed. Make enough place to
NUL-terminate the result.
1997-10-29 07:35:27 +00:00
Philippe Charnier 0b778a4e7f Back out strcpy() -> strncpy() changes. According to bruce, they are unneeded. 1997-10-29 07:32:30 +00:00
Philippe Charnier dd63f75f44 Use err(3). Rewrote man page using mdoc format. 1997-10-29 07:27:56 +00:00
Philippe Charnier 0da8bf4ab2 Use err(3). 1997-10-29 07:26:09 +00:00
Philippe Charnier 988345234d Typos in man page. Cosmetics in error strings. 1997-10-29 07:25:05 +00:00
Brian Somers 0fe7ca3165 o Bump version to 1.3 to reflect major changes
o  Report modem connect time properly
o  Report bytes in/out over physical media
o  Fix phases (TERMINATE is *higher than* DEAD)
o  Do a LayerFinish from LcpDown
o  Bring down IPCP & CCP when we enter PHASE_TERMINATE
o  Give a new prompt when we go to PHASE_DEAD
o  Stop the modem timer properly when idle
o  Treat sig 15 like an exiting carrier loss
o  Log (DEBUG) offline & online transitions
1997-10-29 01:19:51 +00:00
Nate Williams ec510cabb0 - Disable cards when doing a suspend by emulating that they have been
removed.  Add a new state 'suspend' so we 'fake' insertion events at
  resume time for the cards that have been suspended.

[
The code still works if you remove the card during suspend, switch the
card during suspend, or combinations of both.
]

Reviewed by:	frf@xocolatl.com
1997-10-28 17:51:25 +00:00
Brian Somers af8eceb3f6 Don't logwtmp(), login() already does it.
Log us out of utmp & wtmp if we're already in there.
PR:		4862
1997-10-28 16:50:56 +00:00
Andrey A. Chernov b34683ca29 Implement group part now, final syntax is:
user[:group][/login-class]
1997-10-28 13:46:52 +00:00
Joerg Wunsch cea24a2b2e Allow for a keyword in the "files" file named "mandatory". The first
candidate for this is "npx0", more are likely to follow.

Check for pseudo-devices that are being configured, but don't appear
in any "files" file.  The ``pseudo-device bpf 2'' already hit me too
often.
1997-10-28 07:21:04 +00:00
Andrey A. Chernov 186a5319ff Implement login classes sepcification as user[/loginclass]
By default inetd run things with the same limits as from /etc/rc
(daemon class) to not break anything as in good old days.
1997-10-27 22:03:47 +00:00
Philippe Charnier 0069349cc5 Use err(3). 1997-10-27 12:30:30 +00:00
Philippe Charnier e7f0e9ca56 Remove `progname'. 1997-10-27 12:29:25 +00:00
Philippe Charnier c133210f74 Add usage() and err(3). Sync man page with usage string. 1997-10-27 12:27:21 +00:00
Philippe Charnier aff2354586 One line usage string: see man page for more info. 1997-10-27 12:25:38 +00:00
Philippe Charnier 04ee6ce7a7 Cosmetic in err() strings. 1997-10-27 12:23:08 +00:00
Philippe Charnier dc763e50ee Use err(3). 1997-10-27 12:21:10 +00:00
Philippe Charnier 586470c149 Use err(3). Add prototypes. Document -s and -r flags. 1997-10-27 07:55:31 +00:00
Philippe Charnier acb61b9eb4 Statisize usage(). 1997-10-27 07:53:22 +00:00
Philippe Charnier 9396247ef7 Use err(3). Stylistic changes in man page. 1997-10-27 07:52:10 +00:00
Philippe Charnier 342afc34d7 Add usage(). Document -n flag. Do not touch/remove /etc/wall_cmos_clock
when -n (do nothing) is used.
1997-10-27 07:49:47 +00:00
Philippe Charnier 77cbf0b31b Use err(3). Change `=' to `==' in two places, so that server not responding/
server ok is not displayed too often.
OKed by:		Bill (wpaul).
1997-10-27 07:45:47 +00:00
Philippe Charnier 8418db88a2 ntohl->htonl.
OKed by:	Bruce
1997-10-27 07:41:12 +00:00
Brian Somers 6eaa6ac5d5 Cosmetic:
Move prototypes into the correct headers.
1997-10-26 12:42:13 +00:00
Wolfgang Helbig 60152ec531 Typo. 1997-10-26 10:37:35 +00:00
Nate Williams e7e437dbfa - Do a bunch of gratuitous changes intended to make the code easier to
follow.
 * Rename/reorder all of the pccard structures, change many of the member
   names to be descriptive, and follow more closely other 'bus' drivers
   naming schemes.
 * Rename a bunch of parameter and local variable names to be more
   consistant in the code.
 * Renamed the PCCARD 'crd' device to be the 'card' device
 * KNF and make the code consistant where it was obvious.
 * ifdef'd out some unused code
1997-10-26 04:36:24 +00:00
Brian Somers 75240ed178 Cosmetic (no functional changes):
o   Add missing $Id$s
o   Move extern decls from .c -> .h files
o   Staticize
o   Remove #includes from .h files
o   style(9)ify includes
o   bcopy -> memcpy
    bzero -> memset
    bcmp -> memcmp
    index -> strchr
    rindex -> strrchr
o   Move timeout.h -> timer.h (making it consistent w/ timer.c)
o   Add -Wmissing-prototypes
1997-10-26 01:04:02 +00:00
Jordan K. Hubbard 217ebd5924 Fix typo in startup menu.
Submitted by:	max
1997-10-25 09:27:20 +00:00
Brian Somers 9a571ec74e sleep => nointr_sleep
usleep => nointr_usleep
(not just a #define)
Already done by: ache
1997-10-24 22:36:31 +00:00
Masafumi Max NAKANE cb48519127 Pkg_add refused to process package whose packing list contains @exec/@unexec
before any file names.  This change makes pkg_add to process those
packages if @exec/@unexec commands don't contain any %[fFB].  Also
enable @exec/@unexec that have %D if the installation prefix is known to
pkg_add.
Reviewed by:	jkh
1997-10-24 08:32:06 +00:00
Andrey A. Chernov 1f1d79b8fe Restore back non-interruptable sleep/usleep just redefine them to not
mix with standard library functions
1997-10-23 21:32:48 +00:00
Andrey A. Chernov cc2847b862 Remove private sleep/usleep hacks 1997-10-23 20:11:01 +00:00
Brian Somers 01db51af7a Fix various filter problems
PR:		4727
Submitted by:	Chiharu Shibata <chi@bd.mbn.or.jp>
1997-10-23 10:09:35 +00:00
Philippe Charnier 9cc5d92294 Use err(3). Add usage() and prototypes.
Hide reference to trsp(8) that does not exist.
1997-10-22 06:23:12 +00:00
Philippe Charnier 06457d2f32 Use err(3).
Sync man page and usage string.
Strcpy -> strncpy from OpenBSD.
-Wall cleaning.
Obtained from: OpenBSD
1997-10-22 06:20:04 +00:00
Brian Somers a9e8f80739 Fix HDLC logging (actually LogDumpBp()). It was only
outputting the first mbuf in the chain.
1997-10-22 01:22:51 +00:00
Peter Wemm 0c90be32da For safety's sake, explicitly depend all objects on the configvers.h header
to make sure that it's all recompiled even if there is no 'make depend'.
This is overkill, but should be one less thing that someone can do wrong.
1997-10-22 00:44:08 +00:00
Peter Wemm 463fb43b0a Recognize a %VERSREQ=nnnnn string in the system Makefile. Both config(8)
and the kernel will have a 'config interface version number'.  If an
incompatable change is made to the kernel that requires a rebuild of
config(8) (such as the cam devtab stuff), then the version number would be
bumped in both places.  If a user neglects to rebuild config, then they
will get a nagging (but non-fatal) warning that they need to rebuild
config.
1997-10-22 00:38:48 +00:00
Philippe Charnier b8b7e105a9 Cosmetic in usage string. 1997-10-20 12:55:49 +00:00
Philippe Charnier d9b1bc7779 Use err(3). Change err(-1,... to err(1,... 1997-10-20 12:53:54 +00:00
Philippe Charnier 0fc00685c3 Use err(3). Remove progname. 1997-10-20 12:51:34 +00:00
Philippe Charnier 1c95916129 Use err(3). Remove progname. Remove stli.4 with is a duplicate of stl.4,
use MLINKS instead.
1997-10-20 12:50:57 +00:00
Philippe Charnier 40d3f8a9fc Fix usage in man page. Remove progname. 1997-10-20 12:44:53 +00:00
Philippe Charnier 51fc70b565 Typo. 1997-10-20 12:43:03 +00:00
Philippe Charnier 03690a84cd Hardcode progname in usage string. 1997-10-20 12:41:41 +00:00
Jordan K. Hubbard 38769fc189 Document 100Mbit media selection flag. 1997-10-20 08:11:25 +00:00
David Greenman c49424985a "Fixed" pstat -T by avoiding the vnode stats. Disabled pstat -v since
we no longer support that sysctl (in my opinion, pstat -v is a security
hole in any case).
1997-10-19 18:41:23 +00:00
Joerg Wunsch e91727715c Fix a number of buffer overflow conditions.
PR:		bin/4610
Submitted by:	David Holland (dholland@burgundy.eecs.harvard.edu)
1997-10-19 10:42:39 +00:00
Jordan K. Hubbard 60ae49aa2a Fix disk counting bug.
Submitted by:	Arjan de Vet <Arjan.deVet@adv.IAEhv.nl>
1997-10-18 21:22:25 +00:00
Brian Somers 10cffc50d2 Add -redirect_port and -redirect_address to the
synopsis.
1997-10-18 16:31:28 +00:00
Joerg Wunsch 2cdfa5f477 Something that should have been done 2.5 years ago: install pcvt's
accompanying doc files into /usr/share/pcvt/.  (This goes to the `doc'
distribution, not `bin'.)
1997-10-18 10:40:02 +00:00
Jordan K. Hubbard 940d89a9d5 - do string-magic on the right variable when trying
to find dependent packages on the local disk (i.e. package given as
   filename, not URL)
 - document $PKG_PATH
 - use -v on pkg_add for dependent packages

Submitted by:	hubertf@NetBSD.ORG
Obtained from:	NetBSD
1997-10-18 05:54:17 +00:00
Jordan K. Hubbard 47af563ed0 Deal with PLIST_UNEXEC properly.
PR:		4784
Submitted by:	Stefan `Sec` Zehl <sec@quit.42.org>
1997-10-18 05:42:05 +00:00
Peter Wemm 43d887c508 Don't say that the filtering options are only available under NetBSD, and
don't claim that _any_ serial speed is settable, mention that it has to
be supported by the device driver.  Some have very flexible baud rate
selection (ie: based on divisors etc, such as the com ports), while others
have explicit baud rate choices.
1997-10-18 01:29:18 +00:00
Brian Somers ee5c6273d7 Ask for VJ slot id compression by default. 1997-10-17 00:20:30 +00:00
Brian Somers 331953abc2 cosmetic:
o  Log client connection commands when "set log +command"
o  Don't display PAP password in the log unless we're
   "set log +debug".
1997-10-16 23:55:19 +00:00
Joerg Wunsch 28185a1971 One could be surprised how much bugs can still be found here...
Properlay clean the global RM variable if cgetstr() failed for it.
Otherwise, a connection attempt to a remote machine was made (and a
bogus result code printed) if a local printer followed a remote one in
printcap, and you did a `lpq -a', since checkremote() falsely assumed
the printer to be a remote one.

While i was at it, removed a gratuituous newline printed in front of
the remote machine's name, thus making the output more consistent (and
better machine-parseable) now.
1997-10-15 12:16:37 +00:00
Philippe Charnier e015c87712 Use err(3). Add prototypes. 1997-10-15 06:43:54 +00:00
Philippe Charnier 619748d329 Use err(3). Rewrote man page in mdoc format. 1997-10-15 06:42:28 +00:00
Philippe Charnier 19112792f5 Add usage(). 1997-10-15 06:41:19 +00:00
Jordan K. Hubbard 382ac44b63 Fix various bogons reported in this PR.
PR:		4765
Submitted by:	fdiv
1997-10-15 04:37:26 +00:00
Brian Somers 30bbbd3edd Initialise LCP, IPCP and CCP as soon as LCP is down.
Without this, in -auto mode, we stay in ST_STOPPING
and never check our dial filters to see if it's time
to bring the line up again.

This may make "set stopped" redundant.
1997-10-15 01:01:17 +00:00
Jordan K. Hubbard 9addf1c150 Add a new startup variables menu for tweaking rc.conf variables in more
detail (also added more of them to the networking services menu).  Add
new dmenuISetVariable() function for interactive setting of non-boolean
flags.
1997-10-14 18:17:35 +00:00
Joerg Wunsch 83f31ab169 Improve my hack from rev 1.6 of displayq.c, and make the TCP
connection timeout controllable by a new printcap(5) capability named
`ct' (connectiom timeout), defaulting to 120 seconds (which is the
default TCP connection timeout).

Would anybody see a problem with merging all this into RELENG_2_2?
1997-10-14 16:01:02 +00:00
Jordan K. Hubbard 5b937d60ee Fix bogon I introduced while adding disks menu to label editor. 1997-10-14 14:41:17 +00:00
Jordan K. Hubbard 6ab2db5e53 Ask for extra confirmation if a newfs has been requested during
an upgrade.
PR:		3368
1997-10-13 17:32:29 +00:00
Jordan K. Hubbard 570f313ee4 Don't return from cleanup() - if it's removed the playpen then very
bad things will happen if we return to unsuspecting code.
Noted to my great dismay by:	Tim Vanderhoek <hoek@hwcn.org>
1997-10-13 15:03:55 +00:00
Jordan K. Hubbard e70709ad1a Consolidate distribution flag checking code. 1997-10-13 12:12:14 +00:00
Jordan K. Hubbard 1b5a372ee6 Allow access to options editor from media screen (sometimes you need it
there!).
1997-10-13 11:45:36 +00:00
Jordan K. Hubbard 7e1ff66d01 Only need to call label editor for all drives. 1997-10-13 11:33:27 +00:00
Philippe Charnier 11588fbd01 Use err(3). Add usage.
Use syslog instead of fprintf when being a daemon.
Change sprintf to snprintf obtained from OpenBSD.
Obtained from: OpenBSD
1997-10-13 11:27:55 +00:00
Philippe Charnier 7f1550ed10 Use err(3). Sync usage string and man page. 1997-10-13 11:24:01 +00:00
Philippe Charnier 1e96bb57a6 Use err(3). Remove multiply defined Id string. 1997-10-13 11:22:39 +00:00
Philippe Charnier fdd839012a Remove multiply defined Id string. Hide sccsid string. 1997-10-13 11:18:53 +00:00
Philippe Charnier df82e9ba02 Use err(3). Add usage() and #includes. 1997-10-13 11:13:33 +00:00
Philippe Charnier 5dbfe9a138 Use err(3). 1997-10-13 11:08:47 +00:00
Philippe Charnier 12873ebf56 Hide sccsid[]. Typo in man page. 1997-10-13 11:06:30 +00:00
Philippe Charnier 713fe15b36 Use err(3). Add prototypes. 1997-10-13 11:05:07 +00:00
Philippe Charnier aa40a0da51 Mdoc'ify man page. 1997-10-13 11:03:36 +00:00
Philippe Charnier 607b525c53 Use err(3). Add prototypes. Cosmetic in usage string. 1997-10-13 11:01:33 +00:00
Brian Somers 6f59cd11ea Un-spam ip_sum (arrgh - I don't know how this made
it into my patches :()
1997-10-12 21:43:55 +00:00
Wolfram Schneider 175dffc0f6 Delete ctm_scan program. There is no manpage for ctm_scan
and nobody use it.

Reviewed by: phk & Richard Wackerbarth
1997-10-12 19:58:53 +00:00
Jordan K. Hubbard 90a93ec643 Update to reflect current affairs. 1997-10-12 16:21:36 +00:00
Jordan K. Hubbard b09dc169b7 Separate the siamese twins that were the partition and label editor.
Now you can use one without entering the other and it will DTRT.
These changes just allowed me to do the most straight-forward new disk
installation I've ever managed with sysinstall.
1997-10-12 16:21:21 +00:00
Jordan K. Hubbard 1990badff5 Now that nested menus work properly, stop using the kludged-up
DITEM_RECREATE flag.
1997-10-12 12:11:14 +00:00
Masafumi Max NAKANE 062e5d5a43 Typo fix. 1997-10-12 11:51:25 +00:00
Brian Somers 0ebb52de1d Cosmetic: Mention that ppp is suspending before
executing a "shell" command.
1997-10-12 01:49:37 +00:00
Peter Wemm 79d2e30daf Give PPP_FILTER a whirl. 1997-10-10 11:59:02 +00:00
Peter Wemm 65201e4a29 Revive the connect-max-attempts option. When running in persist mode,
this limits the number of retries before aborting.  This can save
expensive phone bills. :-)  See rev 1.6 of main.c for original.
1997-10-10 09:28:38 +00:00
Philippe Charnier 6980f0ebac Use err(3). Silent -Wall. 1997-10-10 06:31:07 +00:00
Peter Wemm 5b51863fca Revive rev 1.10, which documents the secrets files overrides for the
local:remote IP addresses on the command line or the options.ttynn files.
1997-10-10 06:30:08 +00:00
Philippe Charnier 8b76e1d7a8 Staticize usage(). Cosmetics. 1997-10-10 06:27:07 +00:00
Philippe Charnier 1dcc6ec750 Use err(3) instead of local redefinition. Add rcsid string. 1997-10-10 06:23:42 +00:00
Peter Wemm 8298b5a8af Revive some things that were lost during the ppp-2.3.1 update.
- (see auth.c rev 1.13) allow the pap/chap secrets file to specify an
override for the otherwise hard coded IP addresses.  This allows specific
users to dial in on a rotary which would otherwise get a dynamic address
forced to authenticate and get their own fixed addresses.
- (see options.c rev 1.9) recognize the old dns1 and dns2 options.  This
is a hack (TM). :-)
1997-10-10 06:02:57 +00:00
Bill Paul bfb109df29 Fix bug in __yp_ping(): keep proper count of assigned request structures.
The test to see if a request struct had been assigned after looping
though the server list was bogus.

Submitted by: "Erik E. Rantapaa" <rantapaa@math.umn.edu>
1997-10-09 20:29:39 +00:00
Philippe Charnier d9961cfdb9 Use err(3). Add usage().
Default source of tables (-M) is /dev/mem, not /dev/kmem.
1997-10-09 07:22:08 +00:00
Philippe Charnier 4a9670dd76 Use err(3). Add usage().
Correct the .Nd string: in real life, portmap is translating rpc prog numbers
to darpa ports, not the opposite.
1997-10-09 07:17:36 +00:00
Jordan K. Hubbard 54b85ef5cc Document extra tk*/tcl* package categories. 1997-10-08 15:31:13 +00:00
Philippe Charnier 6fed414929 Use err(3). Cosmetics in usage string and man page. 1997-10-08 07:48:21 +00:00
Brian Somers 03604f3574 Support VJ maximum slot identifiers != 15.
Support VJ slot id compression.

Previously, ppp would negotiate a max slot between 2 & 15
(if asked), and would agree to slot id compression (if asked).
It would then proceed to use 16 slots and no compression
anyway.  The result was a rather unusable connection.
1997-10-07 00:56:58 +00:00
Joerg Wunsch 605efc874f Documentation for the LOG_NTP facility. While i was at it, added a
bit of a warning about not all systems providing for the same set of
syslog facilities.
1997-10-06 20:37:50 +00:00
Philippe Charnier fbe2a70d6b Sync usage string with man page. 1997-10-06 11:38:30 +00:00
Philippe Charnier 9dd6fd23cd Use err(3). Add usage()s. 1997-10-06 11:36:08 +00:00
Jordan K. Hubbard 690f1880b9 Add an extra sanity check to previous commit. 1997-10-06 08:36:12 +00:00
Jordan K. Hubbard c16f090408 This should put boot.help in its rightful place (finally!) 1997-10-06 08:34:56 +00:00
Philippe Charnier b8981f4416 Cosmetic in err() strings. 1997-10-06 07:46:08 +00:00
Peter Wemm d4b1403fc1 Hmm.. where did _that_ come from? :-) 1997-10-06 04:10:24 +00:00
Warner Losh ed4d1cf9cc Be more paranoid about unlinking files. From mhpower@MIT.EDU by way of
Theo de Raadt.

Likely 2.2.5R candidate.
Obtained from: OpenBSD
1997-10-06 03:58:48 +00:00
Jonathan M. Bresler 0fee58d9fa record the envelope-from address in the received headers
for all mail received at hub.freebsd.org

Obtained from: Peter Wemm <peter@freebsd.org>
1997-10-06 00:09:17 +00:00
Brian Somers e70c96ab58 Change things around a bit when bringing down the layers.
o LcpLayerDown() no longer does a NewPhase(PHASE_TERMINATE).
  Instead, it's done in LcpLayerFinish().  LayerFinish() gets
  called by the FSM after the LCP FSM goes through the Stopping
  and Stopped states.

o -direct and -background mode exit at PHASE_TERMINATE, not
  PHASE_DEAD.

The result is that LCP, CCP & IPCP are brought down cleanly on both
sides of the link (not just our side).  Killing ppp rather than just
closing it still makes it get out after the LCP SendTerminateReq().
I'll have a look at that soon.  We're probably not actually sending
the REQ :-(
1997-10-05 15:00:10 +00:00
Brian Somers d37641d82c Refer a bit to pppctl.
Suggested (far to subtly for his own good) by:	joerg
1997-10-05 14:27:08 +00:00
Brian Somers ea895c156b Add a few examples. 1997-10-05 14:21:30 +00:00
Joerg Wunsch 42ac3bf16a Add a new special called `keep' to the list of special options. It
provides for a means to specify an argument for crunchide's -k option.
(This is required by ntpdate.)

Submitted by:	peter@rhiannon.clari.net.au (Peter Hawkins)
1997-10-05 13:35:05 +00:00
Jordan K. Hubbard cf68251b3a DOH! I cannot believe that none of us caught this. Do *not*
turn TCPWRAPPER support on by default, eh? :-)
1997-10-05 12:31:08 +00:00
Wolfram Schneider 87ce848491 Cleanup. 1997-10-05 12:28:02 +00:00
Brian Somers 6c9e376dfe Cosmetic: Be specific about using TABs in syslog.conf. 1997-10-05 10:29:32 +00:00
Jordan K. Hubbard 97fe7f477f Changes to support full make parallelism (-j<n>) in the world
target.
Reviewed by:	<many different folks>
Submitted by:	Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>
1997-10-05 09:40:24 +00:00
Jordan K. Hubbard ac492f4554 Whups! Missed a spot in the kerberos src changes. 1997-10-04 15:50:09 +00:00
Peter Wemm feee4d201e Record the envelope from address in the received: line. This has turned
out to be very useful for spam tracking and other problem debugging.

I first noticed this in one of Paul Vixie's machine's headers a while ago.
1997-10-04 11:10:19 +00:00
Jordan K. Hubbard c646fc1cfa Un-nuke krb and do what I *meant* to do, darn it. 1997-10-04 09:01:20 +00:00
Jordan K. Hubbard 1de31251a4 Adapt for new crypto source layout. 1997-10-04 08:58:16 +00:00
Brian Somers 57fd05c48b Cosmetic: Log a strerror(errno) when failing to write to
the tun device.
1997-10-04 00:14:39 +00:00
Jordan K. Hubbard 4a0aa46197 Get boot.help from a different place. 1997-10-03 14:14:40 +00:00
Jordan K. Hubbard 7fd698d732 Don't attempt to deref OpenConn after it's been set to NULL. :) 1997-10-03 14:00:09 +00:00
Jordan K. Hubbard 6cf4a83ec5 For people running paranoid ftpds, use the real username to log in
with when running multi-user and we actually have one.
Suggested by:	Joao Carlos Mendes Luis <jonny@coppe.ufrj.br>
1997-10-03 03:32:03 +00:00
Philippe Charnier 2d7a5bff3b Use err(3). 1997-10-02 11:46:53 +00:00
Philippe Charnier 0fc81af12d Use err(3). Change firewall to firewall_enable in man page according to
/etc/rc.conf.
1997-10-02 11:43:33 +00:00
Philippe Charnier 5848fd5f35 According to Bruce, err(-1,..) is bogus. Change it to err(1,..). More commits
to come in this area.
1997-10-01 06:34:09 +00:00
Philippe Charnier de1ef5eb94 Use err(3) instead of local redefinition. 1997-10-01 06:30:02 +00:00
Philippe Charnier a89409a2eb Use err(3). -Wall cleaning. 1997-10-01 06:27:34 +00:00
Jordan K. Hubbard 0c795d27ea Keep fingers off /etc files until they're properly backed up.
PR:		4636
Submitted by:	Jack <jack@zeus.xtalwind.net>
1997-10-01 01:30:35 +00:00
Philippe Charnier 6ee8ae607a Use err(3). Add usage(). Rewrote man pages in mdoc format. 1997-09-30 06:15:23 +00:00
Brian Somers 8bfa2d0ed9 If "set mtu" is used, *and* the mtu is less than the
value requested by the peer, NAK using this value
rather than silently just changing the interface
mtu.
1997-09-29 19:40:16 +00:00
Wolfram Schneider bf5cbf3551 Sort cross refereces in section SEE ALSO. 1997-09-29 19:11:55 +00:00
John Polstra 7a6b5d25b7 Correct the description of the output from the "-s" option. It was
backward.
1997-09-29 17:43:11 +00:00
Wolfram Schneider 2af22b06a4 Endless loop.
$ vipw
[corrupt a line in editor, exit editor]
pwd_mkdb: corrupted entry
pwd_mkdb: at line #2
pwd_mkdb:
/etc/pw.012585: Inappropriate file type or format
re-edit the password file? [y]: n^D^D
[hang]
1997-09-29 13:13:51 +00:00
Philippe Charnier cd94e9c368 Use err(3). 1997-09-29 06:38:49 +00:00
Jordan K. Hubbard 26a695079e Add ftp4.uk.freebsd.org 1997-09-29 00:15:07 +00:00
Brian Somers 4e556546a8 Test for the existence of ../../secure rather
than /usr/include/des.h before building with MSChap.
support.  Also allow -DNOCRYPT (as well as -DNOSECURE)
as an override
sbin/init example pointed out by: bde
1997-09-28 20:17:59 +00:00
Mark Murray 14710273ac Add (commented out) macros to make compiling with tcpwrappers easier. 1997-09-28 09:31:43 +00:00
Brian Somers fde958c3d3 Don't depend on time.h including sys/types.h 1997-09-27 19:41:40 +00:00
Brian Somers f0d4fed251 Don't login twice when using passwdauth
Suggested by:	Peter Childs <pjchilds@imforei.apana.org.au>
Merge the whole module into a few lines in pap.c
1997-09-27 19:11:43 +00:00
Tim Vanderhoek a04aa72155 Document pkg_add's dependency auto-install. While I'm here, fix
a couple typos, and consistent double-spacing after sentences.

This is actually a spinoff from the "ports-current discontinued"
blow-up some time ago.

Ack'd by: jkh
1997-09-27 13:41:35 +00:00
Brian Somers 252715a39c #define RECON_ENVOKED as 4 (not 3, like RECON_UNKNOWN)
Pointed out by:	tom@tomqnx.com (Tom Torrance at home)
1997-09-26 00:23:36 +00:00
Philippe Charnier ec175ced96 Use err(3). Add missing parameter for printf() (reviewed by steve). 1997-09-25 06:47:33 +00:00
Philippe Charnier 07e1d533fd Remove unused variables. Lowercase err() strings. 1997-09-25 06:44:39 +00:00
Philippe Charnier 997485f93c Put includes in alphabetical order. Use fprintf() in usage(). 1997-09-25 06:42:30 +00:00
Philippe Charnier f9b1ba8f7f Stylistic changes in man page. 1997-09-25 06:38:17 +00:00
Philippe Charnier fe577fe939 Use err(3). 1997-09-25 06:36:29 +00:00
Brian Somers 0f8e0938a0 Do the MSChap encryption.
Submitted by:	Gabor Kincses <gabor@acm.org>
1997-09-25 00:58:20 +00:00
Brian Somers 7351f9d8e8 Allow Microsoft CHAP authentication.
This is a combination of MD4 & DES.
Submitted by:	Gabor Kincses <gabor@acm.org>
1997-09-25 00:52:37 +00:00
Philippe Charnier 9b3fe531b5 Use err(3). Add usage(). Various fixes in man pages. 1997-09-24 06:48:24 +00:00
Philippe Charnier e2954565f3 Statisize usage(). Add return(0) for -wall. 1997-09-24 06:44:12 +00:00
Andrey A. Chernov c997889e4b Compact usage string, devices list can be too long 1997-09-23 23:24:13 +00:00
Brian Somers c06022153e Don't luse uu_lock in -direct mode. It conflicts w/
hylafax & the like.
Get the CD bit right at last - now that I've got
my second modem back - loss of carrier makes ppp exit.
1997-09-23 22:07:51 +00:00
Brian Somers 3f1125194b Undo botched commit (local changes got in) 1997-09-23 19:52:14 +00:00
Nate Williams a12f9b749f - Bump up the size of the space for strings read from PCMCIA cards. Newer
cards have longer entries.

Submitted by:	Lars Fredriksen <lars@fredriks-1.pr.mcs.net>
1997-09-23 19:51:32 +00:00
Philippe Charnier fa6990870e Use err(3). Add usage() and prototypes. 1997-09-23 06:38:54 +00:00
Philippe Charnier ecdf56e7d9 Use err(3). Put includes in alphabetical order.
Rewrote man page in mdoc format.
Document -v and -p flags.
1997-09-23 06:36:27 +00:00
Philippe Charnier 330f19d310 Use err(3). Make it -Wall friendly. Typo fix in man page. 1997-09-23 06:32:33 +00:00
Brian Somers 301127fb0a Don't allow accept/deny when it's not appropriate.
Log PAP/CHAP users in utmp & wtmp, allowing it to
be avoided with "disable utmp"
1997-09-22 23:59:16 +00:00
Masafumi Max NAKANE 1a17a85ecb Typo fix.
PR:		4594
Submitted by:	Masahiro Sekiguchi <seki@sysrap.cs.fujitsu.co.jp>
1997-09-22 10:12:47 +00:00
Jordan K. Hubbard 3887aa4e23 If we're going to blindly install freebsd.cf from the etc-sendmail.cf
rule then we'd better depend on it.
1997-09-22 07:33:14 +00:00
Philippe Charnier 71b906885d Use err(3). Put includes in alphabetical order. Use .An macro. 1997-09-22 06:30:04 +00:00
Brian Somers 586526be29 Don't pause for one second before starting LCP
negotiation.  Instead, incrementally pause after
receiving LCPs with the same magic.  We can now
suffer a server that waits more than 1 second before
responding.  Pauses greater than a second get
hopelessly confusing as when the server eventually
starts, it sees a flood of Config Requests followed
by config NAKs and changes of magic.  This causes the
server to change its magic over and over.....
1997-09-22 02:51:24 +00:00
Brian Somers 3defb7fc30 Use the correct device name in "show modem" 1997-09-22 00:55:46 +00:00
Brian Somers 35495bec8d Correct the way the uucp lock file and the ttyXX.if lock
file get created.  We don't create lock files over non-tty
connections, but we *do* create lock files in -direct mode.
This leaves us capable of adding utmp/wtmp support for
successful pap & chap logins (coming soon).
1997-09-22 00:46:56 +00:00
Brian Somers 94cad8bcb1 Sleep for a second before sending the first LCP
config request.  This stops us from squirting stuff
down a line that still has ECHO turned on because the
peer hasn't had a chance to start yet.
Lead to the cause by:	Greg Lehey <grog@lemis.com>
1997-09-21 23:01:34 +00:00
Justin T. Gibbs 93384faa4c Add isa_devtab_cam. 1997-09-21 22:12:50 +00:00
Brian Somers c47cab6191 It turns out that the following:
close(1);
  close(2);
  x = open(ctermid(NULL), O_RDWR|O_NONBLOCK);
  close(0)
on a tty causes select() to return an exception for descriptor x !
This is the case in RELENG_2_2, but not in 2.2.2.  I'm not sure why.
Instead of doing the x=open() and close(0), we just do x=0 now.
Problem pointed out by: Greg Lehey <grog@lemis.com>
                        Tomi Vainio <tomppa@fidata.fi>
1997-09-21 20:26:47 +00:00
Brian Somers 705c7a18f9 Typo police
Submitted by:	Mark Cammidge <mark@gmtunx.ee.uct.ac.za>
1997-09-21 13:08:00 +00:00
Brian Somers 599864f851 Add a pppctl(8) xref.
Suggested by:	joerg
1997-09-21 13:06:43 +00:00
Wolfram Schneider f2b7396852 Add ypwhich(1) and yppoll(8) manual pages.
Obtained from: NetBSD, slightly modified
1997-09-21 11:49:18 +00:00
Wolfram Schneider d95fc683ed Chown(8) compiled with -DSUPPORT_DOT (backward compatibility) does
first check for a `.' and then for `:' as a delimiter.
Usernames with a dot will fail.

# chown r.r:bin /tmp/bla
chown: r:bin: illegal group name

Fix: first check for a `:' and then for a `.'
1997-09-21 09:13:57 +00:00