Commit Graph

7404 Commits

Author SHA1 Message Date
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