Commit Graph

1444 Commits

Author SHA1 Message Date
Alexander Langer
2dc3422762 Allow 'shutdown datespec' to work into the next century. Handle dates
in the 22nd century and beyond even though it's irrelevant with a 32-bit
time_t which expires in the year 2038.
1998-01-08 02:21:30 +00:00
Alexander Langer
00bbf86dd5 Format mismatch in error message.
Submitted by:	bde
1998-01-08 00:27:31 +00:00
Philippe Charnier
7f6c4bf07d Remove more unused #includes.
Obtained from: Bruce.
1998-01-07 07:55:26 +00:00
Alexander Langer
19b7e28d58 Support listing/showing specific rules supplied on the command line.
Use error codes from <sysexits.h>.
1998-01-07 02:23:04 +00:00
Alexander Langer
016d30080f Display a better error message and use a non-zero exit code when
zero/delete operations fail.

PR:		4231
Reviewed by:	Archie Cobbs <archie@whistle.com>
1998-01-06 00:11:57 +00:00
Philippe Charnier
2632a83f1e Add rcsid. Remove uneeded #include. Use fprintf() in usage() instead of err(3)
to make it print: usage: progname ...
1998-01-05 07:23:02 +00:00
Philippe Charnier
57e78ffb16 Sync. usage string and synopsis. Add rcsid. 1998-01-05 07:10:42 +00:00
Philippe Charnier
49fea209d4 Add -v in usage string. Add rcsid. 1998-01-05 07:07:44 +00:00
Steve Price
d2daa2c099 The default dumplevel is 0.
PR:		5413
Submitted by:	NOKUBI Hirotaka <hnokubi@yyy.or.jp>
1998-01-03 20:26:15 +00:00
Brian Somers
fc2c67eac5 Correct -r and -f descriptions.
Suggested by: joerg
1998-01-03 10:11:38 +00:00
Alexander Langer
1295abe226 Removed /etc/ld.so.conf reference from FILES section (people get
confused when they can't find it), but leave the reference to it
as being a standard filename (which doesn't imply that it exists).

Discussed with:	jkh
1998-01-01 02:31:47 +00:00
Warner Losh
15678bfa03 Properly drop group privs to open file names specified by the user.
Submitted by:	Niall Smart rotel@indigo.ie
Obtained from:	OpenBSD (rev 1.7 and 1.8)
1997-12-30 05:13:21 +00:00
Alexander Langer
a228025e10 Added copyright (taken from natd.c).
Approved by:	Ari Suutari <ari@suutari.iki.fi>
1997-12-30 00:38:56 +00:00
Brian Somers
2267b3199c Add a "scsi -f /dev/ssc -p" example and xref ssc(4).
Make the other examples prettier.
1997-12-29 21:08:33 +00:00
Brian Somers
a7a660bdb8 Mention that the -r flag reprobes the entire bus on which the given
device resides and that the -f flag must specify the `whole slice'
if it's a disk.
1997-12-29 15:17:57 +00:00
Steve Price
9a9791af6e Fix a few style nits from previous commit.
Submitted by:	Bruce Evans <bde@zeta.org.au>
1997-12-29 14:05:49 +00:00
Philippe Charnier
6ab51a152f Add missing .Ar. 1997-12-29 07:03:46 +00:00
Steve Price
716847a669 Get md5(1) to use getopt(3). Also some minor -Wall cleaning
while here.

PR:		5387
Submitted by:	Matthew Hunt <mph@pobox.com>
1997-12-29 03:40:37 +00:00
Alexander Langer
f13f9fada7 Typo/$Id$ police. 1997-12-27 19:31:11 +00:00
Warner Losh
b1a3bc5ea0 style(9) corrections
Submitted by:	bde
1997-12-26 23:28:17 +00:00
Alexander Langer
33d07164d6 Put the return value of getopt into an int, not a char. 1997-12-26 03:24:26 +00:00
Warner Losh
5635438650 Be extra paranoid about trusting the length of the data returned by
gethostbyaddr.
Submitted by:	Julian Assange
1997-12-24 01:00:24 +00:00
Warner Losh
006b3faebb Two fixes:
1) Correct strncpy usage
	2) gethostbyaddr paranoia from Julian Assange
1997-12-24 00:59:49 +00:00
Warner Losh
b10d9d5f10 Minor style nit noticed by bde. 1997-12-24 00:59:02 +00:00
Warner Losh
164309e22e Be extra paranoid about trusting the length returned by gethostbyaddr.
Submitted by:	Julian Assange
1997-12-24 00:58:39 +00:00
Warner Losh
9ae323c5f0 Be extra paranoid about trusting the size of the address returned from
gethostbyaddr.
Submitted by:	Julian Assange
1997-12-24 00:57:41 +00:00
Eivind Eklund
079e1f7586 Remove unused include files
Submitted by:	bde
1997-12-22 13:46:08 +00:00
Masafumi Max NAKANE
c456b727db Typo fix in the message displayed. 1997-12-21 15:40:11 +00:00
Eivind Eklund
82bc2dfa32 Remove unused private header.
Submitted by:	max
1997-12-21 15:35:22 +00:00
Eivind Eklund
3690cf7295 Remove unused private include files from slattach.
Submitted by:	bde
1997-12-21 13:42:27 +00:00
Bruce Evans
db398a8bd4 Fixed overflow in chkrange(). Some out of bounds block numbers,
e.g. -1, were not detected.  Use a bulletproof check that doesn't
depend on special properties of the args or the limit.

PR:	3528
1997-12-21 00:00:44 +00:00
Bruce Evans
ccc3fadfd5 Fixed style bugs in the printing of statistics after preening. Use
floating point better in the percentage calculation there to avoid
overflow when there are more than about 20 million fragments.  Start
using floating point in the other percentage calculation to avoid
overflow when there are more than about 2 million fragments.

Fixed printf format strings.

Converted sccsid to rcsid.
1997-12-20 22:24:32 +00:00
Bruce Evans
2d187af5d6 Don't attempt to print the statistics for a "clean" preened filesystem
when there isn't even a filesystem.  Attempting to print them tended
to cause SIGSEGV or SIGFPE depending on how far setup() got before it
returned 0.  This was broken in the previous revision by removing a
return statement that the previous case depended on falling into.

PR:	4840 (fixed by this commit)
PR:	2537 (possibly fixed by Lite2 merge and later changes.  setup()
	      does more checking now)
1997-12-20 21:36:58 +00:00
Bruce Evans
2f5275d0c8 Fixed some FUD (don't blame current msdosfs for old msdosfs+vfs_bio bugs). 1997-12-19 23:03:00 +00:00
Brian Somers
867ca4ed97 The ``super scsi'' device is /dev/scc.
I'm not sure it's fully functional though !
1997-12-19 14:14:26 +00:00
Bruce Evans
5ce43a5e9b Install sysctl in /sbin. It is used in some cases in network_pass1(),
before /usr is mounted if /usr has type nfs.
1997-12-18 15:34:08 +00:00
Bruce Evans
e3d099c303 Fixed DPADD. 1997-12-16 15:03:14 +00:00
Guido van Rooij
f2c90b9538 Oops..The default behaviour should be *not* to log all succeeded
requests. If you want this extra loggin, add the -l option.
1997-12-13 19:50:14 +00:00
Guido van Rooij
690c488d0a Fix some style bugs.
Submitted by:	bruce
1997-12-10 20:33:59 +00:00
Brian Somers
67a886fb97 natd 1_10 => 1_11
Cosmetic style changes
  Use u_short for port values.
Submitted by:	Ari Suutari <ari@suutari.iki.fi>
1997-12-10 02:14:57 +00:00
Guido van Rooij
f51631d732 Log all failed mount attempts.
Also add a flag (-l) so mountd will also log all succeeded requests
to mountd.
1997-12-09 18:43:44 +00:00
Brian Somers
27c20503c6 Reverse my previous change and use htons() on an int
instead of htonl() !

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

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

Noted by:	eivind & ari@suutari.iki.fi
1997-12-06 12:00:32 +00:00
Julian Elischer
c7a0bf0440 Allow ipfw to accept comments and blank lines.
This makes ipfw config files a LOT more readable.
1997-12-05 02:43:26 +00:00
Steve Price
8546f807e0 Add mount_devfs(8) to the SEE ALSO section.
PR:		5125
1997-12-01 00:44:16 +00:00
David E. O'Brien
e83b2033a7 Fix syntax error for the mount_mfs example.
Also update to a more realistic example.
1997-11-24 03:28:54 +00:00
John Polstra
14b94d0464 Add missing argument detected by "-Wformat". 1997-11-18 03:37:45 +00:00
John Polstra
a960972dd0 Fix missing arguments detected by "-Wformat". 1997-11-18 03:22:08 +00:00
John Polstra
3e83b874e1 Fix two missing arguments detected by "-Wformat". 1997-11-18 03:14:53 +00:00
Brian Somers
5ae6fac1d7 Use htonl() rather than htons(). 1997-11-13 11:43:02 +00:00
Julian Elischer
52bf64c787 Reviewed by: hackers@freebsd.org in general
Obtained from: Whistle Communications tree

Add an option to the way UFS works dependent on the SUID bit of directories
This changes makes things a whole lot simpler on systems running as
fileservers for PCs and MACS. to enable the new code you must
1/ enable option SUIDDIR on the kernel.
2/ mount the filesystem with option suiddir.
hopefully this makes it difficult enough for people to
do this accidentally.
see the new chmod(2) man page for detailed info.
1997-11-13 00:28:51 +00:00
Steve Price
0f30219fa8 Fix a misleading comment.
PR:		bin/4861
Submitted by:	Alex <garbanzo@hooked.net>
1997-10-27 03:28:44 +00:00
John-Mark Gurney
b2289ae063 use += on cflags
Submitted-by:	Steve Price <sprice@hiwaay.net>
1997-10-26 04:58:27 +00:00
Mark Murray
76a54b1979 Make this part of the 'krb' distribution if it is being built as the
Kerberised version.
1997-10-24 16:22:46 +00:00
Mark Murray
6adb44d7f0 Make this part of the 'krb' distribution. 1997-10-24 16:20:25 +00:00
John-Mark Gurney
60add4e38d fix mispelling of kld 1997-10-24 05:30:12 +00:00
John-Mark Gurney
2830148a29 a few code style changes:
o start function names in column 1
    o sort order of flags in getopt and switch
    o don't try to reference progname
    o unspam some changes introduced by a 2.2.1-R build box instead of a
	-current build box

doc changes:
    o document when these commands first appeared
    o put email address in angle brakets
    o minor mdoc clean up
1997-10-21 09:59:26 +00:00
Bruce Evans
b493c70c4f Don't install mount_msdos setuid root. Lite2's mount(2) handles
permissions centrally and a setuid root mount utility just breaks
its security.  There was no new breakage in practice because
mfdosfs_mount() still checks the ruid.
1997-10-21 07:26:50 +00:00
Philippe Charnier
d9b1bc7779 Use err(3). Change err(-1,... to err(1,... 1997-10-20 12:53:54 +00:00
Joerg Wunsch
cc75b131a6 Introduce a -N option that disables the use of reserved ports, now
that -P is on by default.  Remove do-nothing code in the -P case (but
leave the option itself for backward compatibility).

PR:	bin/4500
1997-10-19 16:40:01 +00:00
John-Mark Gurney
23e200d5ab activate the programs that will be used to manipulate kld modules
fix a few problems with missing headers, warn called with an exit
value, and undeclared getopt vars

these programs now compile -Wall clean (and yes, I know I should use
more than just -Wall) :)
1997-10-19 11:15:45 +00:00
Joerg Wunsch
59dcbbb234 Fix the man page description about what will go into an incremental
backup.

PR:		docs/4785
Submitted by:	Matthew Dillon
1997-10-19 09:43:08 +00:00
Brian Somers
10cffc50d2 Add -redirect_port and -redirect_address to the
synopsis.
1997-10-18 16:31:28 +00:00
Peter Wemm
41cd75b799 Make the supported media info output the default.
The -m switch is now accepted for backwards compatability.

Suggested by: davidg
1997-10-16 03:55:29 +00:00
Masafumi Max NAKANE
47fa2a53b5 Remove Xref to format(8) which does not exist. 1997-10-15 17:33:47 +00:00
Joerg Wunsch
d6038ed629 Do not account the tape change time for ETA estimations.
PR:		bin/4369
Submitted by:	blank@fox.uni-trier.de (Sascha Blank)
1997-10-12 14:09:13 +00:00
Joerg Wunsch
b394198484 The unit for the B option is 1 KB, not `dump records'.
PR:		docs/4223
1997-10-12 13:10:26 +00:00
Joerg Wunsch
33262b2341 Enable spppcontrol. 1997-10-11 11:34:00 +00:00
Joerg Wunsch
bb37355e3c The spppcontrol(8) utility that is required to set or display things
like PAP and CHAP secrets with sppp(4).  This is the first utility
using the new SIOC[SG]IFGENERIC ioctls (and the reason for inventing
them in the first place).
1997-10-11 11:30:30 +00:00
Peter Wemm
1bc5fcd008 This has always bugged me. At single user, the implied example it gives
is not valid - it says that "sh" is the default, but you can't
actually type "sh" at this prompt - it has to be /bin/sh or some other
full pathname.
1997-10-10 12:14:48 +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
Wolfram Schneider
bf5cbf3551 Sort cross refereces in section SEE ALSO. 1997-09-29 19:11:55 +00:00
Mark Murray
f8dd90c3b9 Changes for the new KTH KerberosIV 1997-09-28 08:43:40 +00:00
Mark Murray
81127b1486 Changes for the new KTH KerberosIV. 1997-09-28 08:42:27 +00:00
KATO Takenori
75b714ac11 Add noclusterr and noclusterw options. The noclusterr and noclusterw
disable clustered read and write, respectively.

Reviewed by:	bde
1997-09-27 13:44:17 +00:00
Peter Wemm
920de53083 Spell out a few things for the media options. 1997-09-27 02:55:39 +00:00
Poul-Henning Kamp
0d150bcf0b Fix bad assumptions about types.
PR:		1649
Reviewed by:	phk
Submitted by:	Jason Thorpe <thorpej@nas.nasa.gov>
1997-09-18 18:19:45 +00:00
Poul-Henning Kamp
d030d2d2ae Many places in the code NULL is used in integer context, where
plain 0 should be used.  This happens to work because we #define
NULL to 0, but is stylistically wrong and can cause problems
for people trying to port bits of code to other environments.

PR:		2752
Submitted by:	Arne Henrik Juul <arnej@imf.unit.no>
1997-09-18 14:08:40 +00:00
Philippe Charnier
be9950897a Typo. 1997-09-18 06:54:03 +00:00
Peter Wemm
079709dc3a Some tweaks to get this to cope with ELF where the address space starts
higher up in memory (0x0800000 upwards) rather than near zero (0x1000
for our qmagic a.out format).  The method that mount_mfs uses to allocate
the memory within data size rlimits for the ram disk is entirely too much
of a kludge for my liking.  I mean, if it's run as root, surely it makes
sense to just raise the resource limits to infinity or something, and if
it's a non-root user mount (do these work? with mfs?) it could just fail
if it's outside limits.
1997-09-13 11:41:50 +00:00
Jonathan Lemon
a968cfd87c If a host in an export line in /etc/exports (or within a netgroup on
an export line) is unresolvable, make a note of it via syslog and skip
that individual host instead of skipping the entire line.

PR:	1981, 815
Perused by:	joerg
1997-09-12 16:25:24 +00:00
Daniel O'Callaghan
6f1edd29a4 Fix typo in comment. 1997-09-12 10:52:49 +00:00
Peter Wemm
ff486369c7 Mention the IPFIREWALL_DEFAULT_TO_ACCEPT option and it's effect on
rule 65535
1997-09-10 04:02:37 +00:00
Peter Wemm
875a6115c1 Fix typo (65434 -> 65534) 1997-09-10 03:52:50 +00:00
John-Mark Gurney
1ccbcf70f7 tell dset how to save the pnp info in the kernel... 1997-09-09 12:51:02 +00:00
Brian Somers
f9b06d5cbe Ingored incoming packets are now dropped when
deny_incoming option is set to yes.
Submitted by:	Ari Suutari <ari@suutari.iki.fi>
1997-09-06 11:14:03 +00:00
Eivind Eklund
d6b01f404d Fix my e-mail address. Old work addres is no good. 1997-08-31 16:38:33 +00:00
John-Mark Gurney
46657c7e77 fix a few spelling changes
Submitted by: Josh Gilliam

Closes PR's: 4429, 4431-4438

PS: He has agreed to submit all contrib fixes back to the original author.
1997-08-30 12:22:49 +00:00
KATO Takenori
d1d9bf7e77 Added hw.machine_arch. 1997-08-30 02:28:00 +00:00
Guido van Rooij
e90cdb54db Plug info agthering attack as pointed out on Bugtraq recently.
Obtained from: OpenBSD
1997-08-29 19:22:28 +00:00
Warner Losh
c9c3deeddc .Xr vnconfig 8. This was suggested by Dworkin Muller <dworkin@village.org>
when he tried to figure out how to swap to a file and had to ask me for
help.
1997-08-26 00:32:06 +00:00
Bruce Evans
c295350952 Fixed an example. 1997-08-25 21:17:38 +00:00
Bruce Evans
958294d6f6 Removed duplicate MOPT_FORCE and sorted the first one. Rev.1.5 and
Lite2 messed up the ordering differently.
1997-08-25 21:14:22 +00:00
Bruce Evans
8e30c09987 Moved getmntops() stuff back to mntopt.h so that it is visible in other
mount utilities.
1997-08-25 21:02:21 +00:00
Bruce Evans
fa02b62ae7 Backed out previous commit - don't clobber the (normally equivalent)
default for NOSHARED.
1997-08-25 20:38:35 +00:00
Bruce Evans
ba05eddfeb Support all mount flags that are supported in the kernel. 1997-08-25 20:23:16 +00:00
John-Mark Gurney
0755ef0eea add Id line (so that the commit on RELENG_2_2 will have it too) 1997-08-25 12:50:01 +00:00
Steve Price
30761f8783 Forgot to cvs add this new file. 1997-08-24 21:28:38 +00:00
Steve Price
fba1c154b2 Try to avoid mounting filesystems multiple times. Also while
I'm here do some -Wall cleaning.

PR:		kern/1839
Reviewed and corrected by:	joerg
1997-08-24 21:02:51 +00:00
Joerg Wunsch
6caa839def Mention the various reasons for messages of the form:
xxxxx filesystem is not available

Inspired by:  PR 3311, and a following discussion with Mikhail
1997-08-24 17:51:12 +00:00
Joerg Wunsch
ca4da38dc6 Make it explicit that arguments to -c are in hex, while other numbers are
in usual "C" notation.

Also fixed the examples section.

PR:		3313
1997-08-24 08:50:25 +00:00
Steve Price
951122de0a Always include the section name in the .Xr macro and cleanup
.Nm macro usage.

PR:		docs/3940
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp>
1997-08-24 02:27:08 +00:00
Steve Price
81eaff0252 Remove the reference to the nonexistant dump(5) manpage.
PR:		docs/3704
1997-08-23 21:52:47 +00:00
Steve Price
5b9062772d Protect against target containing a '%' which might be misinterpreted
by err(3).

PR:		bin/3864
1997-08-23 21:25:24 +00:00
Joerg Wunsch
32c9dffb9d Make the daemon process a true daemon by calling setsid().
PR:		bin/3202
Submitted by:	Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
1997-08-23 14:10:34 +00:00
John-Mark Gurney
71f6084c4a another -I/sys to -I${.CURDIR}/../../sys 1997-08-22 14:04:09 +00:00
Peter Wemm
d4ba5766dd Add -R (rescan or refresh) option to rescan and rebuild the hints
file based on the previous list of directories stored there which
should overcome a weakness of the '-m' switch which can only add
libs.  This is an ideal way of updating the hints list after adding
or removing a shlib since it will remove entries that are gone and
doesn't need to have all the directories spelled out each time.
(eg: rm -f /usr/lib/libtcl75*; ldconfig -R)  This only works for
version 2 hints files (which we've been generating for a year or
so) which store the path.
1997-08-22 04:42:12 +00:00
Jonathan Lemon
e816bc9767 Enable simultaneous use of -u and -p options. Release any resources before
calling post-processing script.
PR:		2864
Submitted by:	Mike Spengler <mks@msc.edu>
1997-08-21 22:33:59 +00:00
Daniel O'Callaghan
39f5ba2def Bring comment on '-a' flag in line with reality. 1997-08-21 07:30:08 +00:00
Steve Price
cbc0b9d0e4 Fix a typo and while here cleanup the use of the .Nm macro.
PR:		docs/4339
Submitted by:	Matthew Hunt <mph@pobox.com>
1997-08-20 11:40:13 +00:00
David Nugent
80f69e57cd ".if exists(${CURDIR}/../../secure)" rather than testing relative to the
object directory.
1997-08-18 03:32:09 +00:00
David Nugent
86bf62dc4a Test that rc.shutdown exists before attempting to run it - silently
return success if it doesn't to prevent any unwanted error msgs.
1997-08-18 01:40:12 +00:00
Bill Fenner
ff49597ed1 Add an ntohs() and format an IP address with inet_ntoa() when
printing the details of a received ICMP packet.

PR:		bin/3766
Submitted by:	denny1@home.com (Denton Gentry)
1997-08-11 04:33:07 +00:00
Brian Somers
fb994b078f - Buffer space problem found by Sergio Lenzi <lenzi@bsi.com.br>
fixed. Natd now waits with select(2) for buffer space
  to become available if write fails.
- Packet aliasing library upgraded to 2.2.

Submitted by:	Ari Suutari <suutari@iki.fi>
1997-08-10 21:55:52 +00:00
Joerg Wunsch
edb398d7d9 If, in a level N dump, the file with the inode number X is a
non-directory file with more than one link to it, but in a level M > N
dump, the file with the inode number X is a plain file, "restore", when
restoring the level M dump, won't remove all the hard links to the old
file.

Submitted by:	guy@netapp.com (Guy Harris)
1997-08-10 14:19:13 +00:00
Alexander Langer
750f6aad7b Support interface names up to 15 characters in length. In order to
accommodate the expanded name, the ICMP types bitmap has been
reduced from 256 bits to 32.

A recompile of kernel and user level ipfw is required.

To be merged into 2.2 after a brief period in -current.

PR:		bin/4209
Reviewed by:	Archie Cobbs <archie@whistle.com>
1997-08-08 14:36:29 +00:00
Julian Elischer
363d7bbe50 don't lose track of how many packets we've sent
if we get 'host unreachable'. (or any other errors than ENOBUFS)
makes -c work again even if you can't get there..
This really needs a rework..
1997-08-07 02:41:15 +00:00
Andrey A. Chernov
3ee1f2280e runshutdown(): get rid of getdtablesize loop, it gains nothing now
but can waste time if many descriptors are available
1997-08-06 16:34:51 +00:00
Andrey A. Chernov
25cf4a545a rc.shutdown fixes:
1) revoke -> HUP
2) controlling terminal already present
3) add missing setprocresources call
1997-08-06 16:07:52 +00:00
David Nugent
8889c700f3 Add /etc/rc.shutdown capability to init.
Add sample /etc/rc.shutdown (which is just a shell for now).
Submitted by:	Ollivier Robert <roberto@keltia.freenix.fr>
1997-08-02 00:22:52 +00:00
Brian Somers
4e1bdb51a7 Allow service names as the divert/tee arg. 1997-07-25 03:13:46 +00:00
Bruce Evans
8f975bb321 Cleaned up revisions 1.22 and 1.23.
Fixed minor bugs in revisions 1.12 and 1.23 (variables assigned to in signal
handlers weren't declared as volatile).
1997-07-20 06:09:55 +00:00
Garrett Wollman
3109a91002 Calculate and print out the standard deviation of the round trip times.
This isn't necessarily the best statistic, but it is by far the easiest to
calculate.  Update the man page to be more explicit about precisely which
statistics are printed out.  Revert some of jmg's bogus man page changes from
rev 1.11.
1997-07-18 17:52:05 +00:00
Julian Elischer
a455644f13 Check if routed had the same problems that route(1) had.
The answer is not really, but almost.
it sent data that was ok, though it was a hack,
but it was bug-compatible with the kernel on receiving them. This also
had been fixed with a hack.. I hacked it better I think.
1997-07-18 11:08:35 +00:00
Julian Elischer
ba68720f4f fix what appears to me to be absolutle bogus code
to do with netmasks.. we fed totally bogus data into the kernel
to do with default routes and it just believed us. this led to:
1/ kernel panics
2/ the default route refusing to be deleted or added
(depending on a number of factors, usually it worked ok.)
1997-07-18 09:05:12 +00:00
Doug Rabson
cb3923e0ee Merge WebNFS support from NetBSD.
Obtained from:	NetBSD
1997-07-16 09:27:53 +00:00
Bruce Evans
28596d2346 Removed "hack to prevent overflow of a 32bit block number". Lite2 has a
better hack in ffs_vfsops.c.  The hack here restricted the maximum file
size to 2^39 bytes (512GB).  fs_bsize * 2^31 - 1 (16TB for the default
blocksize of 8K) would have been better.  There is no good way to remove
this limit on old BSD4.4 file systems.
1997-07-13 15:13:07 +00:00
Peter Wemm
65b3003d2d kill the undead 1997-07-13 14:26:00 +00:00
Sean Eric Fagan
a2a0088805 Fix a problem introduced with a recent change that caused a hang with
unreachable hosts.  Note that most of this consists of telling SIGINT
and SIGALRM to interrupt the system call, instead of restarting them.
Also try to get rid of some potential races Bruce didn't like; hopefully
they aren't a problem (potential or otherwise) now.

Reviewed by:	julian
1997-07-13 06:16:44 +00:00
Jordan K. Hubbard
571b472b20 Allow ldconfig to accept files (containing directory paths) as well as
directory paths.
Reviewed by:	jkh & jdp
Submitted by:	Hans Zuidam <hans@brandinnovators.com>
1997-07-11 14:45:41 +00:00
Julian Elischer
0e59c641dc don't count packets as being transmitted when we know that the sendto()
failed (e.g. ENOBUFS)
1997-07-09 20:33:58 +00:00
Julian Elischer
515dd2fa3f ping called printf() from a signal handler..
this is a NO-NO

re-arange to just set a "please die immediatly" flag in the signal handler
and handle this in the normal thread.

also handle ping -f better on slow links by backing off a bit when
we get a ENOBUFFS from the sendto().
1997-07-09 19:40:43 +00:00
Andrey A. Chernov
3f31fb330d Move logwtmp(shutdown) call before any real action in death(). 1997-07-08 11:51:11 +00:00
Andrey A. Chernov
1054bb1e43 1. Replace malloc+bzero by calloc
2. Revoke internal active session list only now, not whole /etc/ttys
1997-07-05 19:36:55 +00:00
Andrey A. Chernov
19e00c1345 Add -D_NEW_VFSCONF to eliminate compilation warning 1997-07-05 19:34:51 +00:00
Bruce Evans
c65c062f59 Document recent changes (config files and -D...) and not so recent changes
(bios drive number...).

Submitted by:	mostly by yokota
1997-07-05 02:02:02 +00:00
Andrey A. Chernov
c3d7c52e04 death: revoke all lines listed in /etc/ttys instead of sending HUP
to all processes
1997-07-04 22:09:07 +00:00
Masafumi Max NAKANE
8c1d6cc7a3 Add Xref to nologin(5). 1997-07-04 06:31:52 +00:00
John Polstra
b7c2b28e0b Die and stay dead. Ya got it?! 1997-07-04 01:30:09 +00:00
Andrey A. Chernov
423b6a39ff Include <libutil.h> instead of private declarations 1997-07-03 11:37:43 +00:00
Andrey A. Chernov
a2ee73bcc6 Remove unneded cast in login_getclassbyname which cause warning 1997-07-02 13:53:31 +00:00
Bruce Evans
c377df7798 This commit was generated by cvs2svn to compensate for changes in r27163,
which included commits to RCS files with non-trunk default branches.
1997-07-02 00:25:26 +00:00
Bruce Evans
7ff7df18ef Import Lite2's src/sbin, except for XNSrouted and routed. All relevant
files in src/sbin are off the vendor branch, so this doesn't change the
active versions.
1997-07-02 00:25:26 +00:00
Bruce Evans
25e43cba72 Import Lite2's src/sbin, except for XNSrouted and routed. All relevant
files in src/sbin are off the vendor branch, so this doesn't change the
active versions.
1997-07-02 00:25:26 +00:00
Philippe Charnier
41e964cb5d Remove lines inside #ifdef 0/#endif. 1997-06-30 11:10:18 +00:00
Bruce Evans
1dce44f3ea Configure static linkage in the normal way (default to -static using
NOSHARED?= yes).
1997-06-29 21:40:54 +00:00
Bruce Evans
2b7c05c611 Print fs_maxfilesize. 1997-06-29 20:59:03 +00:00
Bruce Evans
2bdcf54dc6 Prepare to remove the declaration of sys_siglist from <unistd.h>.
It should only be declared in <signal.h> if at all.  Modload used
to depend on getting it from <unistd.h> because it only included
<sys/signal.h>.
1997-06-29 20:38:38 +00:00
Paul Traina
4cbf8903a2 Attempt to open the device for reading before actually adding the device
to the session list.  If the device comes back as unconfigured, just
ignore that line in /etc/ttys.  If someone HUP's init, we'll try again.

This change stops getty's from hanging on vty and sio ports that don't
exist, either due to LKM drivers not being loaded, or probes failing.
Reviewed by:	bde
1997-06-28 08:18:29 +00:00
John Hay
0fad62aead Display tickadj in struct clockinfo. 1997-06-24 18:23:32 +00:00
Brian Somers
46b2c55966 Suggest using /etc/services entry rather than a
number in the "ipfw add divert" example.
1997-06-24 10:49:44 +00:00
Tor Egge
dc6f8d1bd5 Allow use of the name "swap" instead of an actual swap device.
This makes configuration of mfs /tmp on diskless clients more intuitive
for people like me, that have used this feature on NetBSD and SunOS.
Using the -T option and /dev/null, while already supported,
is neither intuitive nor documented in the handbook.
Obtained from: NetBSD
1997-06-23 22:44:51 +00:00
Julian Elischer
135a88d805 Allow ipfw to look up service names from /etc/services (or NIS if turned on)
note.. this would be dangerous if your ipfw was blocking NIS access :)

