Commit Graph

7533 Commits

Author SHA1 Message Date
Brian Somers
f48ce56286 Preprocess ppp.8.m4 into ppp.8, taking into account any compile time
options used to build ppp.

Currently, this is a no-op and only handles LOCALNAT and LOCALRAD cases.

This will be used for the upcoming ipv6 changes, and allows a shared
man page between OpenBSD and FreeBSD.
2001-08-11 18:27:14 +00:00
Robert Watson
86a02c1326 Somewhere along the way, configSecurityModerate() lost it's "int"
return value.

Spotted by:	gratuitous use of diff during MFC process
2001-08-11 03:26:52 +00:00
Robert Watson
614af3941d o Reduce the number of offered security profiles, as we now have a more
conservative default, and actually prompt specifically for inetd rather
  than handling it as a side effect of the security profile.  Update the
  help file to reflect this change.
o Rename "Fascist" to "Extreme" in the source code, to match the names
  presented to the user.
o Remove portmap and inetd from profile management.  Portmap is now
  disabled by default, but automatically turned on if a feature requires
  it (such as NFS, etc).

This is an MFC candidate for 4.4-RELEASE.

Reviewed by:	freebsd-arch@FreeBSD.org
Approved by:	re@FreeBSD.org
MFC after:	2 days
2001-08-10 23:57:43 +00:00
Brian Somers
915ce3bc2a Change copyright to BSD-style copyright.
Ok'd by:	Gabor Kincses <gabor@acm.org>
2001-08-10 17:42:58 +00:00
Ruslan Ermilov
94ba280c59 mdoc(7) police: join split punctuation to macro calls. 2001-08-10 17:35:21 +00:00
Ruslan Ermilov
c75526d5a0 mdoc(7) police: fixed the "new sentence" bogons. 2001-08-10 15:03:10 +00:00
Ruslan Ermilov
57e4378bf6 mdoc(7) police: protect trailing full stops of abbreviations
with a trailing zero-width space: `e.g.\&'.
2001-08-10 13:45:36 +00:00
Ruslan Ermilov
6bd44d4d24 mdoc(7) police: fix markup and a SYNOPSIS bug from revision 1.24. 2001-08-10 10:45:59 +00:00
Warner Losh
4a421c5ff0 Incorporate feedback about the level of security that WEP gives you:
Not much, but it is better than nothing as it discourages
	the extremely lazy.
Please read the actual text (the last text was softer than the commit
message about it) before giving me feedback.

Also, in the last commit I also tagged the newly optional elements in
the command line as optional.
2001-08-10 04:17:55 +00:00
Robert Watson
f5ad562c54 Return DITEM_SUCCESS from configInetd(), as apparently a success or
failure value is expected.

Spotted by:     gcc
2001-08-10 02:23:10 +00:00
Warner Losh
df7f96d98d Add a note that says:
WEP IS INSECURE.  DO NOT USE IT.
and point people to details on the attack:
	http://www.cs.rice.edu/~astubble/wep/wep_attack.html
and recommend people use ipsec instead if possible.

Approved by: kris

Mandoc police: Please do your worst.  I'd like to merge similar text
into ancontrol and ifconfig.
2001-08-09 21:59:07 +00:00
Munechika SUMIKAWA
220f01cd2d Do not delete 'goto ours' routes when using -c option.
Obtained from:	KAME
2001-08-09 19:40:35 +00:00
Doug Barton
040eea4cc8 Expand the usage info to include the possible options for -i,
and fix the printf so that the line actually gets printed.
2001-08-09 18:12:07 +00:00
Dima Dorfman
8c37834db2 Don't free memory that was never allocated. This fixes a core dump in
the case where both the config file and the default MTA don't exist.

PR:		29521
Submitted by:	marius@alchemy.franken.de
2001-08-09 06:20:18 +00:00
Eric Melville
6c90a5164d Make menu text match menu button labels. 2001-08-08 22:49:27 +00:00
Kris Kennaway
e936510703 Whack this code with the Blessed Wand of Stack Protection.
MFC After:	1 week
2001-08-08 22:27:02 +00:00
Sheldon Hearn
42abf713c9 can not -> cannot 2001-08-08 18:32:06 +00:00
Ruslan Ermilov
6575e6daae mdoc(7) police: expand plain text xrefs. 2001-08-08 11:48:28 +00:00
Ruslan Ermilov
c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
Andrey A. Chernov
cf9da17cbb Apply pending /etc/ttys changes before calling editor on it
Approved by:	rwatson
2001-08-07 15:13:42 +00:00
Ruslan Ermilov
eb9fc72525 mdoc(7) police: markup nits. 2001-08-07 13:59:48 +00:00
Ruslan Ermilov
10a70ebafc mdoc(7) police: removed hard sentence breaks. 2001-08-07 13:56:00 +00:00
Ruslan Ermilov
794e35a1a9 s/should must/must/ plus markup nit. 2001-08-07 13:50:36 +00:00
Robert Watson
f3ea28cb07 In preparation for MFC of sysinstall changes to edit /etc/ttys in
post-install config, reduce the potential confusion from the existence
of both configTTYs and configTtys by renaming configTTYs to
configEtcTtys.  While this is not a C naming conflict, it was probably
a poor choice of names on my part.
2001-08-07 12:48:17 +00:00
Doug Barton
e4a9231de9 Hopefully squish the problem of mm creating sendmail files in
the source tree once and for all.

Pointed out by: A cast of thousands

Reviewed by:	asmodai
2001-08-07 06:22:12 +00:00
Kris Kennaway
1e1bbe0f97 Recognise @option directives instead of falling through to the default
"unknown command" clause.

PR:	29262
2001-08-06 20:09:26 +00:00
Hajimu UMEMOTO
232bdaf61f printed current sequence number of the SA. accordingly, changed
into sadb_x_sa2_sequence from sadb_x_sa2_reserved3 in the sadb_x_sa2
structure.  Also the output of setkey is changed.  sequence number
of the sadb is replaced to the end of the output.

Obtained from:	KAME
2001-08-06 19:40:01 +00:00
Jonathan Chen
974a54a2cd Fix logic error resulting in incorrect calculation of login time
PR:		bin/4204
Submitted by:	Anatoly A. Orehovsky <tolik@www.tomsk.su>
MFC after:	4 weeks
2001-08-05 09:41:20 +00:00
Dima Dorfman
08a92bd809 It's bad enough to capitalize the name of the executable at the
beginning of the sentence, but at the very least it shouldn't be done
in the middle of a sentence!
2001-08-04 22:11:08 +00:00
Mark Murray
6adf353a56 Don't clobber CFLAGS.
Submitted by:	bde
2001-08-04 21:48:18 +00:00
Thomas Moestl
5fc5ae5cdd Make use of the new features of libdevstat to allow iostat to work on
crash dumps, and make it use sysctl for all data retrievals in the
"live" case (i.e. when not using iostat on a crash dump).
Remove setgid kmem for the iostat executable, it is not needed any
more after these changes.

Reviewed by:	ken
2001-08-04 18:30:54 +00:00
Gregory Neil Shapiro
2325431216 Convert to using the same method of detecting the secure directory as other
usr.sbin programs.

Noted by:	markm
2001-08-03 16:22:47 +00:00
Sheldon Hearn
f42dadce1e Miscellaneous fixes.
In particularly, the -h and -m flags were incorrectly described.
2001-08-03 11:31:39 +00:00
Brian Somers
d8c3658bb5 Warn when a CHAP81 SUCCESS packet is invalid due to an incorrect S= value. 2001-08-03 09:28:21 +00:00
Ian Dowse
146e669b8d Fix a few bugs, some of which I introduced in recent commits:
- clean_mtab():
    Actually use the strdup'd version of the host that we go to the
    trouble of creating.
- do_umntall/do_umount:
    Don't return success if clnt_create() fails.
    Don't access a client pointer after it has been destroyed.
    Remember to destroy the authentication information we created.
2001-08-02 21:46:21 +00:00
Brian Somers
1a40cd082a The wrong-last-byte bug on win98 chap responses is also in winME 2001-08-02 20:12:48 +00:00
Maxim Sobolev
ea0cdbc8ac exists(../../crypto) --> exists(${.CURDIR}/../../crypto)
MFC after:	1 month
2001-08-02 18:21:48 +00:00
Jonathan Chen
f0b8b1fccb fix for pkg_add to symlinked prefix directories that are more than 1 link deep.
PR:	bin/28274
Submitted by:	John Hein <jhein@timing.com>
MFC after:	1 month
2001-08-02 18:20:27 +00:00
Andrey A. Chernov
bd376a3487 Allow configTtys() be called several times - set VAR_CONSTERM to "NO" after
operation done.
2001-08-02 16:36:21 +00:00
Maxim Sobolev
a8ec1b4851 Fix a cryptoless world by disconnecting libmp from the build when there is no
crypto bits installed and/or NOCRYPTO/NO_OPENSSL is defined. This unfortunately
meants that usr.bin/chkey, usr.bin/newkey and usr.sbin/keyserv have also to
be disconnected.

IMO it is merely a workaround, the proper solution is to move libmp to
src/crypto where it belongs and use libgmp for the cryptoless builds instead.

Missed by:	dd
2001-08-02 15:47:03 +00:00
Maxim Sobolev
3d02d34c75 Cosmetics: replace dozen instances of "(tmp = getenv(PKG_DBDIR) ? tmp : DEF_LOG_DIR)"
with macro.

MFC after:	1 month
2001-08-02 13:13:06 +00:00
Maxim Sobolev
a48179c2fa Cosmetics: kill blank lines at the end of file.
MFC after:	1 month
2001-08-02 13:08:43 +00:00
Maxim Sobolev
2d800f2bd9 Usability tweak:
Use '' quotes instead of `' to delimit names of files and packages in
  warning and error messages, because it is easier to cut-n-paste name in
  question that way (single click) without confusing the shell. And yes,
  I know that it is less eye-candy...

