Commit Graph

3590 Commits

Author SHA1 Message Date
Poul-Henning Kamp
ddc6ffdccf Avoid off_t -> integer overflow when sorting the locksector addresses. 2003-04-14 09:36:39 +00:00
Maxim Konovalov
29dccd6ae1 o Skip timestamp part when checking payload.
PR:		bin/50909
Submitted by:	Barney Wolff <barney@lab.databus.com>
2003-04-14 08:34:14 +00:00
Poul-Henning Kamp
1a03d6d57a Use symbolic constants from <sys/diskmbr.h> instead of local constants.
Always set the magic sequence when we write, rather than trusting the
previously read boot code to do so.

Use explicit encoding/decoding of little endian disk image.

Remove a comment which was OBE.

Change the test vector for "fdisk -I" to reflect that there is a magic
sequence in the result now.

Add test case for "fdisk" which reads the image back.

At least for the two test-cases this program now gives the same result
on sparc64 as on i386.  The lack of an installed /boot/mbr on sparc64
raises an (un)interesting question.
2003-04-13 21:57:08 +00:00
Poul-Henning Kamp
9657a0c35e Pull in the encoding/decoding functions for struct dos_partition.
Add a very simple regression test for "fdisk -I".
2003-04-13 21:34:16 +00:00
Poul-Henning Kamp
4e8bfe1482 Add a couple of undocumented test options to MD(4) to aid in regression
testting of GEOM.
2003-04-09 11:59:29 +00:00
Matthew N. Dodd
6e3bc9dad6 Bump the date for recent commits. 2003-04-07 22:58:35 +00:00
Matthew N. Dodd
564b641ef9 Clarify the behavior of PATH_FSTAB with regard to 'tainted' execution.
Requested by:	 ru
2003-04-07 14:21:14 +00:00
Matthew N. Dodd
ef258dd967 Implement the '-F' option for mount & umount which allows the user to
specify an alternate fstab file.
2003-04-07 12:56:01 +00:00
Matthew N. Dodd
47e9b3ea64 Deal with a case where the returned packed was smaller than the
transmitted packet (because the remote host stripped off our icmp_data).

Submitted by:	 Maxim Konovalov <maxim@macomnet.ru>
2003-04-07 12:05:50 +00:00
Matthew N. Dodd
5c514aeee8 Quiet warning. 2003-04-07 11:44:48 +00:00
Matthew N. Dodd
a3165d16af Avoid a name conflict with future functionality:
getfstab() -> dump_getfstab()
2003-04-07 11:34:12 +00:00
Darren Reed
0533695204 Change the default syslog facility from LOG_LOCAL0 to LOG_SECURITY after
discussion on security@freebsd.org.
2003-04-05 10:42:38 +00:00
Poul-Henning Kamp
5b03e4b6a1 Output machdep.guessed_bootdev as an integer rather than try to format
it according to ancient and obsolete rules.

This removes one more user of <sys/diskslice.h>
2003-04-03 21:41:14 +00:00
Poul-Henning Kamp
1e01677906 Don't pull in geom_enc.c any more. 2003-04-03 12:36:56 +00:00
Robert Watson
6ab0d6c220 When kill(-1) returns ESRCH, it could be because the current process
doesn't have a process group, which can occur if you're working with
a custom init that doesn't set up a full tty context.  Rather than
refusing to reboot, ignore ESRCH from the kill attempt in reboot(8).
2003-04-02 22:13:56 +00:00
Matthew N. Dodd
2c56e246fa Back out support for RFC3514.
RFC3514 poses an unacceptale risk to compliant systems.
2003-04-02 20:14:44 +00:00
Maxim Konovalov
33e1dc7738 IP_EVIL -> IP_EF 2003-04-02 14:52:21 +00:00
Yaroslav Tykhiy
252bcf459d Give clearer diagnostics on some cases of invalid
combinations of mdconfig(8) command-line arguments.

Make mdconfig(8) accept "-a -f file -o options"
equally with "-a -f file" (assuming "-t vnode".)
2003-04-01 15:23:55 +00:00
Yaroslav Tykhiy
29f3f095a6 Don't die of SIGSEGV on a missing fstype field
in a saved disklabel file.