Submitted by: archie@whistle.com (Archie Cobbs)
1997-06-23 22:32:13 +00:00
Steve Price
681e5e7a09 Show the real revision date and not the date that this
manpage is being viewed.
1997-06-23 04:03:49 +00:00
Jordan K. Hubbard
c1b792b226 sysconfig -> rc.conf 1997-06-22 14:40:27 +00:00
Brian Somers
24084f9bfc Bring natd into main source tree now that the
pppd/natd combination works ok.

Submitted by:	Ari Suutari <ari.suutari@ps.carel.fi>
1997-06-22 04:19:08 +00:00
Philippe Charnier
210a5dc89f Sync usage string according to man page. 1997-06-19 14:44:24 +00:00
Philippe Charnier
49d430cc1f Cosmetic in usage string. 1997-06-19 14:42:10 +00:00
Philippe Charnier
6da7f3783b Use warn(3). 1997-06-19 14:40:41 +00:00
Philippe Charnier
64c12016e7 Use err(3). Add missing prototypes. Cosmetic in usage string. 1997-06-19 14:38:53 +00:00
Philippe Charnier
ac9df8c8e7 Use err(3). Add usage(). 1997-06-19 14:33:42 +00:00
Philippe Charnier
a2bfcdfd76 Use err(3). 1997-06-19 14:28:32 +00:00
Philippe Charnier
b5f058fc9b Various typos in man page. Cosmetic in usage string. Use err(3) instead
of fprintf. Remove unused variables.
1997-06-18 06:37:23 +00:00
Philippe Charnier
768b3fbd57 Sync man page and usage string. Remove unused -p option from getopt call. 1997-06-18 06:34:28 +00:00
Philippe Charnier
7766b145c4 Sync man page and usage string. 1997-06-18 06:33:11 +00:00
Philippe Charnier
eee9b17e46 Sync beetween man page and usage string. 1997-06-18 06:30:34 +00:00
Philippe Charnier
1b6a6c70bb Fprintf -> warn. 1997-06-18 06:28:46 +00:00
Bruce Evans
d499a0ef65 Merge from Lite2.
- use new getvfsbyname() interface.
- new -A option, like -a except only mounted file systems are unmounted.