MFC after:	1 month
2001-08-02 12:38:29 +00:00
Maxim Sobolev
94d81832dd When there is a file that can't be deleted due to checksum mismatch print name
of that file to stdout to simplify debugging. IMO it was a mistake to print
this warning only when `verbose' mode is on.

MFC after:	1 month
2001-08-02 12:19:32 +00:00
Brian Somers
686e8c8b12 Add a ``nat punch_fw'' command for punching FTP and IRC DCC holes through
the firewall.
2001-08-02 10:16:32 +00:00
Warner Losh
e61693305c Only try to allocated properly aligned I/O segments. This should stop
some of the config problems that we've been seeing (where wi0 tries to
allocate 0x138-0x198, for example).

Use err(1,"foo") rather than perror + exit while I'm here.
2001-08-02 07:06:32 +00:00
Robert Watson
c17d6a73f2 Add the ability to modify /etc/ttys before first reboot during the
system installation process.  This allows users installing via serial
console to enable serial console login during the installation
process using an un-customized install.  The user is not prompted to
modify /etc/ttys during a normal install, but is offered the
opportunity during post-install configuration.

- Introduce configTTYs(), which describes the benefits of editing
  /etc/ttys, and asks for confirmation before spawning the editor.
- add configTTYs to the post-install configuration, as well as to
  the global configuration index.
2001-08-02 03:53:36 +00:00
Robert Watson
0c09bcb0e8 Compensate for default disabling of network services in inetd.conf(5)
by providing the opportunity to edit inetd.conf during the system
installation process.  The following modifications were made:

(1) Expand the Anonymous FTP description dialog to indicate that inetd
    and ftpd must be enabled before it can be used.

(2) Introduce a new configInetd() pair of dialogs, the first describing
    inetd, giving a couple of examples of services that require it, and
    hinting at potential risk, then asking the user if they wish to
    enable it.  The second indicates that inetd.conf must be configured
    to enabled specific services, and asks if the user would like to
    load inetd.conf into the editor to modify it.  Add this
    configuration action to the index.

There are some further improvements that might be considered:

(1) Provide a more inetd.conf-specific configuration tool that speaks
    inetd.conf(5).  However, this is made difficult by the "yet another
    configuration format" nature of inetd.conf, as well as its use of
    commenting to disable services, rather than an in-syntax way to
    disable a service without commenting it out.  Submissions here
    would probably be welcome.

(2) There's some overlap between settings in the somewhat obtuse
    Security Profile mechanism and other settings, including the inetd
    setting, and NFS server configuration.  As features become
    individually tunable, they should probably be removed from the
    security profile mechanism.  Otherwise, somewhat counter-intuitively,
    sysinstall (in practice) queries multiple times whether inetd, nfsd,
    etc, should be enabled/disabled.  A possible future direction might
    be to drive profiles not by degree of paranoia, rather, the set
    of services desired.  Or simply to remove the Security Profile
    mechanism and resort to feature-driven configuration.

Reviewed by:	imp, chris, jake, nate, -arch, -stable
2001-08-02 03:25:16 +00:00
Guy Helmer
3b62c20eda Add "use Fcntl" to resolve O_RDWR|O_CREAT|O_EXCL macros used in
new sysopen call.

PR:		29366 (in part)
2001-08-01 16:32:36 +00:00
Guy Helmer
80b9c37313 Install the new password file with pwd_mkdb, not the old one.
PR:		29366 (in part)
2001-08-01 15:27:39 +00:00
Sheldon Hearn
86f478757a MFS: in HISTORY section, fix release number of first appearance 2001-08-01 12:15:21 +00:00
Brian Somers
317e74fd2b Don't include a NUL at the end of our CHAP SUCCESS packet.
When encryption (MPPE) is enabled, WindowsME and Windows98 both
fail because of the extra byte, suggesting that they autheticated
successfully in their log and then dropping the connection, telling
the user that the peer doesn't support compatible encryption
options.

MFC after: 1 week
2001-07-31 21:36:00 +00:00
Eric Melville
b8ae14f673 Reword for consistency. 2001-07-31 21:30:57 +00:00
David E. O'Brien
904cc0c45c jhb says a 10 line change containing casts is more invasive than a 28 line
change.
2001-07-31 16:25:55 +00:00
Jeroen Ruigrok van der Werven
fdc0360913 Logging should wind up in /var/log, not /etc/ppp/.
PR:		11989
Submitted by:	Phil Homewood <phil@rivendell.apana.org.au>
MFC after:	1 week
2001-07-31 16:09:29 +00:00
Brian Somers
65cacad456 Remove an irritating diagnostic emitted to LogPHASE when a
static proxy arp entry is deleted.

Rename a function (for consistency) and remove some whitespace
(for readability).

MFC after:	1 week
2001-07-31 15:19:07 +00:00
Brian Somers
ed09c8a4a0 When we receive a CHAP81 challenge response, we always expect the last
byte of the packet to contain '\0'.

Windows 98 gets this wrong, dropping garbage into the last byte and
failing authentication.

Now, we notice this and whinge to our log file that we're compensating
for the corrupt data.
2001-07-31 08:21:39 +00:00
Warner Losh
712f16e96c Have pccardd always ask the kernel for the IRQ to use. The kernel
will soon return the irq from the pcic bridge in cases where't that's
appropriate.

Note: I've had to disbale -I option for the moment.  I've made it easy
to reenable it for people that need it.

MFC After: soon!
2001-07-31 06:12:01 +00:00
Eric Melville
7ddbe3a0c0 Remove an accidental comma that managed to creep in with the last commit. 2001-07-31 04:14:44 +00:00
David E. O'Brien
f1d4135bd9 Use the POSIX syntax for chown.
Submmited by:	garrett
2001-07-30 23:26:19 +00:00
Thomas Moestl
6ed5918a25 Fix the third argument to sysctlbyname() to be of the type size_t *
(instead of int *).

MFC after:	2 days
2001-07-30 21:42:26 +00:00
Jordan K. Hubbard
c6934947db If we're set to non-interactive, we shouldn't ask the user yes/no questions
but simply return the default answer instead.
2001-07-30 20:45:54 +00:00
Garrett Wollman
ef404327b0 Simplify (and hopefully clarify) some date-parsing arithmetic. 2001-07-30 18:27:21 +00:00
Brian Somers
5a0827311e If the peer REJects our MRU REQ, stop REQing it -- *EVEN* if we're
doing PPPoE and the default MRU is therefore too big.

When negotiating with win2k, we ask for MRU 1492 and the win2k box
NAKs us saying ``MRU 1492''.  This doesn't make sense to me.  When
we continue to request MRU 1492, the win2k box eventually REJs our
MRU.  This fix allows negotiations to continue at that point,
bringing the link up and potentially allowing the win2k box to send
us frames that are too large.  AFAICT this is better than failing
to bring the link up.... probably !

I have no idea how to do the equivalent of ``route get'' or
``ifconfig -a'' under win2k, so I can't tell what MTU it actually
ends up using.

I believe the bug is in win2k (it's certainly mis-negotiating).
I'll MFC given the release engineers permission as code freeze
begins on August 1.

PR:		29277
MFC after:	3 days
2001-07-30 17:04:39 +00:00
Brooks Davis
cd2b9510b7 Make spacing consistant and set WARNS correctly. 2001-07-30 17:01:44 +00:00
David E. O'Brien
4c9237c908 style(9) 2001-07-30 16:27:16 +00:00
Guy Helmer
15bfd2c9b9 The variable giving the name of the temporary password file was
inconsistently named "ptmp" and "etc_ptmp".  This commit changes
it to "passwd_tmp" for consistency and to match OpenBSD's name
for the variable.

Consulted with: jedgar
2001-07-30 16:23:56 +00:00
David E. O'Brien
9674b13dcb WARNS-2'ify.
(this included removing the funny "if (unsigned_var < 0)" test)
2001-07-30 15:41:20 +00:00
David E. O'Brien
e12f0d2fac Add the ability to Bzip2 your logs.
PR:		27901
Submitted by:	Anders Nordby <anders@fix.no> (stylistic changes by me)
2001-07-30 15:17:17 +00:00
Bruce Evans
6ab657cc56 Fixed bitrot in DPADD in previous commit. The previous commit changed
LDADD to link to a correct copy of libkeycap but didn't change DPADD
to match.
2001-07-30 11:38:35 +00:00
Bruce Evans
7d1b1514e6 Fixed bitrot in DPADD in previous commit. 2001-07-30 11:18:09 +00:00
Dima Dorfman
7bd0b86765 Enable the new libmp in the build, and disable libgmp and its
henchmen.
2001-07-29 08:58:22 +00:00
Brian Somers
fe17bea378 Change permissions back to 4554/554
Suggested by:	kris
2001-07-28 11:58:41 +00:00
Brian Somers
5e3b2d6847 If the peer sends a REQ without the IPADDR option, only reject it
once.  If they repeat the request (again without the IPADDR option)
ACK it.

I've had reports that some ppp implementations will not assign
themselves an IP number.  This should negotiate with such things.

MFC after:	3 days
2001-07-28 11:32:08 +00:00
David E. O'Brien
43b866b0ed The security officer requested this be backed out for discussion. 2001-07-28 04:44:09 +00:00
David E. O'Brien
2bae1ab6a5 Remove s_strl*(). I am not sure what was thought they accomplished.
When reading the code I had to stop, say "ok, what does *these*
modifications of strl*() do?  Pull out grep.  Oh, not in add/, maybe above
in ../lib/?  Yep.  So what do they do?  Comments above them are misleading,
guess I'll have to read the code.  Oh, they just test strl* against the
size and return the result of the test.  Now I can continue to read the
code I was.

The uses of s_strl*() then test that result and errx()'s.
Lets think about the "optimized" code I am removing:

In general the compiler pushes the three args to strl* onto the stack and calls
s_strl*.  s_strl* has to indirectly access 3 args from the stack.  Then push
them on the stack a 2nd time for the real strl* call.  s_strl* then pops the
return from strl* off the stack; or moves it from the register it was returned
in, to the register where tests can happen.  s_strl* then pops the three
arguments to strl*.  Perform the test, push the result of the test, or move it
from the result register to the return value register.  The caller to s_strl*
now has to either pop the return value of s_strl* or move it from the return
value register to the test register.  The caller then pops the three args to
s_strl* off the stack (the same args that s_strl* itself had to pop off after
the real call to strl*).  The s_strl* caller then performs a simular test to
what has already been done, and conditionally jumps.  By doing things this way, we've given the compiler optimizer less to work with.

Also, please don't forget the that call to s_strl* has possibly jumped to code
not in the cache due to being far away from the calling code, thus causing a
pipeline stall.

So where is the "optimization" from s_strl*?
It isn't code clarity.
It isn't code execution speed.  It isn't code size either.
2001-07-28 01:59:58 +00:00
Brooks Davis
b7d617e742 Make ancontrol WARNS=2 clean. 2001-07-27 18:26:42 +00:00
Warner Losh
c5a7a65261 Improve wording for pccard memory assignement.
Document intended correct behavior for pccardc power and how it interacts
with suspend/resume.
2001-07-27 06:32:20 +00:00
Brooks Davis
c22d511680 Remove -traditional from CFLAGS and add unistd.h to header.h so this
actually compiles.  Hopefully, this code didn't rely on some weird
side effect of -traditional.
2001-07-27 04:40:04 +00:00
Bill Fenner
83d4b03c15 Use alignment-safe code on non-i386 architectures. 2001-07-26 21:54:47 +00:00
Kris Kennaway
371af8a555 Only match the first osreldate date range for constructing the FTP URL,
not all of them.

Noticed by:	obrien
2001-07-26 20:25:50 +00:00
Brian Somers
525b58c9ce Handle peer REQ/NAKs of >1500 byte MRUs when we have no preference.
MFC after: 3 days
2001-07-26 11:33:53 +00:00
Sheldon Hearn
e1b4d8d074 Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.

Submitted by:   David Hill <david@phobia.ms>
2001-07-26 11:02:39 +00:00
Eric Melville
4743a2b7c2 Remove duplicate cvs tag. 2001-07-26 07:26:39 +00:00
Eric Melville
08c5ff18e9 Update sysinstall menu texts to reflect the new key behavior.
Approved by:	jkh
2001-07-26 07:17:27 +00:00
Chris D. Faulhaber
eea11e0277 Use a safer method of creating the temporary password file.
Submitted by:	dynamo@harvard.net
Obtained from:	OpenBSD
MFC after:	3 days
2001-07-25 11:55:33 +00:00
Brian Somers
1e0a94b6a0 Change permissions from [4]554 to [4]551
MFC after: 3 days
2001-07-25 11:44:04 +00:00
Bill Fumerola
fd522d40d8 fix misspelling introduced in rev 1.14 (sames as -> same as) 2001-07-25 04:13:01 +00:00
Kris Kennaway
fd96447ad0 Replace strncpy -> strlcpy
Obtained from:	OpenBSD
MFC after:	1 week
2001-07-24 11:36:56 +00:00
Kris Kennaway
e9c56664e7 Install this mode 4550 owned by group dialer; there is unsafe code
in the signal handlers which may pose a risk when executable by untrusted
users.

Submitted by:	Przemyslaw Frasunek <venglin@freebsd.lublin.pl>
MFC After:	3 days
2001-07-24 02:37:48 +00:00
Garance A Drosehn
ad5fdfbda1 Basically rewrite the dofork() routine, to add more error-checking and
correct the error-checking that was there.  With the old code, an error
return from getpwuid(daemon_user) could turn the lpd process into a very
effective fork-bomb...

Reviewed by:	freebsd-audit freebsd-print (a little...)
MFC after:	6 days
2001-07-23 23:13:39 +00:00
Bill Paul
362c5c1e02 You were knocked senseless by the Boomerang, spun around by the Cyclone,
blown over by the Hurricane and had a house dropped on you by the Tornado.
Now it's time to have your parade rained on by... the Typhoon!

This commit adds driver support for 3Com 3cR990 10/100 ethernet
adapters based on the Typhoon I and Typhoon II chipsets. This is actually
a port of the OpenBSD driver with many hacks by me.

No Virginia, there isn't any support for the hardware crypto yet. However
there is support for TCP/IP checksum offload and VLANs.

Special thanks go to Jason Wright, Aaron Campbell and Theo de Raadt for
squeezing enough info out of 3Com to get this written, and for doing
most of the hard work.

Manual page is included. Compiled as a module and included in GENERIC.
2001-07-23 20:44:54 +00:00
Guy Helmer
ffbd2b9e9d Fix removal of at jobs.
PR:		bin/23052
Submitted by:	Mike Sellenschuetter <mike.sellenschuetter@bankofamerica.com>
MFC after:	1 week
2001-07-23 18:25:45 +00:00
Andrey A. Chernov
3036a6b85c Back out WARNS commenting - local fault 2001-07-23 12:38:00 +00:00
Kris Kennaway
56bded8a29 s/adress/address/
Inspired by:    OpenBSD
MFC After:      1 week
2001-07-23 12:05:27 +00:00
Andrey A. Chernov
c677c22f8f Unbreak world - comment out WARNS=2 - deadly warning on tgetstr 2001-07-23 10:46:01 +00:00
Kris Kennaway
9347c1014d Fix typos
Obtained from:	OpenBSD
MFC After:	1 week
2001-07-23 09:39:55 +00:00
Kris Kennaway
e29261ea22 sprintf -> snprintf 2001-07-23 09:22:21 +00:00
Garance A Drosehn
79c96a6ccd Get rid of a compile-time warning by casting to (size_t).
MFC after:	1 week
2001-07-23 01:19:59 +00:00
Garance A Drosehn
a33973d41a Get rid of a compile-time warning by casting to (size_t).
MFC after:	1 week
2001-07-23 01:13:20 +00:00
Garance A Drosehn
011b9c7907 Fix a few more minor compile-time warnings, mainly by using size_t where
appropriate, and using '("%lu", (unsigned long)asizeval)' when printing
something of type size_t.

MFC after:	1 week
2001-07-23 01:08:15 +00:00
Garance A Drosehn
190c0c3872 Get rid of some compile-time warnings by defining (or casting) variables
as size_t where appropriate.

MFC after:	1 week
2001-07-23 00:15:37 +00:00
Garance A Drosehn
e95b3b9b47 Fix two compile-time warnings by defining fromlen as socklen_t.
MFC after:	1 week
2001-07-23 00:13:02 +00:00
Kazutaka YOKOTA
e64c88b2dc Use the correct ioctl command to set a VESA mode.
PR: 24423
MFC after: 10 days
2001-07-22 13:30:32 +00:00
Ian Dowse
afe1ef249f Fix some bugs and general brain damage in mounttab:
- Declare mtabhead as an extern in mounttab.h and define it only in
  mounttab.c.
- Remove shared global `verbose' and instead pass it as a parameter.
- Remove the `mtabp' argument to read_mtab(). It served no purpose
  whatsoever, although read_mtab() did use it as a temporary local
  variable.
- Don't check for impossible conditions when parsing mounttab, and
  do detect zero-length fields.
- Correctly test for strtoul() failures - just testing ERANGE is wrong.
- Include a field name in syslog errors, and avoid passing NULL to
  a syslog %s field.
- Don't test if arrays are NULL.
- If there are duplicates when writing out mounttab, keep the last
  entry instead of the first, as it will have a later timestamp.
- Fix a few formatting issues.

Update rpc.umntall and umount to match the mounttab interface changes.
2001-07-22 12:17:51 +00:00
Garance A Drosehn
5d7321f61d Replace calls to strncpy with calls to strlcpy, and remove the extra step
needed to ensure that the result is null-terminated when using strncpy().

MFC after:	8 days
2001-07-22 07:25:27 +00:00
Ian Dowse
d730d3b491 Fix a selection of bugs, and improve code layout:
- Remove unnecessary and unused local variables.
- Include useful information in error and warning messages.
- Fix the logic for expiring mounttab entries.
- Remove calls to getaddrinfo - the results were not used.
- Simplify some string handling by using snprintf.
- Fix usage.
2001-07-22 01:25:25 +00:00
Garance A Drosehn
605d466b60 Rename the -w option to be -W. The recently-added -w option is different
than the long-standing -w option in NetBSD, so change it before anyone in
FreeBSD gets used to it.  For now, -w is still accepted, but prints out
some warnings via syslog.

MFC after:	1 week
2001-07-22 01:05:20 +00:00
Garance A Drosehn
6897f282e5 Change a few read & write calls to use 'STDOUT_FILENO' instead of '1'.
Submitted by:	David Hill <david@phobia.ms>
Reviewed by:	freebsd-audit  (a little)
MFC after:	1 week
2001-07-22 00:03:21 +00:00
Mike Smith
59eacecf65 ACPI CA doesn't recognis S4BIOS as a seperate sleep type anymore, so
drop support for it here until we work out a better way of handling it.
2001-07-21 21:51:44 +00:00
Hellmuth Michaelis
697f33c12b Another hangup bugfix from Juha:
Problem 1 is that the config entry hangup flag is zeroed only at
 CONNECT_ACTIVE_IND in msghdl.c. If any (other) call is disconnected
 after EV_MDO and before CONNECT_ACTIVE_IND, the cleanup routine will
 disconnect the in-progress dialout as well, if its hangup flag is
 nonzero (which it is likely to be) after the previous incarnation of the
 cfg entry. Patch-1 fixes this by clearing the hangup flag as soon as a
 cfg entry is reserved for the call.

Submitted by:	Juha-Matti Liukkonen <jml@cubical.fi>
2001-07-21 16:31:39 +00:00
Hellmuth Michaelis
03096f2d75 Fix hangup bug; Juha writes:
Problem 2 is that doing a local hangup (eg. by writing "H" to the
 dialout device) to a call which is already disconnected results in isdnd
 moving the cfg entry to an illegal state, from which there is no
 recovery. This is tricky because there is no way to synchronize local
 hangup with the remote end (ie. the callee can always hang up at an
 inconvenient time)! Hence, patch-2 alters fsm.c's EV_DRQ state table
 such that the local hangup request is processed or ignored in most
 states, even for disconnected calls.

Submitted by:	Juha-Matti Liukkonen <jml@cubical.fi>
2001-07-21 16:28:28 +00:00
Robert Nordier
816aa3c0b5 Unset MAINTAINER. 2001-07-21 14:32:47 +00:00
Hellmuth Michaelis
f7055f1626 After being port- and addressscanned continously from several sources where
my line stayed open for more than eight hours i decided to implement a
maximum connection time; see keyword maxconnecttime in the manual page.
2001-07-21 11:29:40 +00:00
David E. O'Brien
38c9c01b49 Hide in the Attic. This isn't built any more (it wont) and it can better
collect dust up there.
2001-07-21 02:18:38 +00:00
David E. O'Brien
a0bff42be6 Fix some nits I missed in my style cleanup. 2001-07-20 15:33:04 +00:00
Bruce Evans
ee7901773a Removed CSRG ids. CSRG never had anything to do with dpt.
Don't set BINMODE to 500.  This is not a setuid program.

Note: the dpt utilities have never been attached to the world and
haven't been compilable for a year or two.
2001-07-20 14:59:15 +00:00
Maxim Sobolev
a153062b97 Use reallocf(3) to increase size of malloc'ed buffer instead of
malloc()+memcpy()+free().
2001-07-20 13:20:32 +00:00
David Nugent
4a9e66b57b Fix a possible NULL reference that would be triggered
by invalid input in /etc/crontab.

MFC after:	2 days
2001-07-20 06:46:48 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
David E. O'Brien
ac24b049cc Remove GCC'isms in CFLAGS. 2001-07-20 04:23:13 +00:00
Hajimu UMEMOTO
74fd29e0bc - `-a' option for IPv6 was not working correctly.
- Lose any stray host bits that a user may have entered when providing
  a network number and netmask to the `-a' option for IPv6.  This is
  corresponding to 1.79 that is for IPv4 only.

MFC after:	1 week
2001-07-19 22:04:09 +00:00
Ruslan Ermilov
3e7c6a91b1 Added missing dependancy.
Submitted by:	bde
Approved by:	obrien
2001-07-19 19:04:31 +00:00
Garrett Wollman
9fb54cb322 Note the equivalence of certain time formats. 2001-07-19 15:52:02 +00:00
Dima Dorfman
35904a3be8 Generate a bigger salt. This is necessary for blowfish to work
properly, and doesn't hurt the other algorithms.

PR:		28991
Submitted by:	Yoshihiro Koya <Yoshihiro.Koya@math.yokohama-cu.ac.jp>
2001-07-19 12:00:04 +00:00
Dima Dorfman
b048172ee5 Increment `i' in case of -S so that its argument isn't treated as
another, unknown option.