MFC after:	1 week
2003-04-01 14:44:53 +00:00
Ruslan Ermilov
887c67148e This can't obviously be cleaner than system headers. 2003-04-01 11:11:38 +00:00
Matthew N. Dodd
09139a4537 Implement support for RFC 3514 (The Security Flag in the IPv4 Header).
(See: ftp://ftp.rfc-editor.org/in-notes/rfc3514.txt)

This fulfills the host requirements for userland support by
way of the setsockopt() IP_EVIL_INTENT message.

There are three sysctl tunables provided to govern system behavior.

	net.inet.ip.rfc3514:

		Enables support for rfc3514.  As this is an
		Informational RFC and support is not yet widespread
		this option is disabled by default.

	net.inet.ip.hear_no_evil

		 If set the host will discard all received evil packets.

	net.inet.ip.speak_no_evil

		If set the host will discard all transmitted evil packets.

The IP statistics counter 'ips_evil' (available via 'netstat') provides
information on the number of 'evil' packets recieved.

For reference, the '-E' option to 'ping' has been provided to demonstrate
and test the implementation.
2003-04-01 08:21:44 +00:00
Poul-Henning Kamp
8b3ee9cd3b Use new GEOM OAM. Kernels have supported this for a number of days, so
people should be OK.
2003-03-31 18:38:31 +00:00
Poul-Henning Kamp
c0fdfdba29 Use default geometry in case the device doesn't provide one:
512 for sectorsize.
	63 for sectors.
	255 for heads.
This will mostly show up on MD(4) devices.
2003-03-29 22:06:52 +00:00
Sean Chittenden
5fe45f18e7 Small mdoc fix 2003-03-29 02:09:02 +00:00
Matthew N. Dodd
c67c1ce843 Default data length should be 56, not 64. 2003-03-28 00:31:51 +00:00
Matthew N. Dodd
229503da84 - Fix function declarations.
- Provide function prototypes.

Submitted by:	 trhodes
2003-03-26 05:49:42 +00:00
Matthew N. Dodd
15d8f3d447 Get rid of a few caddr_t's.
Submitted by:	 trhodes
2003-03-26 04:17:13 +00:00
Matthew N. Dodd
2dc4ca43ec asn_get_encoded() takes 2 arguments. 2003-03-26 04:02:51 +00:00
Matthew N. Dodd
6410552316 Retire set_reqid(), unused since 1.2. 2003-03-26 03:41:12 +00:00
Matthew N. Dodd
87b6469f1e - Add const qualifier to char * arrays.
- Retire Traps array; this was obsoleted in 1.2
2003-03-26 03:19:56 +00:00
Matthew N. Dodd
6181d229c2 Don't roll a private copy of basename(). 2003-03-26 02:54:56 +00:00
Giorgos Keramidas
09003f98d8 There are 5 securelevels, not 4.
PR:		docs/50049
Submitted by:	Colin Percival <cperciva@sfu.ca>
2003-03-26 01:30:34 +00:00
Matthew N. Dodd
4b9ffcd528 - Replace hexdump() with a prettier version.
- Reformat log output.
- Consolidate PDU printing code into print_pdu().
2003-03-25 22:22:19 +00:00
Matthew N. Dodd
f1c661f9ac Set pdu->pdulen in build_pdu(). 2003-03-25 22:10:01 +00:00
Matthew N. Dodd
86dc60e032 Don't compile in lmi_object_instance(). 2003-03-25 22:01:27 +00:00
Matthew N. Dodd
d66e94ca99 - Handle the 'GET PREFIX' request.
- Deal with MADGE_OBJECT1 requests.
- Move code inside of switch cases to separate functions.

Submitted by:	 Richard Hodges <rh@matriplex.com>
2003-03-25 20:34:46 +00:00
Matthew N. Dodd
a5454382a3 Correct a comment.
Submitted by:	 Richard Hodges <rh@matriplex.com>
2003-03-25 20:25:05 +00:00
Matthew N. Dodd
beeb9061d9 - Add a comment regarding SETPFX_OBJID
- Add an Objid definition for MADGE_OBJECT1
- Add an array to map ilmi_states to ASCII descriptions.

Submitted by:	 Richard Hodges <rh@matriplex.com>
2003-03-25 20:22:02 +00:00
Matthew N. Dodd
b88dc3353a Clean up formatting.
Submitted by:	 Richard Hodges <rh@matriplex.com>
2003-03-25 20:15:01 +00:00
Tom Rhodes
f91fdfd8e2 Remove some more MAKEDEV information.
PR:		50294
Submitted by:	Sergey A. Osokin <osa@FreeBSD.org.ru>
2003-03-25 18:43:10 +00:00
Hajimu UMEMOTO
0c6257801e Make -N option work.
Submitted by:	KONDOU Kazuhiro <kazuhiro@alib.jp>
2003-03-25 11:27:46 +00:00
Matthew N. Dodd
7ff910a94b Hook omshell(1) up to the build. 2003-03-25 03:16:53 +00:00
Matthew N. Dodd
a47e79711b Building crunched things by hand (regenerating boot floppies for example)
without a full make release cycle fails as the correct include path
isn't setup.
2003-03-25 03:13:57 +00:00
Matthew N. Dodd
302f15f9e8 Add mount options 'noinet4' and 'noinet6' which prevent using those
address families.

This is useful for preventing NFS mounts from using IPv6 on hosts
that have both A and AAAA records for the same name.
2003-03-25 01:25:30 +00:00
Matthew N. Dodd
c04affffc1 - Silence warnings (casting, implicit decl., unused var.).
- WARNS=2
2003-03-25 00:16:41 +00:00
Matthew N. Dodd
d829c3dfee - Make -M mask and -M time exclusive.
- Correct some problems with packet construction.

  +--------+------------+----------+-------------+---------+
  |        |            |          |             |         |
  | IP Hdr | MINICMPLEN | phdr_len | TIMEVAL_LEN | payload |
  |        |            |          |             |         |
  +--------+------------+----------+-------------+---------+
  |        |                       |                       |
  |<- IP ->|<------- ICMP -------->|<------ datalen ------>|

My previous changes tried to mess around with 'datalen' instead of
modifying 'phdr_len'.

I'm including this nice ASCII diagram (from Maxim) to further clarify things
in CVS history.

Submitted by:	 Maxim Konovalov <maxim@macomnet.ru>
2003-03-24 23:48:36 +00:00
Bruce Evans
1104dd84fa Fixed an errx format error in rev.1.81. This should have been fatal
when WARNS was increased recently, but __printf0like() has been
temporarily disabled for 8 months.

Fixed related style bugs (disordered declaraction and silly type for
maxpayload -- assume 16-bit ints like the rest of ping.c).
2003-03-24 11:26:08 +00:00
Maxime Henrion
0a50de79cb - Add a new ioctl to get the maximum number of ATA channels.
- Use it in atacontrol(8) when listing ATA devices instead of
  stopping at the first ENXIO received.

This makes atacontrol list work on my sparc64 where the two ATA
channels I have are numbered 2 and 3.

Reviewed by:	sos
2003-03-22 12:18:20 +00:00
Ruslan Ermilov
bc33ea1acc Teach disklabel(8) about different hardware architectures.
This is aimed at creating floppies during cross-releases.
For different endianness machines, a tool like bswapfs(8)
is necessary to make the generated floppies readable on
the target machine.  While here, fixed unaligned access
on Alphas.

Tested on:	i386, alpha
2003-03-16 00:11:49 +00:00
Ruslan Ermilov
9a9f19b166 Give this manpage a good overhaul, including the markup.
Notable changes:

- Removed the "disktype" argument from the -B only synopsis
  form.  This form doesn't touch the disk label, and doesn't
  use this argument.

- Fixed the first example in the EXAMPLES section.  Support
  for compatibility slices has been recently dropped from
  the GEOM kernels, and a bit later GEOM became standard.

- Removed the buggy notion from rev. 1.37 that disklabel(8)
  may be used to define mount points; it cannot.  Improve
  some DOS partition / FreeBSD slice wording.  Among these,
  ``dangerously-dedicated slice'' was just a nonsense.  ;-)
2003-03-15 22:00:45 +00:00