All non-cosmetic FreeBSD changes in umount.c, except ignoring of
realpath() failures, went away because they are done better in Lite2.
realpath() failures must be ignored so that non-pathnames like
"<above>:/foo" and "host:/bar" get as far as mount(2).

Reviewed by:	dfr
1997-06-16 11:20:05 +00:00
Masafumi Max NAKANE
cc40ddd9f1 Typo fix.
PR:		3868
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp>
1997-06-16 06:54:30 +00:00
Philippe Charnier
098166ed2d Use err(3) instead of local copy. 1997-06-16 06:43:13 +00:00
Philippe Charnier
441f92071b Use err(3) instead of local err() (a errx() like function). 1997-06-16 06:38:14 +00:00
Philippe Charnier
86eaffaf51 Use err(3). 1997-06-16 06:35:23 +00:00
Andrey A. Chernov
545cda7db5 Remove srandomdev fallback 1997-06-14 00:17:53 +00:00
Masafumi Max NAKANE
ac162c8fa6 Typo fix.
PR:		3854
Submitted by:	Takahiro Yugawa <yugawa@orleans.rim.or.jp>
1997-06-13 20:58:09 +00:00
Philippe Charnier
b2d4098533 Remove __progname. Cosmetic in usage string. 1997-06-13 06:27:12 +00:00
Philippe Charnier
c584283545 Use err(3). 1997-06-13 06:24:42 +00:00
Philippe Charnier
c9ea311a26 Add Id. Staticize usage function. Typo in usage string. 1997-06-11 07:18:18 +00:00
Philippe Charnier
617f1bc8c6 Remove __progname. Make -f a no-op flag as stated in the man page. Remove
unused variables.
1997-06-11 07:13:30 +00:00
Philippe Charnier
a1e5f53b8f Add Id. Cosmetic in usage string. 1997-06-10 11:14:04 +00:00
Philippe Charnier
bef2080a01 Add Id. Use err(3). Costmetic in usage string. 1997-06-10 11:08:53 +00:00
Philippe Charnier
86d025a068 Remove __progname. Cosmetic in usage string. 1997-06-10 11:04:50 +00:00
Philippe Charnier
4cabb4cdcc Add Id, add usage function. 1997-06-10 11:01:13 +00:00
Philippe Charnier
a715c4a4dd Use errx instead of fprintf/exit. 1997-06-04 06:46:09 +00:00
Philippe Charnier
f60d7bbf34 Expected to be found in /sbin not /etc. 1997-06-04 06:40:30 +00:00
Brian Somers
4ddd60b905 Number partitions 1-4, not 0-3.
Any existing config files (using the -f option) will need
to be changed although using the old files will usually result
in an error (partition 0 is invalid).
1997-06-03 21:24:39 +00:00
Doug Rabson
6362924f25 Allow the 'async' mount flag. 1997-06-03 13:49:26 +00:00
Justin T. Gibbs
637fe2f7f3 Don't overflow when calculating the size in MB of a partition.
No more 241MB 4+ gig partitions for me!
1997-06-02 19:25:48 +00:00
Julian Elischer
e4676ba603 Submitted by: Whistle Communications (archie Cobbs)
these are quite extensive additions to the ipfw code.
they include a change to the API because the old method was
broken, but the user view is kept the same.