Submitted by:	Naoki Kobayashi <shibata@geo.titech.ac.jp> and
		    Harti Brandt <brandt@fokus.gmd.de>, respectively.
Pointy hat to:	dd
2001-07-19 11:33:24 +00:00
Dima Dorfman
5d88e21a2a Instead of giving an example of rotating logs at the end of the month,
give an example of how to rotate logs at the beginning of the month.
Although they sound the same, since both of them rotate logs at the
beginning of the day, the former ended up taking place on, e.g., July
31 00:00 instead of the expected July 31 23:59.  This is contraty to POLA.

Submitted by:	Dan Langille <dan@langille.org>
2001-07-19 11:18:42 +00:00
Kris Kennaway
1da665ef09 Correct a reversion in r1.39 which introduced a new instance of strcpy()
after r1.38 had attempted to remove them all.
2001-07-19 06:01:23 +00:00
Ben Smithurst
d7d2240f02 Document the two recent changes to diskcheckd's behaviour and configuration
syntax.
2001-07-18 22:29:54 +00:00
Mike Barcroft
e3608b7813 Document the fact that syslogd(8) requires logs files to be created
before it will start logging to them.

PR:		27088
Approved by:	des
MFC after:	10 days
2001-07-18 13:31:08 +00:00
Dima Dorfman
b30f37abbb Remove an unused variable, and don't try to print a char[] using %d.
Submitted by:	Mark Peek <mark@whistle.com>
2001-07-18 11:49:45 +00:00
Dima Dorfman
5d3e1fcab1 free_entry(): Don't free e->envp if it's already NULL; likewise for
e->cmd.  free_entry() now does the right thing with
partially-initialized structures.

