Commit Graph

1209 Commits

Author SHA1 Message Date
John Birrell
e3f5655fab read() and write() return ssize_t not int, so the first arg to atomic()
should be ssize_t too.
1998-01-25 09:15:10 +00:00
Bruce Evans
a798ce2eac Converted to Lite2 mount interface - use vfc_typenum from the
already looked up vfsconf struct for nfs instead of MOUNT_NFS.
Removed related FreeBSD ifdefs.
1998-01-20 15:22:27 +00:00
Bruce Evans
87f01287d2 Removed definition of _NEW_VFSCONF. The new vfsconf interface is now
the default.
1998-01-20 10:40:18 +00:00
Bruce Evans
bd4f43ff72 mount(8) only uses realpath() for the mountpoint, so don't look up the
real path here for the mount device (or path).  This fixes difficulties
unmounting devices that are actually symlinks to real devices.

Also, print the original path instead of the real path in early error
messages.  nfs path handling and later error messages may still be wrong,
probably only in silly cases where the original path is both a symlink
and a remote path.

PR:		5208
1998-01-19 18:48:36 +00:00
Bruce Evans
90e05a748a Don't create superblocks with size larger than SBSIZE (8192). The
size was rounded up to a multiple of the fragment size, but this
gave invalid file systems when the fragment size was > SBSIZE (fsck
aborts early on them).  Now a fragment size of 32768 seems to work
(too-simple tests with fsck and iozone worked).
1998-01-19 16:55:26 +00:00
Bruce Evans
cc52d04f9f Guard against a block size of 0 in the label. When the first
superblock is invalid, fsck looks at the label to help guess where
the next superblock should be.  If the partition type is 4.2BSD,
fsck assumed that the block size was valid and divided by it, so
it dumped core if the size was 0.

Initialization of the label was broken almost 3 years ago in rev.1.9
of newfs/newfs.c.  Newfs does not change the label at all, so there
is no problem (except the breakage of the automatic search for
backup superblocks) unless something else sets the partition type
to 4.2BSD.  However, it is too easy to set partition types to
4.2.BSD by copying an old label or by using a disktab entry to
create the label.

PR:	2537
1998-01-19 16:28:29 +00:00
Bruce Evans
cc03533c8d Removed most unused includes of <net/if_var.h> outside the kernel. 1998-01-16 17:38:56 +00:00
Bruce Evans
6e1a705dd4 Fixed some spelling errors. 1998-01-16 06:31:23 +00:00
Philippe Charnier
69036300b2 Use err(3). Change exit(-1). Remove unused #include. 1998-01-14 07:17:12 +00:00
Philippe Charnier
6fa99bdbd2 Use err(3). Change exit(-1), and make exit values equal to 1 when errors.
Remove unused #includes.
1998-01-12 07:57:57 +00:00
Darren Reed
5905ba8289 change s_port to ntohs(s_port) for printf in DEBUG. 1998-01-11 06:03:35 +00:00
Alexander Langer
f6faa785f2 Pass an actual empty environment to execle() as per POSIX rather than
rely on undocumented behavior.

The following fixes were obtained from OpenBSD:

  o -Wall fixes to tlist array initialization and assignment used
    as truth value.
  o Use a restricted environment.
  o Improved error message when shutdown fails to exec reboot or halt.
1998-01-10 20:11:06 +00:00
Alexander Langer
42f9a8963d Added environment parameter to execle calls.
Obtained from:	NetBSD PR2737 (augustss@cs.chalmers.se) via OpenBSD
1998-01-08 20:05:45 +00:00
Alexander Langer
1c910ddbf9 Bump up packet and byte counters to 64-bit unsigned ints. As a
consequence, ipfw's list command now adjusts its output at runtime
based on the largest packet/byte counter values.

NOTE:
  o The ipfw struct has changed requiring a recompile of both kernel
    and userland ipfw utility.

  o This probably should not be brought into 2.2.

PR:		3738
1998-01-08 03:03:54 +00:00
Alexander Langer
7417978572 Correct a comment from my last commit. 1998-01-08 02:23:59 +00:00
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