The new code allows a particular match to skip forward to a particular
line number, so that blocks of rules can be
used without checking all the intervening rules.
There are also many more ways of rejecting
connections especially TCP related, and
many many more ...

see the man page for a complete description.
1997-06-02 05:02:37 +00:00
Doug Rabson
f329f664dd Use realpath on the source as well as the destination. 1997-05-23 17:07:40 +00:00
Doug Rabson
9c63729513 Typo in previous change. 1997-05-23 17:07:00 +00:00
Doug Rabson
43f67e2b2e Generalise the previous change so that only NFS hostnames are looked up.
PR:		bin/3588
Suggested by:	Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
1997-05-16 10:27:02 +00:00
Masafumi Max NAKANE
20aaa0e700 Typo.
PR:		3600
Submitted by:	Josh Gilliam <soil@quick.net>
1997-05-15 09:00:39 +00:00
Alexander Langer
c6a01512c6 Minor rewording of the examples section. 1997-05-15 00:51:08 +00:00
Peter Wemm
c514950585 Clean up some more. Move parsing of sysctl iflist data into a single
place rather than updating the main loop's index variables from within
a subroutine and other revolting things like that.  Move some more
globals into local variables.
1997-05-10 17:14:53 +00:00
Peter Wemm
eca42d3ce0 Grumble.. My last patchup here didn't quite work either. I hate this
program and it's use of global variables.  Somehow, I managed to miss the
most obvious case.. "ifconfig ed0 10.0.0.1" failed (no "inet")