load_entry(): Don't call env_free() on e->envp throughout the routine
before jumping to eof; the free_entry() call at that label will take
care of it.  The previous behavior resulted in e->envp being free'd
twice (well, the second time would usually result in a crash, but
that's besides the point); once in load_entry(), and once in
free_entry() after the former called the latter.  Also note that the
check added to free_entry() (above) doesn't help, since e->envp wasn't
reset to NULL after env_free().

Submitted by:	Mark Peek <mark@whistle.com>
2001-07-18 11:48:00 +00:00
Dima Dorfman
89bbcfbbe5 Set wollman as the MAINTAINER and mention the vendor contact. Ideally
this entire subtree would be in src/contrib, but if that isn't going
to happen at least this has a chance of warning off unsuspecting
committers.

Approved by:	wollman
2001-07-18 11:30:46 +00:00
Dima Dorfman
b7ca471a22 Back out WARNS cleanup: this is apparently vendor code, even though
most of the files aren't on the vendor branch.

Submitted by:	wollman
2001-07-18 11:27:04 +00:00
Brian Somers
8152dca8b2 Bring the PPPoE Ethernet interface up *BEFORE* we send the node a
CONNECT message.

MFC after: 1 week
2001-07-18 09:33:45 +00:00
Ruslan Ermilov
504dd5eab0 fdisk(8): document the default for -b, add xref to boot0cfg(8).
boot0cfg(8): add FILES section.

Reviewed by:	rnordier
2001-07-18 07:12:46 +00:00
David Malone
b14326ea9a Turn off WARNS stuff. When combined with -nostdinc and system header
files that aren't WARNS clean it causes trouble.
2001-07-17 19:00:47 +00:00
Andrey A. Chernov
0247c861a3 Fix disclaimer clause
Submitted by:	jkh
2001-07-17 08:35:45 +00:00
David Malone
20e1eb2130 o Remove old setproctitle.
o Mark unused variables.
o Set WARNS?=2
o Results in no code changes.

Submitted by:	Mike Barcroft <mike@q9media.com>
2001-07-17 07:12:57 +00:00
Matthew Dillon
5b06b23da0 Set the NOADDITIONAL flag for bind. This removes the 5% ttl reduction
for glue records and forces the glue record to be reloaded from the real NS.

The 5% ttl reduction can cause the glue IN A to timeout before the NS
record in certain situations, such as when the domain owner does not match
up NS records with the NIC.   This behavior by domain owners is becoming
more common as primary zone serving iterates through another glue level
(i.e. exodus hosts the master NS's but the customer then redirects the
NS's to the real DNS servers).  The result is that named would appear to
work properly for about 40 minutes, and then unexpectedly fail for that
zone.  This causes named to behave very inconsistently and a google search
shows that it has obviously frustrated many, many people.  So until the bind
guys make named behave consistently (either fail instantly or accomodate the
case), we need to set this option to accomodate the case.  The result
will be much more consistent behavior and fewer head-scratching failures.

MFC after: 3 days
2001-07-17 04:54:00 +00:00
Andrey A. Chernov
3670a10826 Add ability to configure console terminal type in /etc/ttys
Reviewed by:	audit, jkh's silence
2001-07-17 04:09:50 +00:00
Brian Somers
17462195a8 Ignore (with a warning message) mtu/mru configurations that are greater
than the maximum physical values.

MFC after: 1 week
2001-07-17 01:06:13 +00:00
Brian Somers
abca534c5b Free things in the right order 2001-07-16 22:12:06 +00:00
Brian Somers
c4498e7de4 TCPMSS adjusts all TCP SYN packets, not just outgoing ones.
Pointed out by: ru
2001-07-16 17:02:10 +00:00
Dima Dorfman
8d43ce09fc Add prototypes, staticize, constify, don't shadow global variables and
functions, remove an unused function, and silence other assorted
warnings.

Set WARNS=2.
2001-07-15 11:03:28 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Dima Dorfman
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Dima Dorfman
74a5ebbd66 Constify, add some prototypes, and set WARNS=2.
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-07-15 06:20:45 +00:00
Garance A Drosehn
442e0eaf20 Change lpd to perform sanity and safety checks on control files as it
receives them from other hosts.  This is meant to protect from both
nefarious users (which maybe broke into some remote host that we accept
print jobs from), and broken implementations of lpr on other platforms.
This is done by changing recvjob.c to call the new ctl_renametf()
routine in the new common_source/ctlinfo.[ch] files.  This will not
affect jobs coming via lpr on the local machine.

Reviewed by:	freebsd-print@bostonradio.org & freebsd-audit
MFC after:	16 days
2001-07-15 05:29:38 +00:00
Garance A Drosehn
fd41faa7c9 Replace a call to 'alloca', thus avoiding an error when compiling on
freebsd/alpha with -ansi (and on some non-fbsd platforms).  This change
can only affect the access checking of 'lpr -r'.

MFC after:	1 week
2001-07-15 04:10:32 +00:00