Submitted by: dfr
1997-05-10 14:47:35 +00:00
Doug Rabson
a79fe60755 Add utilities for the kernel linker. 1997-05-07 18:19:54 +00:00
Peter Wemm
9c3b235f46 Restore unintentially lost backwards compat behavior of defaulting to
family inet if not specified.  (eg: "ifconfig ed0" down would fail because
no family was specified, even though the up/down status is not per family)

Pointed out by: Wolfgang Helbig <helbig@MX.BA-Stuttgart.De>
1997-05-07 04:28:26 +00:00
Joerg Wunsch
ee359f4838 Fix a long-standing bug with dump not treating errors correctly. They
were mishandled as an EOF, which became fatal if your first tape was
accidentally write-protected.

PR:		bin/850 dump treats write-protect as an EOT...
1997-05-06 20:52:28 +00:00
Eivind Eklund
b5aa560439 Fix typo.
PR:		Closes PR docs/3488
Submitted by:	k-horik@yk.rim.or.jp
1997-05-04 20:04:59 +00:00
Peter Wemm
9906480a84 Commit hooks for ifmedia support. It's optional in the Makefile, and
can be trivially disabled.
1997-05-04 06:27:45 +00:00
Peter Wemm
4edfe6b992 Bring in the ifmedia components of NetBSD's ifconfig as a seperate file.
Obtained from: Jason Thorpe via NetBSD
1997-05-04 06:22:27 +00:00
Peter Wemm
ed055a8342 Second try at cleanups and fixes (without if_media stuff for the moment)
- parse command options using getopt for consistancy
- sanitise the command parsing so that it's less like spaghetti
- implement a "-l" option (idea from NetBSD - just list names)
- attempt to clean up the sysctl parsing loop some more.  It still needs
  to be taken out the back and shot though.
- cut down on global usage, but there's a lot more scope for this.
- make usage string a bit closer to reality (it was missing lots of things)

Unfortunately, I did this for the second time but with the memory of
the NetBSD version still recently in my mind.  It's hard to redo simple
changes or getopt stuff without making it look like what you've been
working with a few hours ago.
1997-05-04 06:14:47 +00:00
Peter Wemm
fa738d1534 force null commit to skip over rev 1.25 so there's less cvs trouble 1997-05-04 06:00:27 +00:00
Peter Wemm
b5436146c9 Grab some of the NetBSD text for describing the new options and the
media commands.
1997-05-03 23:03:56 +00:00
Warner Losh
e37a137d7a OpenBSD uses ID 0xa6 for its partitions on i386, arc and others that need
a BIOS-like partition table.  We now detect this correctly and print the
right thing.
Obtained from: Value obtained from OpenBSD sources.
1997-05-02 03:08:04 +00:00
Doug Rabson
86dd941a5c Test both the NFS and MOUNT protocols for v3 support before allowing a v3
mount.  It is possible to have v3 MOUNT but only v2 NFS, for instance for
a custom user-mode server like CFS.

Reviewed by:	"Louis A. Mamakos" <louie@TransSys.COM>
1997-05-01 12:30:02 +00:00
Paul Traina
0f4b7baa2d Back out msmith's recent commit which breaks using symbolic names for netmasks.
Instead, reverse the order of the testing, so if a symbolic name starts with
a digit, we'll see if we can make a network address out of it first.  If
that fails, then we'll call getnet...
1997-04-30 18:40:12 +00:00
Mike Smith
0a9bd6b010 Fix parsing of mount options with '=' in their name.
PR:		bin/3027
Submitted by:	Louis Mamakos <louie@TransSys.COM>
1997-04-30 05:48:22 +00:00
Garrett Wollman
55e923b615 Document -k flag here, too. 1997-04-29 17:48:58 +00:00
Garrett Wollman
1982ee69fd Implement Kerberized rcmd for rdump/rrestore. This is lacking the
options one would normally expect to set the realm, enable encryption,
and whatnot, but this actually is able to contact the remote server,
so at least it's a start.  (As a bonus, the stripped static binary is
unquestionably exportable.)
1997-04-29 17:46:27 +00:00
Joerg Wunsch
d6ef03d3fa Userland part of ISO9660 multi-session support. mount_cd9660(8) will
now by default mount the last data track (thus last session), as
opposed to the very first session it has been mounting previously.
This is consistent with the ISO9660 multi-session idea, and the way
other operating systems are working.

There's support to mount arbitrary sessions using the -s option.  This
way, you can simulate multi-session CDs on something like vn devices
that don't support CDIO* ioctl commands.  You can also force the
historic behaviour with

	mount -t cd9660 -o -s=0 /dev/cd0a /cdrom
1997-04-29 15:56:40 +00:00
Doug Rabson
a0bc68a48e Don't try to look up unionfs' <above>, <below> keywords as hostnames. 1997-04-29 09:10:11 +00:00
Doug Rabson
64a094f9de Use realpath() on the source as well as the target otherwise it can be
impossible to unmount a union which was mounted with a relative pathname.
1997-04-29 09:09:09 +00:00
Andrey A. Chernov
7c506958f1 Change vfork to fork, too many memory-clobbering actions present in child 1997-04-23 23:04:58 +00:00
Mike Smith
590ef650e0 Don't call getnetbyname() on a netmask. On a system with a slow net
connection, a large set of network exports could take many minutes to
time out, giving the appearance of a total hang during boot.
1997-04-23 11:03:10 +00:00
Daniel O'Callaghan
ed4d0b8acd Spelling police. 1997-04-23 04:46:38 +00:00
Doug Rabson
2a66cfc532 Add a -2 flag to mountd to allow an admin to disable NFSv3 services.
This is handy for testing and possibly to work around busted v3 clients.
1997-04-22 10:37:27 +00:00
Doug Rabson
2cd1c32cf8 Use v3 protocol by default if it is supported by the server. Allow the
user to force v2 protocol even if the server supports v3.

Obtained from: NetBSD but with a slightly different implementation
1997-04-18 16:23:10 +00:00
Daniel O'Callaghan
12d247a783 Fix typo: "oder" -> "order". 1997-04-16 09:56:30 +00:00
Joerg Wunsch
36b8baa315 Implement a -r option to fsdb(8), ``read/only''. 1997-04-15 09:02:48 +00:00
Guido van Rooij
84ca4b2a79 Oops...now really commit the doc change. 1997-04-09 20:25:43 +00:00
Guido van Rooij
c6e5e15858 Make a sysconfig variable controlling if teh kernel should accept
nfs requests from non-privileged ports.

Change mountd such that it does never set this variable, but only clears
it when run with -n. Also document this in the man page.
1997-04-09 20:17:15 +00:00
Poul-Henning Kamp
71044fa7ab Allow "modern" syntax:
route add -net 192.168.64.0/20 bla bla bla
1997-04-02 17:05:30 +00:00
Poul-Henning Kamp
8fd0ef3952 unifdef CCITT, ISO & CRUFT. 1997-04-02 16:52:45 +00:00
Doug Rabson
b91ea324e7 Make "-o noxxx" work properly, allowing the user to clean e.g. the resvport
flag (which is now set by default).
1997-04-02 11:30:44 +00:00
Mike Pritchard
7966553397 Be more specific as to which flags may not be turned off when the
system is running in secure mode.

Obtained from: NetBSD PR# 3299
1997-04-01 20:41:04 +00:00
Guido van Rooij
d5e1fb3173 Make mount_nfs use reserved ports by default.. Mounts already use
a reserved port, so why not the nfs rpc's themselves?
With user allowed mounts, this perhaps needs a closer look, but
on the other hand, a user could already specify the flag.
If normal users should not be able to use resserved ports, the kernel
should check for the flag at mount time.
1997-04-01 17:20:17 +00:00
Bruce Evans
1f45d4d4eb Don't fail when the vfs.nfs.nfs_privport sysctl doesn't exist
(presumably because the kernel is old).  Moved the declaration of a
variable realated to this sysctl outside of an unrelated ifdef.

Not fixed:
- this sysctl is badly named (nfs occurs twice).
- it's silly to have for FreeBSD in FreeBSD code, especially when
  only half of the FreeBSD-dependent code is ifdefed.
1997-04-01 14:15:30 +00:00
Bruce Evans
a52432a3c6 Fixed missing DPADD. Removed now-redundant SRCS. 1997-04-01 07:43:14 +00:00
Brian Somers
687d0cdeb3 Remove the syslog stuff, and allow various return values
in uu_lock().  Add uu_lockerr() for turning the results of
uu_lock into something printable.  Remove bogus section in man page
about race conditions allowing both processes to get the lock.
Include libutil.h and use uu_lock() correctly  where it should.

Suggested by:	ache@freebsd.org
1997-03-31 22:51:00 +00:00
Peter Wemm
4af9705ceb Fix the mount_mfs case from the last cleanup. The code was (ab)using
it's internal malloc() implementation to try and avoid overstepping it's
resource limits (yuk!).  Remain using libc's malloc(), but check the
resource limits right before trying to malloc the ramdisk space and leave
some spare memory for libc.  In Andrey's words, the internal malloc
was "true evil"..  Among it's sins is it's ability to allocate less memory
than asked for and still return success.  stdio would just love that. :-)

Reviewed by: ache
1997-03-31 16:43:16 +00:00
Warner Losh
6c3f552a31 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-31 05:11:47 +00:00
Brian Somers
568b59b9df Move uucplock into libutil and create a manual page. 1997-03-30 12:12:20 +00:00
Poul-Henning Kamp
a6534afb2a Fix mount call for devfs.
Submitted by:	bde
1997-03-30 09:22:41 +00:00
Warner Losh
8d64695c7c compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 03:33:12 +00:00
Peter Wemm
19e1457bc5 Make this compile after the fsirand changes that deleted two fields.
I was not sure whether the fs_id fields should be printed in the clear
in case of sniffing over a network login etc.  It might be an idea
to have somebody with spare time go through and find any other missing
fields that should be reported.

Definate 2.2.x/2.1.x candidate since it breaks the build.
1997-03-28 13:06:59 +00:00
Guido van Rooij
394da4c167 Add code that will reject nfs requests in teh kernel from nonprivileged
ports. This option will be automatically set/cleraed when mount is run
without/with the -n option.
Reviewed by:	Doug Rabson
1997-03-27 20:01:07 +00:00
Mike Pritchard
f55f3f4693 Update HISTORY to reflect that this will first appear in 2.2.5. 1997-03-27 18:47:05 +00:00
Mike Pritchard
dd99c4291c Typo fix (now how did that one get by me :-).
Submitted by:	Philippe Charnier
1997-03-27 00:27:50 +00:00
Guido van Rooij
e2bb969ac3 Get rid of __progname. I thought I already did that... 1997-03-26 19:07:54 +00:00
Mike Pritchard
e71e7150fd Typo police. Also update HISTORY to reflect when this first appeared
in FreeBSD.
1997-03-24 20:50:57 +00:00
Andrey A. Chernov
c59856210e Include missing <time.h>
Add missing RNG initialization
Use srandomdev() for RNG initialization
1997-03-24 15:51:11 +00:00
Andrey A. Chernov
cb78754c12 Cleanup STANDALONE stuff
Not replace malloc() family for non-standalone variant
Pay attention on malloc() family return code now
Use srandomdev() now for RNG initialization
1997-03-24 15:43:36 +00:00
Warner Losh
94cf2e751d Fix small race window when creating portal socket.
Obtained from: OpenBSD
1997-03-24 05:53:12 +00:00
Warner Losh
722ceb3f84 Use mkstemp rather than mktemp to prevent a small race.
Obtained from: OpenBSD
1997-03-24 05:44:28 +00:00
Bruce Evans
9505c10438 Reactivated dumplfs and newlfs. 1997-03-24 04:57:50 +00:00
Bruce Evans
76cedae52d Changed MAN to MAN8 so that this builds. 1997-03-24 03:38:16 +00:00
Guido van Rooij
8f89943eda Add generation number randomization. Newly created filesystems wil now
automatically have random generation numbers. The kenel way of handling those
also changed. Further it is advised to run fsirand on all your nfs exported
filesystems. the code is mostly copied from OpenBSD, with the randomization
chanegd to use /dev/urandom
Reviewed by:	Garrett
Obtained from: OpenBSD
1997-03-23 20:08:22 +00:00
Mike Pritchard
d92630300f Mdoc cleanup. 1997-03-19 22:42:02 +00:00
Peter Wemm
10e1c2d28a patch up some "int *" vs. "time_t *" (long) mismatches. They could be
nasty if sizeof(int) != sizeof(long).
1997-03-18 20:02:18 +00:00
Peter Wemm
e3bed33cc9 Restore check for ridiculous directory sizes. 1997-03-18 19:53:54 +00:00
Peter Wemm
e457979c0d Document the -a option in .Fl form instead of .Cm form to be consistant
with the rest of the manpage.  (Lite2 documents it in getopt form, Lite1
did it in old-style arg format)
1997-03-15 06:23:57 +00:00
Peter Wemm
79aed3fe40 The -a option (autosize) option got mangled during the Lite2 merge.
Pointed out by:  Tom Jackson <tom@peeper.jackson.org>
1997-03-15 05:32:40 +00:00
Bruce Evans
962cf4d335 Fixed bogus casts from (int32_t *) to (time_t *). 1997-03-13 17:56:25 +00:00
Peter Wemm
32f189ac7d Kill the Lite2 early "filesystem clean abort" check and go back to
something closer to how we used to do it.  The Lite2 way is to check the
"fsclean" flag in the superblock and stop there if so (during preen).
We now do the various superblock sanity checks that we used to do before
since it's cheap.  We now get the filesystem state summary again instead
of "FILESYSTEM CLEAN; CHECKING SKIPPED" (or whatever).
1997-03-13 15:37:23 +00:00
Peter Wemm
01b21ff640 Reactivate fsdb 1997-03-13 12:46:17 +00:00
Peter Wemm
fd24d57d05 Missing $Id$ 1997-03-13 12:44:53 +00:00
Peter Wemm
76863c5104 Make this compile. Mostly use the new names for the ctime/atime/mtime
stamps in the inodes and call one of fsck's utility funcs with a new arg.
1997-03-13 12:42:22 +00:00
Bruce Evans
0622cc3837 Fixed checking for a non-numeric minor number. 1997-03-12 19:03:40 +00:00
Joerg Wunsch
d048f017ad Record num_eisa_slots if it could be found in the kernel. 1997-03-12 18:54:52 +00:00
Bruce Evans
74cf460b66 Finished (?) merging with Lite2: cleaned up #include mess; fixed merging
errors (mis-sorted prototypes, duplicated MNT_NOATIME, duplicated NULL
mntopts fixup).

Updated getopt() usage.

Fixed style bugs in FreeBSD changes (one or two per line for putfsent()
stuff).
1997-03-12 18:35:10 +00:00
Bruce Evans
51a5cf9064 Finished (?) merging with Lite2: cleaned up #include mess. 1997-03-12 17:01:11 +00:00
Bruce Evans
bb19997c02 Finished (?) merging with Lite2: cleaned up #include mess.
Fixed style bugs in FreeBSD changes.
1997-03-12 16:58:35 +00:00
Bruce Evans
a2c6443276 Finished (?) merging with Lite2: cleaned up #include mess and fixed a
style bug.

Removed a redundant declaration.
1997-03-12 16:53:31 +00:00
Bruce Evans
04aba25407 Finished (?) merging with Lite2: cleaned up #include mess.
Fixed misformatting in a comment.
1997-03-12 16:49:28 +00:00
Bruce Evans
473e3a9ab9 Finished (?) merging with Lite2: cleaned up #include mess.
Updated getopt() usage.
1997-03-12 16:46:32 +00:00
Bruce Evans
d97b1da168 Restored lost reference to fsdb(8).
Fixed weird quoting of $Id$.
1997-03-12 16:35:26 +00:00
Mike Pritchard
42deda5d1a Add cvs Id. 1997-03-12 15:08:06 +00:00
Mike Pritchard
6bae29046e Some minor mdoc cleanup. Partially based on PR# 2959. 1997-03-12 13:22:17 +00:00
Peter Wemm
d87d79aefe Merge from Lite2
- cleanups,
 - whiteout support
 - bug fixes (chflags missing on a few file types etc)
The dump/restore folks would want to have a closer look at this, the
change is pretty big.
1997-03-11 12:55:19 +00:00
Peter Wemm
08966bd5fd Merge from Lite2 (use new getvfsbyname() interface) 1997-03-11 12:51:00 +00:00
Peter Wemm
73421c42fb Merge from Lite2 (but does not work) 1997-03-11 12:49:29 +00:00
Peter Wemm
75e2941193 Merge from Lite2:
- use new getvfsbyname() and mount(2) interface (mount_mfs)
 - use new fs include files
 - updated inode / cg layout calculations (?)
1997-03-11 12:48:17 +00:00
Peter Wemm
87564113d7 Merge from Lite2 (use new getvfsbyname() and mount(2) interface, cleanup) 1997-03-11 12:43:45 +00:00
Peter Wemm
4a4c52857e Merge from Lite2 (use new getvfsbyname() and mount(2) interface) 1997-03-11 12:40:45 +00:00
Peter Wemm
b94d6bf4d7 Update to compile under Lite2 1997-03-11 12:38:16 +00:00
Peter Wemm
c06fe0a05e Merge from Lite2
- use new getvfsbyname() interface and mount(2) interface

**DANGER WILL ROBINSON!!**  You must be running a -current kernel
from within a week or so in order for this to work!
1997-03-11 12:28:00 +00:00
Peter Wemm
e7b6972097 Compile under Lite2 (unistd.h has proto for getopt) 1997-03-11 12:24:00 +00:00
Peter Wemm
b4f70931e0 Compile under Lite2 (getopt() is in unistd.h etc) 1997-03-11 12:23:09 +00:00
Peter Wemm
780a5c1ec1 Merge from Lite2. Note that Lite2 has it's own filesystem clean check
skipping code that overrides ours sooner.  One should be eliminated,
but for now it works.
1997-03-11 12:20:21 +00:00
Peter Wemm
82b49328cd Merge from Lite2 (does not work though) 1997-03-11 12:14:07 +00:00
Peter Wemm
9d1741b9da Merge from Lite2 1997-03-11 12:12:26 +00:00
Peter Wemm
a37c38b8d8 Merge Lite2 changes (rather bigish, the dump/restore folks should check) 1997-03-11 12:09:50 +00:00
Peter Wemm
33aa65742b Disable two newly broken dirs:
fsdb (too intimate with old fsck, needs work)
 newlfs (doesn't build since Lite2 lfs wasn't merged into kernel)
1997-03-11 12:06:41 +00:00
Peter Wemm
1811bdf372 Import some CSRG 4.4BSD-Lite2 components for sbin onto vendor branch.
(note that some of these have already been imported, this is a no-op)
1997-03-11 11:59:39 +00:00
Peter Wemm
39e5614a71 This commit was generated by cvs2svn to compensate for changes in r23669,
which included commits to RCS files with non-trunk default branches.
1997-03-11 11:59:39 +00:00
Bruce Evans
92e2d9bed5 Attempt to import Lite2's mount. 1997-03-05 17:51:21 +00:00
Bruce Evans
2822751af3 This commit was generated by cvs2svn to compensate for changes in r23412,
which included commits to RCS files with non-trunk default branches.
1997-03-05 17:51:21 +00:00
Bruce Evans
a92d3ad246 Attempt to import Lite2's mount. 1997-03-05 17:51:21 +00:00
Bruce Evans
423f22330a Force null termination after 2 errant strncpy()s. 1997-03-05 12:08:44 +00:00
Warner Losh
624ff93821 Fix typo introduced in 1.17.
Submitted by:	"Philippe Charnier" <charnier@xp11.frmug.org>
1997-03-04 22:05:49 +00:00
Bruce Evans
8f86703906 Updated mount_msdos to use the Lite2 getvfsbyname() interface. 1997-03-03 13:23:54 +00:00
Warner Losh
1ffae4a6dd Check the size of the IP address reutrned from gethostbyname2, per PR
2578 from Julian A.  Likely not strictly needed, but it doesn't hurt
and protects ping against possible buffer overflows if the resolver
were to return large IP addresses.
1997-03-03 09:50:21 +00:00
Mike Pritchard
940783df47 An odd merge from 2.2 to -current. Somehow that 2.2 nologin.5
man page was in better shape than the 3.0-current version,
so I'm committing the 2.2 version to 3.0.  Whatever happened,
it was my fault :-).
1997-03-03 06:47:27 +00:00
John-Mark Gurney
50ceac8822 fix man page to use marcos instead of parens, quotes and braces
plus other minor fixes
1997-03-02 23:38:05 +00:00
John-Mark Gurney
f22592e760 mdoc'ify man page 1997-03-02 21:43:10 +00:00
Warner Losh
ee2bf73496 1) Minor nits in the usage message from bde. I took out the hard tabs and
used spaces to align the second line under the program name.
2) Cache uid after call to setuid(getuid()) so we don't waste a system call
   for each packet with a call to getuid for the -v case.
3) Update manual to reflect new restriction on -l from last delta.

Suggested by:	bde, Bill Fenner
1997-03-02 20:01:13 +00:00
Joerg Wunsch
06996f8920 Avoid the ``Three seconds until format begins'' construct. It's
inconsistent with the remaining unix utilities, so replace it by
something better suited.

Learned from:	The Unix Hater's Handbook :-)
1997-03-02 11:21:07 +00:00
Warner Losh
f78ac61b3a 1) Fix usage to match convention and manual. Fix manual to match usage.
2) Must be root to run preload (OpenBSD ping.c 1.8)
3) Don't print all replies unless verbose and root (from idea in
   OpenBSD ping.c 1.10 and 1.11) to avoid leaking information available
   only to root.
4) Remove unused h: from option string to getopt.
5) Make the compiler happy with exit(0) (Lite-2?)

Reviewed by: Dan Cross <tenser@spitfire.ecsel.psu.edu>

Good candidate for 2.2 and 2.1 (as are many of the 1.17 changes).
1997-03-02 06:32:42 +00:00
Garrett Wollman
43470e3be8 Make ping -Wall clean (except for one warning).
Do a better job of argument parsing.
Don't permit ping -f to a multicast address (very antisocial).
Don't permit -L, -I, -T options with unicast addresses.
Ensure that we ask for only AF_INET addresses (should close PR#2584).
Return <sysexits.h> error codes for failures.  Document this.
Fix man page to identify the author and put sections in correct order.
1997-03-01 20:19:18 +00:00
Warner Losh
a1d72e7cac Fix a minor problem with restore from tapes from big endian machines.
This finishes the closing of PR2446 which J"org Wunsch pointed out to
me after I closed it.

Submitted by:	Tor Egge <Tor.Egge@idt.ntnu.no>
1997-02-25 02:25:02 +00:00
Peter Wemm
476602a9d0 Revert $FreeBSD$ to $Id$ 1997-02-22 16:15:28 +00:00
Peter Wemm
fce15c9ab3 Revert $FreeBSD$ to $Id$ 1997-02-22 15:48:31 +00:00
Peter Wemm
c0ec1f37ef Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
Ollivier Robert
a14390ccec Security patch from OpenBSD: fixes potential buffer overflow in a static
buffer (so more difficult to exploit but better safe than sorry). Found
by comparing FreeBSD & OpenBSD sources/logs for the auditing process.

Reviewed by:	Warner Losh
Obtained from:	OpenBSD
1997-02-20 22:16:39 +00:00
David Greenman
33a20f8291 Protect from stack overrun via /etc/ttys, which could possibly allow a
root user to change the securelevel. Pointed out by Thomas H. Ptacek
<tqbf@enteract.com>.
1997-02-19 08:04:58 +00:00
Bruce Evans
4cca17ae59 Disabled dumplfs. Importing the Lite2 version was a mistake, since
many files haven't left the vendor branch and the sys/ufs/lfs hasn't
been merged.
1997-02-17 13:15:42 +00:00
Bruce Evans
1e988af73f Import Lite2's dumplfs. 1997-02-17 13:07:40 +00:00
Bruce Evans
c1530c7bf3 This commit was generated by cvs2svn to compensate for changes in r22839,
which included commits to RCS files with non-trunk default branches.
1997-02-17 13:07:40 +00:00
Jordan K. Hubbard
28ebf21479 Update CHANGEDSINCE macro to conform to -current dinode.h 1997-02-16 22:16:08 +00:00
Joerg Wunsch
d41229fcaa Plug a security hole involving $ENV forwarding over telnet. Sigh, i
thought i've long since done this.
1997-02-15 10:15:49 +00:00
Mark Murray
35c6fcd43b Part two of a "fix-and-move". There were some macros declared in ../sbin's
Makefile that were a) broken and b) bogusly placed. This brings the
repeared macros in.

Pointed-out-by:	BDE
1997-02-10 17:44:34 +00:00
Mark Murray
77ffbc1aad Part one of a "fix-and-move". Init(8) had make macros declared here
bogusly. This removes the macros for replacement into init's Makefile.

Pointed-out-by:	BDE
1997-02-10 17:41:33 +00:00
Daniel O'Callaghan
f607e2c314 Add '-q' quiet flag for flush/add/zero commands; add 'show' command as
synonym for '-a list'; stop SEGV when specifying 'via' with no interface;
change 2 instances of strcpy() to strncpy().

This is a candidate for 2.2
1997-02-10 15:36:54 +00:00
Eivind Eklund
20a842df1f Removed default setuid and added a comment to the manpage explaining this. 1997-02-09 20:56:34 +00:00
Eivind Eklund
2af23c9080 Remove suid bit from binary, and update manpage to reflect this. 1997-02-09 18:03:41 +00:00
Eivind Eklund
b94f03b208 Buffer overflow patch. 1997-02-09 14:09:47 +00:00
Wolfram Schneider
00f1123353 /usr/lib/libmd.a -> ${LIBMD} 1997-02-08 23:24:10 +00:00
Daniel O'Callaghan
772dfa7231 Reviewed by: Gary Jennejohn <gj@freebsd.org>
Submitted by:	Bruce Murphy <packrat@iinet.net.au>

Add '-a' audible flag, so terminal will beep upon receipt of a reply
packet.  Useful for debugging ethernet runs, among other things.
1997-02-08 01:43:56 +00:00
Mike Pritchard
21c7bd7842 Replace "mfs" with "mount_mfs" in the NAME section. 1997-02-06 17:49:55 +00:00
Wolfram Schneider
9a42683b3a /sbin -> ${BINDIR} 1997-02-06 01:24:43 +00:00
Joerg Wunsch
af00957e47 Add the a' option (`auto-size'') to bypass all tape length
considerations, and dump right to the end of medium.
1997-02-01 23:44:19 +00:00
Mike Pritchard
7610c94088 Some various mdoc cleanup.
Partially Obtained from: NetBSD-bugs mailing list
1997-01-28 05:55:22 +00:00
David E. O'Brien
21eab473b3 I was porting something from sysV world and found our cross references
not quite as good as I would expect.  So I'm introducing mknod to mkfifo,
and vice-versa.
1997-01-27 19:20:05 +00:00
Warner Losh
2e42144ea7 Apply patch from pr2536, after testing locally.
Fixes: PR2446 and PR2536

Submitted by: Flemming Jacobsen <fj@tfs.com>

2.2 Candidate.
1997-01-25 05:27:17 +00:00
Adam David
4f3cac8f23 typo 1997-01-22 12:38:40 +00:00
David Nugent
e82d554503 Style police. 1997-01-22 02:07:55 +00:00
Adam David
3cf6d2e792 -n was broken
2.2 candidate (probably)
1997-01-21 21:07:29 +00:00
Mike Pritchard
ca76031b72 Various minor cleanup.
Partially Obtained from: NetBSD-bugs
1997-01-19 17:57:15 +00:00
David Nugent
1ef60eb115 Impose login_cap resource limits on processes started by init.
/etc/rc started with "daemon" settings.
	"window=" started with "default" settings
	gettys started with "default" settings.
This should open the way to junk kernel options MAX_{OPEN,CHILD}
and the corresponding sysctl vars.
1997-01-19 16:49:13 +00:00
Jordan K. Hubbard
8d26fa1ec7 Adjust spelling of `fw_flg' so this thing compiles again. 1997-01-17 07:01:21 +00:00
Alexander Langer
8abdc2eb40 Sweep through the tree fixing mmap() usage:
- Use MAP_FAILED instead of the constant -1 to indicate
    failure (required by POSIX).
  - Removed flag arguments of '0' (required by POSIX).
  - Fixed code which expected an error return of 0.
  - Fixed code which thought any address with the high bit set
    was an error.
  - Check for failure where no checks were present.

Discussed with:	bde
1997-01-16 21:58:40 +00:00
Adam David
839cc09e53 implement "not" keyword for inverting the address logic 1997-01-16 21:04:29 +00:00
Poul-Henning Kamp
1d0847d38d Trivial fix for braino.
Reviewed by:	phk
Submitted by:	Martin Ibert <mib@ppe.bb-data.de>
1997-01-16 10:12:30 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Wolfram Schneider
af20215665 Sort cross references. 1997-01-13 00:25:51 +00:00
Garrett Wollman
97d1e20ef9 If the RTM_NEWMADDR and RTM_DELMADDR messages are defined
(in <net/route.h>), then interpret them appropriately.  This has
no effect until I commit the changes to multicast group
management (awaiting review).
1997-01-09 21:34:03 +00:00
Peter Wemm
9e0dc595f6 Fix double typo 1997-01-08 03:00:42 +00:00
Warner Losh
f5dcc2f1e6 Fix many buffer overflows, correct usage of strcat and implement
$TAPE.  Inspired by OpenBSD's work in this area.

Reviewed by:	Peter Wemm, Guido van Rooij and Jordan Hubbard.
Obtained from: OpenBSD
1997-01-07 20:48:24 +00:00
Paul Traina
71fbc63c69 bin/1789: dump estimates a negative number of tapes needed for huge dumps 1997-01-07 20:15:04 +00:00
Garrett Wollman
5f3ab5ec26 This commit was generated by cvs2svn to compensate for changes in r21378,
which included commits to RCS files with non-trunk default branches.
1997-01-06 17:24:50 +00:00
Garrett Wollman
cdb877c33d Quoth Vern:
ftp.sgi.com:sgi/src/routed.tar.Z has a fix that has been cooking for a week
or so and that fixes a problem in the new hash tables for zillions of
interface aliases.  The bug was that interfaces that come and go, such
as for SLIP and PPP, would get permanently lost.

Submitted by:	Vernon J. Schryver <vjs@mica.denver.sgi.com>
1997-01-06 17:24:50 +00:00
Garrett Wollman
702a1d0148 Update to match changes in <net/if.h>. 1997-01-03 20:19:50 +00:00
Andrey A. Chernov
7726a8a928 Merge to eliminate conflict 1997-01-03 08:29:46 +00:00
Garrett Wollman
d005ed5a68 Latest version of routed from Vern Schryver. This one really
should fix Andrey's problem.
1997-01-02 16:57:08 +00:00
Guido van Rooij
6412184028 Yet another buffer overflow.
2.2 candidate
(and -stable too actually, who does that?)
Reviewed by:	Warner Losh
1997-01-01 14:08:47 +00:00
Warner Losh
335524b9ad Various security related deltas from OpenBSD
dirs.c:
	From OpenBSD 1.2, 1.3, 1.5, 1.8, 1.10, 1.11, 1.12
	1.2:
		use unique temporary files; netbsd pr#2544;
		lukem@supp.cpr.itg.telecom.com.au
	1.3:
		updated patch from lukem@supp.cpr.itg.telecom.com.au
		to also make -r and -R work again
	1.5:
		mktemp open & fdopen
	1.8:
		/tmp// -> /tmp/
	1.10:
		Fix strncpy usage and correct strncat length field,
		from Theo.  Also change some occurrence of MAXPATHLEN
		with sizeof(foo).
	1.11:
		does noone know how to use strncat correctly?
	1.12:
		use mkstemp()
	From NetBSD:
		Use open rather than create so we can specify
		exclusive open mode.

main.c:
	From OpenBSD 1.2, 1.5
	1.2:
		From NetBSD: support $TAPE.
	1.5
		Set umask to be read only by owner until we set real
		file permissions.
tape.c:
	From NetBSD:
		Use open rather than create so we can specify
		exclusive open mode.
1997-01-01 00:03:49 +00:00
David E. O'Brien
4cbb75f40e Backing out my change of /etc/rmt -> /usr/sbin/rmt.
Added comments in both files stateing why /etc/rmt is correct so someone
else wont do the same thing again.

Suggested by:	Warner Losh & Ollivier
1996-12-29 11:48:45 +00:00
David E. O'Brien
cbb90fdbbc rmt is /usr/sbin/rmt, not /etc/rmt which is a link to /usr/sbin/rmt 1996-12-29 00:57:18 +00:00
Wolfram Schneider
13bbf3d16f Add example for mount_mfs(8). 1996-12-26 02:01:09 +00:00
Wolfram Schneider
13608f6661 comma typos 1996-12-23 23:09:55 +00:00