Compare commits

...
114 Commits
Author SHA1 Message Date
Simon L. B. Nielsen 7a43cb98ef Fix a race condition exists in the OpenSSL TLS server extension code and
a double free in the SSL client ECDH handling code.

Approved by:	so (simon)
Security:	CVE-2010-2939, CVE-2010-3864
Security:	FreeBSD-SA-10:10.openssl
2010-11-29 20:43:06 +00:00
Colin Percival 9738e0c840 Don't unlock a mutex which wasn't locked.
PR:		kern/137310
Approved by:	so (cperciva)
Security:	FreeBSD-SA-10:09.pseudofs
2010-11-10 23:36:13 +00:00
Colin Percival 7814303c3f Fix an integer overflow in RLE length parsing when decompressing
corrupt bzip2 data.

Approved by:	so (cperciva)
Security:	FreeBSD-SA-10:08.bzip2
2010-09-20 14:58:08 +00:00
Colin Percival 8244752809 Correctly copy the M_RDONLY flag when duplicating a reference
to an mbuf external buffer.

Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-10:07.mbuf
2010-07-13 02:45:17 +00:00
Colin Percival 24a6124130 Change the current working directory to be inside the jail created by
the jail(8) command. [10:04]

Fix a one-NUL-byte buffer overflow in libopie. [10:05]

Correctly sanity-check a buffer length in nfs mount. [10:06]

Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-10:04.jail
Security:	FreeBSD-SA-10:05.opie
Security:	FreeBSD-SA-10:06.nfsclient
2010-05-27 03:15:04 +00:00
Colin Percival e1ba7e0b95 MFC r197223: Fix a deadlock in the ULE scheduler.
Approved by:	so (cperciva)
Errata:		FreeBSD-EN-10:02.sched_ule
2010-02-27 10:55:43 +00:00
Simon L. B. Nielsen 0e393837bf Fix BIND named(8) cache poisoning with DNSSEC validation.
[SA-10:01]

Fix ntpd mode 7 denial of service. [SA-10:02]

Fix ZFS ZIL playback with insecure permissions. [SA-10:03]

Various FreeBSD 8.0-RELEASE improvements. [EN-10:01]

Security:	FreeBSD-SA-10:01.bind
Security:	FreeBSD-SA-10:02.ntpd
Security:	FreeBSD-SA-10:03.zfs
Errata:		FreeBSD-EN-10:01.freebsd
Approved by:	so (simon)
2010-01-06 21:45:30 +00:00
Simon L. B. Nielsen 07b034faa6 Bump the patch level in the kernel version number, which was
accidentally left out of main commit for SA-09:15, SA-09:15, and
SA-09:17 in r200054.

Approved by:	so (simon)
2009-12-03 12:59:39 +00:00
Colin Percival 47b396aad3 Disable SSL renegotiation in order to protect against a serious
protocol flaw. [09:15]

Correctly handle failures from unsetenv resulting from a corrupt
environment in rtld-elf. [09:16]

Fix permissions in freebsd-update in order to prevent leakage of
sensitive files. [09:17]

Approved by:	so (cperciva)
Security:	FreeBSD-SA-09:15.ssl
Security:	FreeBSD-SA-09:16.rtld
Security:	FreeBSD-SA-09:17.freebsd-udpate
2009-12-03 09:18:40 +00:00
Simon L. B. Nielsen 6dd22f288d MFC r197711 (partial) to 6.x and 7.x:
- Add no zero mapping feature, disabled by default. [EN-09:05]

MFC 178913,178914,179242,179243,180336,180340 to 6.x:

- Fix kqueue pipe race conditions. [SA-09:13]

MFC r192301 to 7.x; 6.x has slightly different fix:

- Fix devfs / VFS NULL pointer race condition. [SA-09:14]

Security:	FreeBSD-SA-09:13.pipe
Security:	FreeBSD-SA-09:14.devfs
Errata:		FreeBSD-EN-09:05.null
Submitted by:	kib [SA-09:13] [SA-09:14]
Submitted by:	bz [EN-09:05]
In collaboration with:	jhb, kib, alc [EN-09:05]
Approved by:	so (simon)
2009-10-02 18:09:56 +00:00
Simon L. B. Nielsen 1a56c1b168 Fix BIND named(8) dynamic update message remote DoS.
Obtained from:	ISC
Security:	FreeBSD-SA-09:12.bind
Security:	CVE-2009-0696
Approved by:	so (simon)
2009-07-29 00:14:14 +00:00
Colin Percival 62ad930474 Prevent integer overflow in direct pipe write code from circumventing
virtual-to-physical page lookups. [09:09]

Add missing permissions check for SIOCSIFINFO_IN6 ioctl. [09:10]

Fix buffer overflow in "autokey" negotiation in ntpd(8). [09:11]

Approved by:	so (cperciva)
Approved by:	re (not really, but SVN wants this...)
Security:	FreeBSD-SA-09:09.pipe
Security:	FreeBSD-SA-09:10.ipv6
Security:	FreeBSD-SA-09:11.ntpd
2009-06-10 10:31:11 +00:00
Colin Percival 60a77caa53 Don't leak information via uninitialized space in db(3) records. [09:07]
Sanity-check string lengths in order to stop OpenSSL crashing
when printing corrupt BMPString or UniversalString objects. [09:08]

Security:	FreeBSD-SA-09:07.libc
Security:	FreeBSD-SA-09:08.openssl
Security:	CVE-2009-0590
Approved by:	re (kensmith)
Approved by:	so (cperciva)
2009-04-22 14:07:14 +00:00
Colin Percival e7f2236051 Correctly sanity-check timer IDs. [SA-09:06]
Limit the size of malloced buffer when dumping environment
variables. [EN-09:01]

Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-09:06.ktimer
Errata:		FreeBSD-EN-09:01.kenv
2009-03-23 00:00:50 +00:00
Colin Percival 8f4f718530 Correctly scrub telnetd's environment.
Approved by:	so (cperciva)
Security:	FreeBSD-SA-09:05.telnetd
2009-02-16 21:56:17 +00:00
Simon L. B. Nielsen ee2c012a40 Correct ntpd(8) cryptographic signature bypass [SA-09:04].
Correct BIND DNSSEC incorrect checks for malformed signatures
[SA-09:04].

Security:	FreeBSD-SA-09:03.ntpd
Security:	FreeBSD-SA-09:04.bind
Obtained from:	ISC [SA-09:04]
Approved by:	so (simon)
2009-01-13 21:19:27 +00:00
Simon L. B. Nielsen 6bf3a636fa Prevent cross-site forgery attacks on lukemftpd(8) due to splitting
long commands into multiple requests. [09:01]

Fix incorrect OpenSSL checks for malformed signatures due to invalid
check of return value from EVP_VerifyFinal(), DSA_verify, and
DSA_do_verify. [09:02]

Security:	FreeBSD-SA-09:01.lukemftpd
Security:	FreeBSD-SA-09:02.openssl
Obtained from:	NetBSD [SA-09:01]
Obtained from:	OpenSSL Project [SA-09:02]
Approved by:	so (simon)
2009-01-07 20:17:55 +00:00
Hiroki Sato 44472f708e Fix a typo (s/get_setaffinity/sched_getaffinity/).
Spotted by:	mtm
Approved by:	re (implicit)
2009-01-01 06:43:16 +00:00
Ken Smith a1fc2b0c89 Ready to do one final test build and then start the release build process.
Approved by:	re (implicit)
2008-12-31 17:19:19 +00:00
Ken Smith 70fc74b056 Predict when we'll be ready to do the 7.1-RELEASE announcement.
Approved by:	re (implicit)
2008-12-31 17:17:36 +00:00
Hiroki Sato cd743ad0dc Merge the following changes from the English version:
r181796	-> r186637	errata/article.sgml
	r185258	-> r186206	hardware/article.sgml
	r185258	-> r186643	relnotes/article.sgml

Submitted by:	delphij
Approved by:	re (implicit)
2008-12-31 15:39:46 +00:00
Hiroki Sato b1bb6a3b3f Fix $RDIR (installation directory) of relnotes.
Approved by:	re (implicit)
2008-12-31 11:05:28 +00:00
Hiroki Sato 9a42d00083 Fix a typo.
Approved by:	re (implicit)
2008-12-31 08:07:10 +00:00
Hiroki Sato 8e7023f868 Fix order in arch="".
Approved by:	re (implicit)
2008-12-31 06:27:09 +00:00
Hiroki Sato 621df53ec2 Remove old (unmaintained) translations.
Approved by:	re (implicit)
2008-12-31 05:59:54 +00:00
Hiroki Sato 3ab7c7d68c Trim 7.1R Errata.
Approved by:	re (implicit)
2008-12-31 05:56:22 +00:00
Hiroki Sato 00a9318f0c Update release notes for 7.1R:
SA-08:05.openssh,
	SA-08:06.bind,
	SA-08:07.amd64,
	SA-08:08.nmount,
	SA-08:09.icmp6,
	SA-08:10.nd6,
	SA-08:11.arc4random,
	SA-08:12.ftpd,
	SA-08:13.protosw,
	clock id CLOCK_THREAD_CPUTIME_ID added,
	cpuset(2) added,
	DTrace framework and dtrace(1),
	ddb(4) capture, ex /S command, show conifhk added,
	fcntl F_DUP2FD,
	linux(4) sched_setaffinity() and get_setaffinity(),
	in-kernel NFSLOCKD,
	textdump,
	ULE enabled by default,
	wait4(2) WNOWAIT and WSTOPPED added,
	CPU binding of interrupts on amd64,i386,sparc64,
	kern.features.compat_freebsd[456] sysctls,
	BTX USB drive issue fixed,
	gptboot boot loader,
	kbdmux(4) on sparc64,
	nvram(4) MPSAFE,
	puc(4) PUC_FASTINTR option removed,
	psm(4) Synaptics detection changed,
	agp(4) G33/G45 support,
	dpms(4) added for suspend/resume support,
	DRM supports i915 GME devices,
	hme(4) improved,
	ixgbe(4) updated to 1.6.2,
	auto-negotiation issue in some PHYs in miibus(4) fixed,
	workaround of msk(4) checksum offload issue added,
	ndis(4) improved,
	sf(4) improved,
	stge(4) WOL support,
	vr(4) improved,
	wpi(4) improved,
	arp(8) reject/blackhole keywords added,
	bpf(4) ioctl BIOCSETFNR added,
	if_bridge(4) ifmaxaddr parameter added,
	carp(4) stability fix,
	dummynet(4) fast mode,
	enc(4) inner/outer header selection for firewall or bpf(4) via sysctl,
	gre(4) GRE key support,
	ipsec(4) PMTU issue fixed,
	netatm removed,
	ng_nat(4) redirect support,
	ng_pptpgre(4) multiple hook support,
	resolver(3) underscore support,
	TCP_CONGESTION socket option for TCP socket,
	rwlock(9) now used in various network stack,
	aac(4) >2TB array support,
	ata(4) 80pin cable check sysctl added,
	ata(4) ServerWorks HT1000 chipset issue fixed,
	ciss(4) ADAPTER HEARTBEAT FAILED issue fixed,
	geom_part kernel module support,
	geom_linux_lvm kernel module support,
	iir(4) stability fix,
	mpt(4) mpt_user personality added,
	rr232x(4) removed in favor of hptrr(4),
	twa(4) stability fix,
	fdescfs(5) MPSAFE,
	gpart(8) BSD and VTOC8 support,
	gvinum(8) volume parameter support when a plex created,
	unionfs(7) pathname lookup issue of UNIX domain socket fixed,
	atacontrol(8) spindown command added,
	chflags(1) -v, -f, -h options added,
	cp(1) -a added,
	cp(1) ACL bug fixed,
	cron(8) -m flag added,
	dhclient(8) more options added,
	dhclient(8) is_default_interface() function added,
	dhclient(8) default route handling bug fixed,
	environ(7) unsetting detection improved,
	fdisk(8) -q flag added,
	fetch(1) NO_PROXY added,
	ffsll(3) and flsll(3) added,
	fortune(6) FORTUNE_PATH added,
	fortune(6) an issue of -e with multiple files fixed,
	freebsd-update.conf(5) IDSIgnorePaths added,
	fwcontrol(8) -f node option added,
	gcc(1) -mcpu support on sparc64,
	gpt(8) ZFS support,
	ifconfig(8) WPS IE support,
	kgdb(1) add-kld command, kld shared-lib backend support, tid command,
	kvm_getcptime(3) added,
	libalias PORT/EPRT of FTP command in lowercase support,
	man(1) bzip2-compressed manual page support,
	mdconfig(8) -v added,
	memrchr(3) added,
	morse(6) grammar fix,
	mountd(8) -h added,
	moused(8) -L added,
	mv(1) POSIX comformance improved,
	periodic(8) daily_status_mail_rejects_shorten added,
	ping6(8) exit status change,
	ping6(8) -o, -r, -R added,
	ping6(8) minimum allowed interval changed,
	rfcomm_pppd(8) -D added,
	sdpd(8) NAP, GN, PANU profiles added,
	setkey(8) esp keyword support,
	telnetd(8) -a off bugfix,
	top(1) and vmstat(8) -P flag added,
	traceroute(8) -a for AS number lookup added,
	uuid_{enc,dec}_{be,le}(3) functions added,
	watch(8) >10 snp(4) devices support,
	ypserv(8) -P added,
	rc.d var dummynet_enable added,
	a bug in rc.d/ntpd when no configuration has been fixed,
	rc.d/ppp multiple instances support,
	rc.d/sysctl /etc/sysctl.conf.local support,
	rc.firewall setting in rc.conf,
	am-utils 6.1.5,
	ISC BIND 9.4.2-P2,
	bzip2 1.0.5,
	CVS 1.11.22.1,
	hostapd 0.5.10 + radius ACL support,
	libarchive 2.5.5,
	ncurses 5.6-20080503,
	NTP 4.2.4p5,
	resolver library to ISC BIND 9.4.3,
	timezone database tzdata2008h,
	wpa_supplicant 0.5.10 + syslog support, and
	KDE 3.5.10.

Approved by:	re (implicit)
2008-12-31 05:53:37 +00:00
Hiroki Sato 8d6fabce01 Bump version numbers and update descriptions for 7.1R.
Approved by:	re (implicit)
2008-12-31 05:50:37 +00:00
Hiroki Sato 88b95e6d80 Add arch="" attr support.
Approved by:	re (implicit)
2008-12-31 05:49:15 +00:00
Warner Losh 53933eb8d7 Bump year.
Approved by:	re@ (kensmith)
2008-12-30 05:37:39 +00:00
Warner Losh edf911093a Merge bump of copyright.
Approved by:	re@ (kensmith)
2008-12-30 05:36:18 +00:00
Xin LI 48b6a05055 Revert partially manual page changes as we reveted ICH10 and IT8213F
support.

Approved by:	re (kensmith)
2008-12-29 01:09:40 +00:00
Xin LI b62549d11b Revert r184442 (ata(4) changes to support ICH10 and ITE8213F chips) to
previous state due to some late problem reports on -stable@.

Approved by:	re (kensmith)
2008-12-29 01:06:11 +00:00
Xin LI 0d022b4cad Reflect what is actually being supported by bce(4) in RELENG_7_1.
Approved by:	re (kensmith)
2008-12-29 00:58:21 +00:00
Daniel Gerzo 03e4a93de8 MFC r185692
- correct variable name

PR:		docs/129448
Submitted by:	Kenyon Ralph <[email protected]>
Approved by:	re@ (kensmith)
2008-12-28 23:50:05 +00:00
Xin LI 19ba15332a Revert MFC of 185574 in response of changeset 186533 which removed
BCM5709/5716 support.

Approved by:	re (kensmith)
2008-12-28 05:38:49 +00:00
Xin LI 1b9288497e Revert the bce(4) MFC and restore the state of code as of before changeset
184826.  Some pending reliability changes needs to be tested throughly and
it  does not seem  to be  a good idea to ship the  current state of bce(4)
with the  release.  Thanks for everyone who provided testing and sorry for
the mess.

Approved by:	re (kensmith)
2008-12-28 05:32:17 +00:00
Yoshihiro Takahashi 709f4e5025 MFH: part of 186372
Disable the pccard, parallel, GbE and wireless lan related devices
to decrease a kernel size.

Approved by:	re (kensmith)
2008-12-23 02:19:14 +00:00
Ken Smith d517dc04ef Prepare for 7.1-RC2 builds.
Approved by:	re (implicit)
2008-12-23 02:05:56 +00:00
Colin Percival 76acf827a2 Prevent cross-site forgery attacks on ftpd(8) due to splitting
long commands into multiple requests. [08:12]

Avoid calling uninitialized function pointers in protocol switch
code. [08:13]

Merry Christmas everybody...

Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw
2008-12-23 01:23:09 +00:00
Sean Bruno b99e4e1a7e MFC 182911,182948,185996 from HEAD to syncronize fwcontrol between all branches
of FreeBSD.

These changes provide the following features:
  Allow users of more than one Firewire board to execute commands
  Allow users to pass more than one command line argument at a time
  Provide NetBSD code support
  Cleanup Mergeinfo and mark the branch in sync

Reviewed by:    slong ([email protected]) Mentor
Approved by:    re Ken ([email protected])
2008-12-22 00:39:33 +00:00
VANHULLEBUS Yvan 940cae7a4f Fix to bug kern/126850. Only dispatch event hander if the interface had a parent...
PR:		kern/126850
Reviewed by:	EvilSam
Approved by:	re
2008-12-21 19:16:30 +00:00
Peter Wemm f2a9b8efa2 Merge head 185728 via 186368: initialize dummy argument to umtx_op()
Approved by:	re (kib)
2008-12-21 04:34:20 +00:00
Peter Wemm d4deb6c9e7 Merge rev 185725 (184996 in head): Use correct names in END() macros.
Approved by:	re (kib)
Reminded by:	kensmith
2008-12-21 04:27:52 +00:00
Christian S.J. Peron 76e5cc839b MFC revision 185713 from head.
Make sure we are maintaining the reference count on the route eliminating
another:

rtfree: 0xc841ee88 has 1 refs

Reviewed by:	bz
Approved by:	re@ (gnn)
2008-12-20 19:45:22 +00:00
Joe Marcus Clarke fa6af338c0 MFC r186315:
Do not segfault when procstat -f or procstat -v is called on a process not
owned by the current user.  If kinfo_getfile() or kinfo_getvmmap() return
NULL, simply exit, and do not try and derefernce the memory.

Approved by:	re (kib)
2008-12-19 20:23:38 +00:00
Joe Marcus Clarke 974e3f1816 MFC r186314:
Initialize the cntp pointer to 0 prior to doing any work so that callers
don't try to iterate through garbage or NULL memory.  Additionally, return
NULL instead of 0 on error.

Approved by:	re (kib)
2008-12-19 20:22:55 +00:00
Konstantin Belousov 931346f9f0 MFC r185984:
Reference the vmspace of the process being inspected by procfs, linprocfs
and sysctl kern_proc_vmmap handlers.

Approved by:	re (kensmith)
2008-12-19 16:11:04 +00:00
Konstantin Belousov 2baf651277 MFC r185983:
The userland_sysctl() function retries sysctl_root() until returned
error is not EAGAIN. Several sysctls that inspect another process use
p_candebug() for checking access right for the curproc. p_candebug()
returns EAGAIN for some reasons, in particular, for the process doing
exec() now. If execing process tries to lock Giant, we get a livelock,
because sysctl handlers are covered by Giant, and often do not sleep.

Break the livelock by dropping Giant and allowing other threads to
execute in the EAGAIN loop.

This commit does not merge the following change, as was discussed with jhb:
[Also, do not return EAGAIN from p_candebug() when process is executing,
use more appropriate EBUSY error.]

MFC r185987:
Uio_yield() already does DROP_GIANT/PICKUP_GIANT, no need to repeat this
around the call.

Approved by:	re (kensmith)
2008-12-19 16:08:40 +00:00
Konstantin Belousov 01a0e4ea1a MFC r185765, r185766:
Make two style changes to create new commit and document proper commit
message for r185765.
Commit message for r185765 should be:
In procfs map handler, and in linprocfs maps handler, do not call
vn_fullpath() while having vm map locked. This is done in anticipation
of the vop_vptocnp commit, that would make vn_fullpath sometime
acquire vnode lock.

Also, in linprocfs, maps handler already acquires vnode lock.

MFC r185864:
Relock user map earlier, to have the lock held when break leaves the
loop earlier due to sbuf error.

Approved by:	re (kensmith)
2008-12-19 16:03:20 +00:00
Konstantin Belousov ffc51d63fc MFC r185764:
Do drop vm map lock earlier in the sysctl_kern_proc_vmmap(), to avoid
locking a vnode while having vm map locked.

Approved by:	re (kensmith)
2008-12-19 15:58:04 +00:00
Kip Macy 986efd3e2f MFC 185970
fix support and capabilities

Approved by:	re
2008-12-19 06:34:57 +00:00
Kip Macy 16ad3d073b Log:
MFC 183967, 184861, 185157

 183967:
 Track number of packets transmitted and number of packets received
 PR:   125806

 184861:
 Update firmware version check
  make ddp a tunable

  Obtained from:        Chelsio Inc.

 185157:
  Several small additions to the Chelsio 10G driver.

  1) Fix a bug in dealing with the Alerus 1006 PHY which prevented the
  device from ever coming back up once it had been set to down.

  2) Add a kernel tunable (hw.cxgb.snd_queue_len) which makes it possible
  to give the device more than IFQ_MAXLEN entries in its send queue.  The
  default remains 50.

  3) Add code to place the card'd identification and serial number into
  its description (%desc) so that users can tell which card they have
  installed.

Approved by:	re
2008-12-19 05:05:35 +00:00
Ken Smith ed37bbed63 MFC r186165:
> Handle VFS_VGET() failing with an error other than EOPNOTSUPP in addition
> to failing with that error.
>
> PR:           125149
> Submitted by: Jaakko Heinonen (jh <at> saunalahti <dot> fi)
> Reviewed by:  mohans, kan

Approved by:    re (kib)
2008-12-19 04:02:16 +00:00
Xin LI 71d12cc165 MFC r186169:
Don't count InFramesL2FilterDiscards into Ierr.  This value does not represent
a real packet error but simply indicate that an unexpected unicast or multicast
error was received by the NIC, which was not counted in the past as well.

Reported by:	many (on -stable@)
Reviewed by:	davidch
Approved by:	re (kensmith)
2008-12-19 00:20:48 +00:00
Xin LI f042a9d43c MFC r186168:
Test whether sc->tx_mbuf_map[i], not whether sc->tx_mbuf_map is NULL before
doing bus_dmamap_sync() since it operates on the former, not the latter.

Reviewed by:	davidch
Approved by:	re (kensmith)
2008-12-19 00:19:46 +00:00
Doug Ambrisko 0edbfd9d3d MFC: r185584,185994,185999,186132 which updates the strings that identifies
the new supported HW and bump the driver version number.

Submitted by:	LSI
Approved by:	re (kib)
2008-12-17 17:39:36 +00:00
Hajimu UMEMOTO 2519621b02 MFC 186090
Update our resolver to BIND 9.4.3.
It includes the following fix:

  2426.   [bug]           libbind: inet_net_pton() can sometimes return the
                          wrong value if excessively large netmasks are
                          supplied. [RT #18512]

Reported by:	Maksymilian Arciemowicz <cxib__at__securityreason.com>
Approved by:	re (kib)
2008-12-17 12:33:39 +00:00
Murray Stokely b6bf404ec8 MFC: r186204
Update the list of Intel chips with EM64T for FreeBSD/amd64 and
increase the known maximum memory configuration from 8gb to 32gb.

Approved by:	re (hrs)
2008-12-17 03:57:28 +00:00
Ruslan Ermilov 8c5308e1d8 MFC: Fix printing of shared memory limits.
Approved by:	re (kib)
2008-12-16 20:48:38 +00:00
Marius Strobl e91dd3cb0d MFC: 185750
- According to the corresponding Linux, NetBSD and OpenSolaris
  drivers, there should be a 1us delay after every write when
  bit-banging the MII. Also insert barriers in order to ensure
  the intended ordering. These changes hopefully will solve the
  bus wedging occasionally experienced with DM9102A since r182461.
- Deobfuscate dc_mii_readreg() a bit.

Approved by:	re (kib)
2008-12-15 21:37:40 +00:00
Marius Strobl 8b901d50f4 - Limit BCM5701 B5 to 32-bit mode as a workaround for a bug which
causes data corruption in combination with certain bridges.
  Information about this problem was kindly provided by davidch. [1]
- As BGE_FLAG_PCIX is meant to indicate that the controller is in
  PCI-X mode, revert to the pre __FreeBSD_version 602101 method of
  reading the bus mode register rather than checking the mere
  existence of a PCI-X capability, which is also there when the
  NIC f.e. is put into a 32-bit slot causing it not to be in PCI-X
  mode. Setting BGE_FLAG_PCIX inappropriately could cause the NIC
  to be tuned incorrectly.

PR:		128833 [1]
Reviewed by:	jhb
Approved by:	re (kib)
2008-12-15 20:36:32 +00:00
Pyun YongHyeon cf697531e8 MFC r185962:
It seems there are still issues on multicast perfect filtering.
  Disable it until I find spare time to analyze the issue.

Approved by:	re (kensmith)
2008-12-15 05:59:52 +00:00
Daichi GOTO 991c8a703b MFC r185284, r185283
PR:             118346
Submitted by:   Masanori OZAWA <[email protected]>, trasz
Discussed at:   devsummit Strassburg, EuroBSDCon2008
Discussed with: rwatson, gnn, hrs
Approved by:    re (gnn)
2008-12-15 03:58:55 +00:00
Ken Smith c38091d27e Change default operating system for upcoming release. Add FreeBSD releases
not in contrib/groff/tmac/doc-common yet.

Submitted by:	ru
Approved by:	re (implicit)
2008-12-13 18:33:22 +00:00
Ruslan Ermilov ad1b912506 MFC: Fix fread() to return a correct value on platforms where sizeof(int) !=
sizeof(size_t), i.e. on all 64-bit platforms.

Approved by:	re (kib)
2008-12-13 16:53:35 +00:00
Robert Watson b09a01d59a Merge r185944 from stable/7 to releng/7.1:
Merge r185857 from head to stable/7:

    Move syncache flag definitions below data structure, compress some
    vertical whitespace.

Approved by:    re (gnn)
2008-12-12 16:52:33 +00:00
Robert Watson 60fd60cf34 Merge r185930 from stable/7 to releng/7.1:
Merge r185855 from head to stable/7:

    Move flag definitions for t_flags and t_oobflags below the definition of
    struct tcpcb so that the structure definition is a bit more vertically
    compact.  Can't yet fit it on one printed page, though.

Approved by:    re (gnn)
2008-12-12 16:37:15 +00:00
Robert Watson 3bc6837574 Merge r185929 from stable/7 to releng/7.1:
Merge r185813 from head to stable/7:

    Update comment on INP_TIMEWAIT to say what it's about, as we caution
    regarding the misplacement of flags in inp_vflag in an earlier comment.

Approved by:    re (gnn)
2008-12-12 16:12:19 +00:00
Konstantin Belousov 9ad1823560 MFC r185634:
Improve db_backtrace() for compat ia32 on amd64. 32bit image enters
the kernel via Xint0x80_syscall().

Approved by:	re (kensmith)
2008-12-12 13:21:31 +00:00
Tim Kientzle 812abfab33 MFC r183009, r184807, r184808: Fix --strip-components, plus
a handful of test suite improvements.

PR:		bin/128562
Submitted by:	Jaakko Heinonen
Approved by:	re
2008-12-11 05:56:25 +00:00
Konstantin Belousov 2c7f4707d3 MFC r185739:
Improve usefulness of the panic by printing the pointer to the problematic
dquot.

Approved by:	re (kensmith)
2008-12-10 17:20:39 +00:00
Konstantin Belousov af6587ea98 MFC r185335:
In null_lookup(), do the needed cleanup instead of panicing saying
the cleanup is needed.

Approved by:	re (kensmith)
2008-12-10 17:16:11 +00:00
Robert Watson 10178d08fd Merge r185814 from stable/7 to releng/7.1:
Merge r185791 from head to stable/7:

    Move macros defining flags and shortcuts to nested structure fields in
    inpcbinfo below the structure definition in order to make inpcbinfo
    fit on a single printed page; related style tweaks.

Approved by:    re (kib)
2008-12-10 08:55:12 +00:00
George V. Neville-Neil bf2e12d8f9 MFC of 3 separate commits.
Bug fix from Chelsio which addresses the issue of the device resetting
when it sees only received packets.  In some cases where a device only
recieves data it mistakenly thinks that its transmitting side is broken
and resets the device.

Fix a bug with the ael1006 PHY.  The bug shows up as persistent but incomplete
packet loss, of between 10-30%. The fix is to put the PHY into
and take it out of local loopback mode when resetting the interface.

Bug fix to support N310 version of Chelsio cards (board ID 1088).

Obtained from:	Chelsio Inc.
Approved by:	re@
2008-12-09 19:36:50 +00:00
Konstantin Belousov e5ab3a091d MFC r185761:
Recheck the DQ_MOD after the dqh lock is relocked. Repeat dqsync() if
the dq is dirty. This ensures that up to date dq is written in the quota
file and fixes assertion in dqget().

Approved by:	re (kensmith)
2008-12-09 17:47:00 +00:00
Konstantin Belousov e674b1ce25 MFC r185557:
Prevent creation of the duplicated negative namecache entries.

Approved by:	re (kensmith)
Requested by:	jhb
2008-12-09 17:33:56 +00:00
Pyun YongHyeon ee58ae8c0b MFC r185542:
Add 8168D support.

  Submitted by: Andrew < andrewwtulloch <> gmail DOT com >
Approved by:	re (kib)
2008-12-09 11:05:59 +00:00
Tim Kientzle aa68910f50 MFC r185667,r185680,r185681: Overhaul the Rockridge option
parsing and beef up the ISO9660 bidder.  This makes the
ISO reader a lot more robust when reading malformed input.

Approved by:	re
2008-12-09 04:17:44 +00:00
Ken Smith bdbdcfbc03 Get ready for 7.1-RC1 builds.
Approved by:	re (implicit)
2008-12-06 20:49:08 +00:00
Peter Wemm 3b7212732b MF7: 185716 (head 185548 + followups). KERN_PROC_* kinfo updates.
Approved by:	re (kensmith)
2008-12-06 20:36:46 +00:00
Giorgos Keramidas e8ed639521 MFC: r185519
The times(3) function returns the number of CLK_TCKs since the
startup time of FreeBSD, not since the UNIX Epoch.

PR:           docs/122359
Submitted by: Viktor &#352;tujber
Approved by:  re (kib)
2008-12-06 13:50:03 +00:00
Giorgos Keramidas 6100ac3258 MFC: r172623, r175681, r176182, r176184, and r185217
* Document quotachecks use of the passno field.
* Explain how the passno field in /etc/fstab works with fsck and
  quotacheck in some more detail.
* Explain in more detail how the pass number field works.
* Remove information about block devices; we don't have this sort
  of separation between character and block devices anymore.
* Enhance the explanation of using filesystem-specific mount
  options, and add a mount_msdosfs example.

Approved by:    re (kib)
2008-12-06 13:47:04 +00:00
Giorgos Keramidas 14d3d61ef8 MFC: r173282
Use getcwd() instead of getwd().  The former includes buffer length
checks, so it's probably "safer" to use in mtree.

Approved by:    re (kib)
2008-12-06 13:44:09 +00:00
Giorgos Keramidas e27a602831 MFC: r175379, r175380
Document that loader(8) stops reading `loader.conf' when it
encounters a syntax error, and add a tip about adding first
the `vital' options and then experimental ones.

PR:             docs/119658
Submitted by:   Julian Stacey, jhs at berklix.org
Approved by:    re (kib)
2008-12-06 13:40:17 +00:00
Giorgos Keramidas 609150d31a MFC: r175680, r175728.
Document the no-op -r option of BSD xargs(1).

PR:             docs/106416
Submitted by:   Pete Slagle, freebsd-stable at voidcaptain.com
Approved by:    re (kib)
2008-12-06 13:37:15 +00:00
Pyun YongHyeon b8216019f0 MFC r185576:
Add some PHY magic to enable PHY hibernation and 1000baseT/10baseT
  power adjustment. This change is required to guarantee correct
  operation on certain switches.

MFC r185577:
  AR8113 also need to set DMA read burst value. This should fix
  occasional DMA read error seen on AR8113.

Approved by:	re (kensmith)
2008-12-06 01:11:45 +00:00
Xin LI 96a7939a6b MFC revisions 183648 and 185574:
183648 (simon): Document that the bce(4) driver works with Dell PowerEdge
1950/2950 NIC's.

185574 (delphij): Update bce(4)'s hardware list to reflect the recent
update to driver.

Approved by:	re (kib)
2008-12-05 22:36:49 +00:00
Xin LI d92a56e529 MFC r185593:
Don't attempt to clear status updates if we did not do a link state
change.  As a side effect, this makes the excessive interrupts to
disappear which has been observed as a regression in recent stable/7.

Reported by:	many (on -stable@)
Reviewed by:	davidch
Approved by:	re (kensmith, kib)
2008-12-05 21:32:30 +00:00
Ken Smith d90cba5508 MFC r185517:
> Catch up with the disappearance of sys/dev/hfa.

Approved by:    re (kib)
2008-12-04 13:37:54 +00:00
Ken Smith 4a49422398 MFC r185515:
> Adjustments to make a tags file a bit more suitable to amd64.

Reviewed by:    peter
Approved by:    re (kib)
2008-12-04 13:32:25 +00:00
Daniel Gerzo 04e40ee4b7 - MFC the nullfs(5) manual page
Approved by:	re@ (blackend)
2008-12-04 12:23:52 +00:00
Konstantin Belousov 341f511fb1 MFC r185474:
Clarify the reason to not use the volatile string as an argument to CTR
macros. Note the logging of file and line.

Approved by:	re (hrs)
2008-12-03 15:10:31 +00:00
Konstantin Belousov b673393236 MFC r185451:
Third argument to the vi_mmap_t function is vm_paddr_t *.

Approved by:	re (kensmith)
2008-12-02 13:36:38 +00:00
Marcel Moolenaar 2f0c6718ce MFstable/7 rev 185526; MFhead rev 179382:
Work-around a compiler optimization bug, that broke libthr.
See log of rev 185526 or 179382 for the analysis.

Approved by:	re (kensmith)
2008-12-01 20:16:56 +00:00
Ken Smith c6961c821f Make adjustments to the package set for 7.1-RELEASE.
Approved by:	re (kib)
2008-12-01 17:29:41 +00:00
Christian S.J. Peron 370b1ff3f1 MFC revision 185484
- fixup ABI issues with ip6/audit

Approved by:	re@ (kib)
2008-11-30 21:06:23 +00:00
Jack F Vogel 36e142df74 Update driver to version 1.6.2, new hardware support
added, header split support added as default, code
simplification and improvement.

Approved by:re
2008-11-30 04:44:46 +00:00
Jack F Vogel 183cb7a832 MFC of a fix for ESB2 network interfaces that will
sometimes fail to initialize on startup. This also
required shared code as a whole be updated.

VLAN HW filtering code is present but undefined
until after release.

Approved by:re
2008-11-30 04:41:25 +00:00
Luigi Rizzo 309d38202e MFC: pass the correct value in %si to the next stage boot
Approved by:	re@
2008-11-30 00:00:35 +00:00
Robert Watson b6cfef513c Merge r185440 from stable/7 to releng/7.1:
Merge r184367 from head to stable/7:

    When the mac_bsdextended policy is unloaded, free rule memory.

    Obtained from:       TrustedBSD Project

Approved by:  re (kensmith)
2008-11-29 21:48:12 +00:00
Robert Watson c56524219a Merge r185437 from stable/7 to releng/7.1:
Merge r184567 from head to stable/7:

    When encoding an smb name, truncate one byte earlier in order than we did
    previously in order to ensure it fit properly in the bufer when encoded.
    This prevents a debugging printf from firing if a source or destination
    host name for an smb mount exceeds 15 characters.

    Obtained from:       Apple, Inc.

Approved by:  re (kensmith)
2008-11-29 21:42:13 +00:00
Robert Noland d75d2ad5fc MFC r183555: Correctly handle Intel g33 chips and add support for g45
chips.

g33 based chips use a different method of identifying the gtt size.
g45 based chips gtt is located in a different area of stolen memory.

Approved by:	re@ (kensmith)
2008-11-29 17:36:08 +00:00
Tim Kientzle 7aa0874e3a MFC r185334: Recognize Rockridge extensions even when the
IEEE-standard extension name (as standardized in 1994) is used.

PR:		kern/128942
Submitted by:	J.R. Oldroyd
Approved by:	re
2008-11-29 05:08:49 +00:00
Tim Kientzle e00c02d2c0 MFC r185361: Timezone value is signed.
PR:		kern/128934
Submitted by:	J.R. Oldroyd
Approved by:	re
2008-11-29 03:21:25 +00:00
Tim Kientzle a5dfc4f9ec MFC r185359: Non-zero exit when directories disappear
during the filesystem traversal.

Tested by:	David Wolfskill
Approved by:	re
2008-11-28 20:14:41 +00:00
Tim Kientzle 0338c5fc06 MFC 182590,182778,182779,184109: Support for certain
archive_entry attributes to be explicitly "unset".
This fixes a number of issues:
 * Zip archives with "length at end" can now be
   extracted correctly, since the Zip extractor
   can simply mark the size as "unknown."
 * Extract-to-disk can now accurately handle
   cases with partial time information (e.g.,
   mtime is known but not atime)
 * We get more accurate handling of different
   hardlink extraction cases; sometimes a hardlink
   entry has definitive size information and sometimes
   not.

Approved by:	re
2008-11-28 20:09:48 +00:00
Bjoern A. Zeeb ab2c4bae0a MFC: r185332
Plug a credential leak in case the inpcb is freed by
  in6_pcbfree() instead of in_pcbfree(); missed in r183606.

Discussed with:	re (kib)
Approved by:	re (gnn)
Reminded by:	rwatson (with his re hat?)
2008-11-27 16:41:46 +00:00
Julian Elischer eff4b3de1f MFC @ 185101
Fix a scope problem in the multiple routing table code that
stopped the SO_SETFIB socket option from working correctly.

Approved by:     re (kensmith, kostik)
Obtained from:  Ironport
2008-11-25 20:02:47 +00:00
Ken Smith 0d1cd1f8ac Add __FreeBSD_version and package directory for 7.1.
Approved by:	re (implicit)
2008-11-25 19:46:21 +00:00
Ken Smith e8e8be86df Adjust __FreeBSD_version for 7.1.
Approved by:	re (implicit)
2008-11-25 19:45:09 +00:00
Ken Smith 95ec085f03 Update branch tag used for example.
Approved by:	re (implicit)
2008-11-25 19:39:27 +00:00
Ken Smith ae717c1770 Change version number.
Approved by:	re (implicit)
2008-11-25 19:38:12 +00:00
Ken Smith caeeb20a22 Change branch used for "make update".
Approved by:	re (implicit)
2008-11-25 19:36:50 +00:00
463 changed files with 17277 additions and 66421 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
The compilation of software known as FreeBSD is distributed under the
following terms:
Copyright (C) 1992-2008 The FreeBSD Project. All rights reserved.
Copyright (c) 1992-2009 The FreeBSD Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
+1 -1
View File
@@ -88,7 +88,7 @@ CLEANDIR= cleandir
.endif
CVS?= cvs
CVSFLAGS?= -r RELENG_7 -P -d -I!
CVSFLAGS?= -r RELENG_7_1 -P -d -I!
SUP?= /usr/bin/csup
SUPFLAGS?= -g -L 2
.if defined(SUPHOST)
+95
View File
@@ -8,6 +8,101 @@ Items affecting the ports and packages system can be found in
/usr/ports/UPDATING. Please read that file before running
portupgrade.
20101129: p16 FreeBSD-SA-10:10.openssl
Fix OpenSSL multiple vulnerabilities.
20101110: p15 FreeBSD-SA-10:09.pseudofs
Don't unlock a mutex which wasn't locked.
20100920: p14 FreeBSD-SA-10:08.bzip2
Fix an integer overflow in RLE length parsing when decompressing
corrupt bzip2 data.
20100713: p13 FreeBSD-SA-10:07.mbuf
Correctly copy the M_RDONLY flag when duplicating a reference
to an mbuf external buffer.
20100526: p12 FreeBSD-SA-10:05.opie
Fix a one-NUL-byte buffer overflow in libopie. [10:05]
20100227: p11 FreeBSD-EN-10:02.sched_ule
Fix a deadlock in the ULE scheduler.
20100106: p10 FreeBSD-SA-10:01.bind, FreeBSD-SA-10:02.ntpd,
FreeBSD-SA-10:03.zfs
Fix BIND named(8) cache poisoning with DNSSEC validation.
[SA-10:01]
Fix ntpd mode 7 denial of service. [SA-10:02]
Fix ZFS ZIL playback with insecure permissions. [SA-10:03]
20091203: p9 FreeBSD-SA-09:15.ssl, FreeBSD-SA-09:16.rtld,
FreeBSD-SA-09:17.freebsd-update
Disable SSL renegotiation in order to protect against a serious
protocol flaw. [09:15]
Correctly handle failures from unsetenv resulting from a corrupt
environment in rtld-elf. [09:16]
Fix permissions in freebsd-update in order to prevent leakage of
sensitive files. [09:17]
20091002: p8 FreeBSD-SA-09:14.devfs, FreeBSD-EN-09:05.null
Fix devfs / VFS NULL pointer race condition. [SA-09:14]
Add no zero mapping feature. [EN-09:05]
20090729: p7 FreeBSD-SA-09:12.bind
Fix BIND named(8) dynamic update message remote DoS.
20090610: p6 FreeBSD-SA-09:09.pipe, FreeBSD-SA-09:10.ipv6,
FreeBSD-SA-09:11.ntpd
Prevent integer overflow in direct pipe write code from circumventing
virtual-to-physical page lookups. [09:09]
Add missing permissions check for SIOCSIFINFO_IN6 ioctl. [09:10]
Fix buffer overflow in "autokey" negotiation in ntpd(8). [09:11]
20090422: p5 FreeBSD-SA-09:07.libc, FreeBSD-SA-09:08.openssl
Don't leak information via uninitialized space in db(3) records.
[09:07]
Sanity-check string lengths in order to stop OpenSSL crashing
when printing corrupt BMPString or UniversalString objects. [09:08]
20090323: p4 FreeBSD-SA-09:06.ktimer, FreeBSD-EN-09:01.kenv
Correctly sanity-check timer IDs. [SA-09:06]
Limit the size of malloced buffer when dumping environment
variables. [EN-09:01]
20090216: p3 FreeBSD-SA-09:05.telnetd
Correctly scrub telnetd's environment.
20090113: p2 FreeBSD-SA-09:03.ntpd, FreeBSD-SA-09:04.bind
Correct ntpd cryptographic signature bypass. [09:03]
Correct BIND DNSSEC incorrect checks for malformed
signatures. [09:04]
20090107: p1 FreeBSD-SA-09:01.lukemftpd, FreeBSD-SA-09:02.openssl
Prevent cross-site forgery attacks on lukemftpd(8) due to splitting
long commands into multiple requests. [09:01]
Fix incorrect OpenSSL checks for malformed signatures. [09:02]
20090106:
FreeBSD 7.1-RELEASE
20081223: FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw
Prevent cross-site forgery attacks on ftpd(8) due to splitting
long commands into multiple requests. [08:12]
Avoid calling uninitialized function pointers in protocol switch
code. [08:13]
20080903:
ntpd has been upgraded to 4.2.4p5.
+55 -11
View File
@@ -109,6 +109,8 @@
#define DNS_GETDB_NOLOG 0x02U
#define DNS_GETDB_PARTIAL 0x04U
#define PENDINGOK(x) (((x) & DNS_DBFIND_PENDINGOK) != 0)
typedef struct client_additionalctx {
ns_client_t *client;
dns_rdataset_t *rdataset;
@@ -1721,8 +1723,8 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
*/
if (result == ISC_R_SUCCESS &&
additionaltype == dns_rdatasetadditional_fromcache &&
(rdataset->trust == dns_trust_pending ||
rdataset->trust == dns_trust_glue) &&
(DNS_TRUST_PENDING(rdataset->trust) ||
DNS_TRUST_GLUE(rdataset->trust)) &&
!validate(client, db, fname, rdataset, sigrdataset)) {
dns_rdataset_disassociate(rdataset);
if (dns_rdataset_isassociated(sigrdataset))
@@ -1761,8 +1763,8 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
*/
if (result == ISC_R_SUCCESS &&
additionaltype == dns_rdatasetadditional_fromcache &&
(rdataset->trust == dns_trust_pending ||
rdataset->trust == dns_trust_glue) &&
(DNS_TRUST_PENDING(rdataset->trust) ||
DNS_TRUST_GLUE(rdataset->trust)) &&
!validate(client, db, fname, rdataset, sigrdataset)) {
dns_rdataset_disassociate(rdataset);
if (dns_rdataset_isassociated(sigrdataset))
@@ -2547,14 +2549,14 @@ query_addbestns(ns_client_t *client) {
/*
* Attempt to validate RRsets that are pending or that are glue.
*/
if ((rdataset->trust == dns_trust_pending ||
(sigrdataset != NULL && sigrdataset->trust == dns_trust_pending))
if ((DNS_TRUST_PENDING(rdataset->trust) ||
(sigrdataset != NULL && DNS_TRUST_PENDING(sigrdataset->trust)))
&& !validate(client, db, fname, rdataset, sigrdataset) &&
(client->query.dboptions & DNS_DBFIND_PENDINGOK) == 0)
!PENDINGOK(client->query.dboptions))
goto cleanup;
if ((rdataset->trust == dns_trust_glue ||
(sigrdataset != NULL && sigrdataset->trust == dns_trust_glue)) &&
if ((DNS_TRUST_GLUE(rdataset->trust) ||
(sigrdataset != NULL && DNS_TRUST_GLUE(sigrdataset->trust))) &&
!validate(client, db, fname, rdataset, sigrdataset) &&
SECURE(client) && WANTDNSSEC(client))
goto cleanup;
@@ -3335,6 +3337,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
unsigned int options;
isc_boolean_t empty_wild;
dns_rdataset_t *noqname;
dns_rdataset_t tmprdataset;
unsigned int dboptions;
CTRACE("query_find");
@@ -3544,9 +3548,49 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
/*
* Now look for an answer in the database.
*/
dboptions = client->query.dboptions;
if (sigrdataset == NULL && client->view->enablednssec) {
/*
* If the client doesn't want DNSSEC we still want to
* look for any data pending validation to save a remote
* lookup if possible.
*/
dns_rdataset_init(&tmprdataset);
sigrdataset = &tmprdataset;
dboptions |= DNS_DBFIND_PENDINGOK;
}
refind:
result = dns_db_find(db, client->query.qname, version, type,
client->query.dboptions, client->now,
&node, fname, rdataset, sigrdataset);
dboptions, client->now, &node, fname,
rdataset, sigrdataset);
/*
* If we have found pending data try to validate it.
* If the data does not validate as secure and we can't
* use the unvalidated data requery the database with
* pending disabled to prevent infinite looping.
*/
if (result != ISC_R_SUCCESS || !DNS_TRUST_PENDING(rdataset->trust))
goto validation_done;
if (validate(client, db, fname, rdataset, sigrdataset))
goto validation_done;
if (rdataset->trust != dns_trust_pending_answer ||
!PENDINGOK(client->query.dboptions)) {
dns_rdataset_disassociate(rdataset);
if (sigrdataset != NULL &&
dns_rdataset_isassociated(sigrdataset))
dns_rdataset_disassociate(sigrdataset);
if (sigrdataset == &tmprdataset)
sigrdataset = NULL;
dns_db_detachnode(db, &node);
dboptions &= ~DNS_DBFIND_PENDINGOK;
goto refind;
}
validation_done:
if (sigrdataset == &tmprdataset) {
if (dns_rdataset_isassociated(sigrdataset))
dns_rdataset_disassociate(sigrdataset);
sigrdataset = NULL;
}
resume:
CTRACE("query_find: resume");
+5 -1
View File
@@ -861,7 +861,11 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
if (type == dns_rdatatype_rrsig ||
type == dns_rdatatype_sig)
covers = dns_rdata_covers(&t->rdata);
else
else if (type == dns_rdatatype_any) {
dns_db_detachnode(db, &node);
dns_diff_clear(&trash);
return (DNS_R_NXRRSET);
} else
covers = 0;
/*
+31 -19
View File
@@ -241,40 +241,52 @@ enum {
dns_trust_none = 0,
#define dns_trust_none ((dns_trust_t)dns_trust_none)
/*% Subject to DNSSEC validation but has not yet been validated */
dns_trust_pending = 1,
#define dns_trust_pending ((dns_trust_t)dns_trust_pending)
/*%
* Subject to DNSSEC validation but has not yet been validated
* dns_trust_pending_additional (from the additional section).
*/
dns_trust_pending_additional = 1,
#define dns_trust_pending_additional \
((dns_trust_t)dns_trust_pending_additional)
dns_trust_pending_answer = 2,
#define dns_trust_pending_answer ((dns_trust_t)dns_trust_pending_answer)
/*% Received in the additional section of a response. */
dns_trust_additional = 2,
dns_trust_additional = 3,
#define dns_trust_additional ((dns_trust_t)dns_trust_additional)
/* Received in a referral response. */
dns_trust_glue = 3,
/* Received in a referral response. */
dns_trust_glue = 4,
#define dns_trust_glue ((dns_trust_t)dns_trust_glue)
/* Answser from a non-authoritative server */
dns_trust_answer = 4,
/* Answer from a non-authoritative server */
dns_trust_answer = 5,
#define dns_trust_answer ((dns_trust_t)dns_trust_answer)
/* Received in the authority section as part of an
authoritative response */
dns_trust_authauthority = 5,
dns_trust_authauthority = 6,
#define dns_trust_authauthority ((dns_trust_t)dns_trust_authauthority)
/* Answser from an authoritative server */
dns_trust_authanswer = 6,
/* Answer from an authoritative server */
dns_trust_authanswer = 7,
#define dns_trust_authanswer ((dns_trust_t)dns_trust_authanswer)
/* Successfully DNSSEC validated */
dns_trust_secure = 7,
/* Successfully DNSSEC validated */
dns_trust_secure = 8,
#define dns_trust_secure ((dns_trust_t)dns_trust_secure)
/* This server is authoritative */
dns_trust_ultimate = 8
dns_trust_ultimate = 9
#define dns_trust_ultimate ((dns_trust_t)dns_trust_ultimate)
};
#define DNS_TRUST_PENDING(x) ((x) == dns_trust_pending_answer || \
(x) == dns_trust_pending_additional)
#define DNS_TRUST_GLUE(x) ((x) == dns_trust_glue)
/*%
* Name checking severites.
*/
+2 -1
View File
@@ -774,7 +774,8 @@ dump_order_compare(const void *a, const void *b) {
static const char *trustnames[] = {
"none",
"pending",
"pending-additional",
"pending-answer",
"additional",
"glue",
"answer",
+1 -1
View File
@@ -133,7 +133,7 @@ openssldsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
status = DSA_do_verify(digest, ISC_SHA1_DIGESTLENGTH, dsasig, dsa);
DSA_SIG_free(dsasig);
if (status == 0)
if (status != 1)
return (dst__openssl_toresult(DST_R_VERIFYFAILURE));
return (ISC_R_SUCCESS);
+1 -1
View File
@@ -246,7 +246,7 @@ opensslrsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
status = RSA_verify(type, digest, digestlen, sig->base,
RSA_size(rsa), rsa);
if (status == 0)
if (status != 1)
return (dst__openssl_toresult(DST_R_VERIFYFAILURE));
return (ISC_R_SUCCESS);
+2 -2
View File
@@ -3070,7 +3070,7 @@ cache_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) {
}
if (dname_header != NULL &&
(dname_header->trust != dns_trust_pending ||
(!DNS_TRUST_PENDING(dname_header->trust) ||
(search->options & DNS_DBFIND_PENDINGOK) != 0)) {
/*
* We increment the reference count on node to ensure that
@@ -3584,7 +3584,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
if (found == NULL ||
(found->trust == dns_trust_glue &&
((options & DNS_DBFIND_GLUEOK) == 0)) ||
(found->trust == dns_trust_pending &&
(DNS_TRUST_PENDING(found->trust) &&
((options & DNS_DBFIND_PENDINGOK) == 0))) {
/*
* If there is an NS rdataset at this node, then this is the
+28 -5
View File
@@ -3847,6 +3847,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
* for it, unless it is glue.
*/
if (secure_domain && rdataset->trust != dns_trust_glue) {
dns_trust_t trust;
/*
* RRSIGs are validated as part of validating the
* type they cover.
@@ -3883,12 +3884,34 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
}
/*
* Cache this rdataset/sigrdataset pair as
* pending data.
* Reject out of bailiwick additional records
* without RRSIGs as they can't possibly validate
* as "secure" and as we will never never want to
* store these as "answers" after validation.
*/
rdataset->trust = dns_trust_pending;
if (rdataset->trust == dns_trust_additional &&
sigrdataset == NULL && EXTERNAL(rdataset))
continue;
/*
* XXXMPA: If we store as "answer" after validating
* then we need to do bailiwick processing and
* also need to track whether RRsets are in or
* out of bailiwick. This will require a another
* pending trust level.
*
* Cache this rdataset/sigrdataset pair as
* pending data. Track whether it was additional
* or not.
*/
if (rdataset->trust == dns_trust_additional)
trust = dns_trust_pending_additional;
else
trust = dns_trust_pending_answer;
rdataset->trust = trust;
if (sigrdataset != NULL)
sigrdataset->trust = dns_trust_pending;
sigrdataset->trust = trust;
if (!need_validation)
addedrdataset = ardataset;
else
@@ -4236,7 +4259,7 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
for (trdataset = ISC_LIST_HEAD(tname->list);
trdataset != NULL;
trdataset = ISC_LIST_NEXT(trdataset, link))
trdataset->trust = dns_trust_pending;
trdataset->trust = dns_trust_pending_answer;
result = dns_message_nextname(fctx->rmessage,
DNS_SECTION_AUTHORITY);
}
+5 -5
View File
@@ -1140,7 +1140,7 @@ get_key(dns_validator_t *val, dns_rdata_rrsig_t *siginfo) {
* We have an rrset for the given keyname.
*/
val->keyset = &val->frdataset;
if (val->frdataset.trust == dns_trust_pending &&
if (DNS_TRUST_PENDING(val->frdataset.trust) &&
dns_rdataset_isassociated(&val->fsigrdataset))
{
/*
@@ -1155,7 +1155,7 @@ get_key(dns_validator_t *val, dns_rdata_rrsig_t *siginfo) {
if (result != ISC_R_SUCCESS)
return (result);
return (DNS_R_WAIT);
} else if (val->frdataset.trust == dns_trust_pending) {
} else if (DNS_TRUST_PENDING(val->frdataset.trust)) {
/*
* Having a pending key with no signature means that
* something is broken.
@@ -1763,7 +1763,7 @@ validatezonekey(dns_validator_t *val) {
* We have DS records.
*/
val->dsset = &val->frdataset;
if (val->frdataset.trust == dns_trust_pending &&
if (DNS_TRUST_PENDING(val->frdataset.trust) &&
dns_rdataset_isassociated(&val->fsigrdataset))
{
result = create_validator(val,
@@ -1776,7 +1776,7 @@ validatezonekey(dns_validator_t *val) {
if (result != ISC_R_SUCCESS)
return (result);
return (DNS_R_WAIT);
} else if (val->frdataset.trust == dns_trust_pending) {
} else if (DNS_TRUST_PENDING(val->frdataset.trust)) {
/*
* There should never be an unsigned DS.
*/
@@ -2586,7 +2586,7 @@ proveunsecure(dns_validator_t *val, isc_boolean_t resume) {
* There is no DS. If this is a delegation,
* we maybe done.
*/
if (val->frdataset.trust == dns_trust_pending) {
if (DNS_TRUST_PENDING(val->frdataset.trust)) {
result = create_fetch(val, tname,
dns_rdatatype_ds,
dsfetched2,
+7
View File
@@ -381,6 +381,13 @@ Int32 BZ2_decompress ( DState* s )
es = -1;
N = 1;
do {
/* Check that N doesn't get too big, so that es doesn't
go negative. The maximum value that can be
RUNA/RUNB encoded is equal to the block size (post
the initial RLE), viz, 900k, so bounding N at 2
million should guard against overflow without
rejecting any legitimate inputs. */
if (N >= 2*1024*1024) RETURN(BZ_DATA_ERROR);
if (nextSym == BZ_RUNA) es = es + (0+1) * N; else
if (nextSym == BZ_RUNB) es = es + (1+1) * N;
N = N * 2;
+1 -1
View File
@@ -139,7 +139,7 @@ void feat(void);
void format_path(char *, const char *);
int ftpd_pclose(FILE *);
FILE *ftpd_popen(char *[], const char *, int);
char *getline(char *, int, FILE *);
int getline(char *, int, FILE *);
void init_curclass(void);
void logxfer(const char *, off_t, const char *, const char *,
const struct timeval *, const char *);
+31 -8
View File
@@ -1363,8 +1363,12 @@ lookup(struct tab *p, const char *cmd)
/*
* getline - a hacked up version of fgets to ignore TELNET escape codes.
* `s' is the buffer to read into.
* `n' is the 1 less than the size of the buffer, to allow trailing NUL
* `iop' is the FILE to read from.
* Returns 0 on success, -1 on EOF, -2 if the command was too long.
*/
char *
int
getline(char *s, int n, FILE *iop)
{
int c;
@@ -1379,7 +1383,7 @@ getline(char *s, int n, FILE *iop)
if (ftpd_debug)
syslog(LOG_DEBUG, "command: %s", s);
tmpline[0] = '\0';
return(s);
return(0);
}
if (c == 0)
tmpline[0] = '\0';
@@ -1418,11 +1422,25 @@ getline(char *s, int n, FILE *iop)
}
}
*cs++ = c;
if (--n <= 0 || c == '\n')
if (--n <= 0) {
/*
* If command doesn't fit into buffer, discard the
* rest of the command and indicate truncation.
* This prevents the command to be split up into
* multiple commands.
*/
if (ftpd_debug)
syslog(LOG_DEBUG,
"command too long, last char: %d", c);
while (c != '\n' && (c = getc(iop)) != EOF)
continue;
return (-2);
}
if (c == '\n')
break;
}
if (c == EOF && cs == s)
return (NULL);
return (-1);
*cs++ = '\0';
if (ftpd_debug) {
if ((curclass.type != CLASS_GUEST &&
@@ -1444,7 +1462,7 @@ getline(char *s, int n, FILE *iop)
syslog(LOG_DEBUG, "command: %.*s", len, s);
}
}
return (s);
return (0);
}
void
@@ -1458,15 +1476,20 @@ ftp_handle_line(char *cp)
void
ftp_loop(void)
{
int ret;
while (1) {
(void) alarm(curclass.timeout);
if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) {
ret = getline(cbuf, sizeof(cbuf)-1, stdin);
(void) alarm(0);
if (ret == -1) {
reply(221, "You could at least say goodbye.");
dologout(0);
} else if (ret == -2) {
reply(500, "Command too long.");
} else {
ftp_handle_line(cbuf);
}
(void) alarm(0);
ftp_handle_line(cbuf);
}
/*NOTREACHED*/
}
+8 -2
View File
@@ -1,4 +1,4 @@
/* $NetBSD: ftpd.c,v 1.176 2006/05/09 20:18:06 mrg Exp $ */
/* $NetBSD: ftpd.c,v 1.187 2008/09/13 03:30:35 lukem Exp $ */
/*
* Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
@@ -2896,6 +2896,7 @@ static int
handleoobcmd()
{
char *cp;
int ret;
if (!urgflag)
return (0);
@@ -2904,9 +2905,14 @@ handleoobcmd()
if (!transflag)
return (0);
cp = tmpline;
if (getline(cp, sizeof(tmpline), stdin) == NULL) {
ret = getline(cp, sizeof(tmpline)-1, stdin);
if (ret == -1) {
reply(221, "You could at least say goodbye.");
dologout(0);
} else if (ret == -2) {
/* Ignore truncated command */
/* XXX: abort xfer with "500 command too long", & return 1 ? */
return 0;
}
/*
* Manually parse OOB commands, because we can't
+23 -18
View File
@@ -570,7 +570,7 @@ crypto_recv(
peer->issuer = emalloc(vallen + 1);
strcpy(peer->issuer, peer->subject);
temp32 = (fstamp >> 16) & 0xffff;
sprintf(statstr,
snprintf(statstr, NTP_MAXSTRLEN,
"flags 0x%x host %s signature %s", fstamp,
peer->subject, OBJ_nid2ln(temp32));
record_crypto_stats(&peer->srcadr, statstr);
@@ -636,7 +636,8 @@ crypto_recv(
}
peer->flash &= ~TEST8;
temp32 = cinfo->nid;
sprintf(statstr, "cert %s 0x%x %s (%u) fs %u",
snprintf(statstr, NTP_MAXSTRLEN,
"cert %s 0x%x %s (%u) fs %u",
cinfo->subject, cinfo->flags,
OBJ_nid2ln(temp32), temp32,
ntohl(ep->fstamp));
@@ -685,7 +686,7 @@ crypto_recv(
peer->crypto |= CRYPTO_FLAG_VRFY |
CRYPTO_FLAG_PROV;
peer->flash &= ~TEST8;
sprintf(statstr, "iff fs %u",
snprintf(statstr, NTP_MAXSTRLEN, "iff fs %u",
ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
@@ -733,7 +734,7 @@ crypto_recv(
peer->crypto |= CRYPTO_FLAG_VRFY |
CRYPTO_FLAG_PROV;
peer->flash &= ~TEST8;
sprintf(statstr, "gq fs %u",
snprintf(statstr, NTP_MAXSTRLEN, "gq fs %u",
ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
@@ -774,7 +775,7 @@ crypto_recv(
peer->crypto |= CRYPTO_FLAG_VRFY |
CRYPTO_FLAG_PROV;
peer->flash &= ~TEST8;
sprintf(statstr, "mv fs %u",
snprintf(statstr, NTP_MAXSTRLEN, "mv fs %u",
ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
@@ -828,7 +829,7 @@ crypto_recv(
peer->crypto &= ~CRYPTO_FLAG_AUTO;
peer->crypto |= CRYPTO_FLAG_AGREE;
peer->flash &= ~TEST8;
sprintf(statstr, "cook %x ts %u fs %u",
snprintf(statstr, NTP_MAXSTRLEN, "cook %x ts %u fs %u",
peer->pcookie, ntohl(ep->tstamp),
ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
@@ -893,7 +894,7 @@ crypto_recv(
peer->crypto &= ~CRYPTO_FLAG_AUTO;
peer->crypto |= CRYPTO_FLAG_AGREE;
peer->flash &= ~TEST8;
sprintf(statstr, "cook %x ts %u fs %u",
snprintf(statstr, NTP_MAXSTRLEN, "cook %x ts %u fs %u",
peer->pcookie, ntohl(ep->tstamp),
ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
@@ -944,7 +945,7 @@ crypto_recv(
peer->pkeyid = bp->key;
peer->crypto |= CRYPTO_FLAG_AUTO;
peer->flash &= ~TEST8;
sprintf(statstr,
snprintf(statstr, NTP_MAXSTRLEN,
"auto seq %d key %x ts %u fs %u", bp->seq,
bp->key, ntohl(ep->tstamp),
ntohl(ep->fstamp));
@@ -987,7 +988,8 @@ crypto_recv(
peer->crypto |= CRYPTO_FLAG_SIGN;
peer->flash &= ~TEST8;
temp32 = cinfo->nid;
sprintf(statstr, "sign %s 0x%x %s (%u) fs %u",
snprintf(statstr, NTP_MAXSTRLEN,
"sign %s 0x%x %s (%u) fs %u",
cinfo->issuer, cinfo->flags,
OBJ_nid2ln(temp32), temp32,
ntohl(ep->fstamp));
@@ -1071,7 +1073,8 @@ crypto_recv(
crypto_flags |= CRYPTO_FLAG_TAI;
peer->crypto |= CRYPTO_FLAG_LEAP;
peer->flash &= ~TEST8;
sprintf(statstr, "leap %u ts %u fs %u", vallen,
snprintf(statstr, NTP_MAXSTRLEN,
"leap %u ts %u fs %u", vallen,
ntohl(ep->tstamp), ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
@@ -1127,7 +1130,7 @@ crypto_recv(
* cheerfully ignored, as the message is not sent.
*/
if (rval > XEVNT_TSP) {
sprintf(statstr,
snprintf(statstr, NTP_MAXSTRLEN,
"error %x opcode %x ts %u fs %u", rval,
code, tstamp, fstamp);
record_crypto_stats(&peer->srcadr, statstr);
@@ -1453,7 +1456,8 @@ crypto_xmit(
*/
if (rval != XEVNT_OK) {
opcode |= CRYPTO_ERROR;
sprintf(statstr, "error %x opcode %x", rval, opcode);
snprintf(statstr, NTP_MAXSTRLEN,
"error %x opcode %x", rval, opcode);
record_crypto_stats(srcadr_sin, statstr);
report_event(rval, NULL);
#ifdef DEBUG
@@ -1612,7 +1616,7 @@ crypto_verify(
*/
EVP_VerifyInit(&ctx, peer->digest);
EVP_VerifyUpdate(&ctx, (u_char *)&ep->tstamp, vallen + 12);
if (!EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen, pkey))
if (EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen, pkey) <= 0)
return (XEVNT_SIG);
if (peer->crypto & CRYPTO_FLAG_VRFY) {
@@ -1952,7 +1956,8 @@ crypto_update(void)
if (EVP_SignFinal(&ctx, tai_leap.sig, &len, sign_pkey))
tai_leap.siglen = htonl(len);
}
sprintf(statstr, "update ts %u", ntohl(hostval.tstamp));
snprintf(statstr, NTP_MAXSTRLEN,
"update ts %u", ntohl(hostval.tstamp));
record_crypto_stats(NULL, statstr);
#ifdef DEBUG
if (debug)
@@ -3606,7 +3611,7 @@ crypto_key(
*/
if ((ptr = strrchr(linkname, '\n')) != NULL)
*ptr = '\0';
sprintf(statstr, "%s mod %d", &linkname[2],
snprintf(statstr, NTP_MAXSTRLEN, "%s mod %d", &linkname[2],
EVP_PKEY_size(pkey) * 8);
record_crypto_stats(NULL, statstr);
#ifdef DEBUG
@@ -3715,8 +3720,8 @@ crypto_cert(
if ((ptr = strrchr(linkname, '\n')) != NULL)
*ptr = '\0';
sprintf(statstr, "%s 0x%x len %lu", &linkname[2], ret->flags,
len);
snprintf(statstr, NTP_MAXSTRLEN,
"%s 0x%x len %lu", &linkname[2], ret->flags, len);
record_crypto_stats(NULL, statstr);
#ifdef DEBUG
if (debug)
@@ -3832,7 +3837,7 @@ crypto_tai(
for (j = 0; j < i; j++)
*ptr++ = htonl(leapsec[j]);
crypto_flags |= CRYPTO_FLAG_TAI;
sprintf(statstr, "%s fs %u leap %u len %u", cp, fstamp,
snprintf(statstr, NTP_MAXSTRLEN, "%s fs %u leap %u len %u", cp, fstamp,
leapsec[--j], len);
record_crypto_stats(NULL, statstr);
#ifdef DEBUG
+9 -2
View File
@@ -409,6 +409,7 @@ process_private(
int mod_okay
)
{
static u_long quiet_until;
struct req_pkt *inpkt;
struct req_pkt_tail *tailinpkt;
struct sockaddr_storage *srcadr;
@@ -444,8 +445,14 @@ process_private(
|| (++ec, INFO_MBZ(inpkt->mbz_itemsize) != 0)
|| (++ec, rbufp->recv_length < REQ_LEN_HDR)
) {
msyslog(LOG_ERR, "process_private: INFO_ERR_FMT: test %d failed, pkt from %s", ec, stoa(srcadr));
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
NLOG(NLOG_SYSEVENT)
if (current_time >= quiet_until) {
msyslog(LOG_ERR,
"process_private: drop test %d"
" failed, pkt from %s",
ec, stoa(srcadr));
quiet_until = current_time + 60;
}
return;
}
+1 -3
View File
@@ -141,10 +141,8 @@ int __opiereadrec FUNCTION((opie), struct opie *opie)
if (c = strchr(opie->opie_principal, ':'))
*c = 0;
if (strlen(opie->opie_principal) > OPIE_PRINCIPAL_MAX)
(opie->opie_principal)[OPIE_PRINCIPAL_MAX] = 0;
strcpy(principal, opie->opie_principal);
strlcpy(principal, opie->opie_principal, sizeof(principal));
do {
if ((opie->opie_recstart = ftell(f)) < 0)
+1 -1
View File
@@ -169,7 +169,7 @@ nb_name_encode(struct nb_name *np, u_char *dst)
memsetw(cp + 2, NB_NAMELEN - 1, NBENCODE(' '));
cp += NB_ENCNAMELEN;
} else {
for (i = 0; *name && i < NB_NAMELEN; i++, cp += 2, name++)
for (i = 0; *name && i < NB_NAMELEN - 1; i++, cp += 2, name++)
*(u_short*)cp = NBENCODE(toupper(*name));
i = NB_NAMELEN - i - 1;
if (i > 0) {
+19 -4
View File
@@ -1285,8 +1285,18 @@ scrub_env(void)
char **cpp, **cpp2;
const char **p;
for (cpp2 = cpp = environ; *cpp; cpp++) {
char ** new_environ;
size_t count;
/* Allocate space for scrubbed environment. */
for (count = 1, cpp = environ; *cpp; count++, cpp++)
continue;
if ((new_environ = malloc(count * sizeof(char *))) == NULL) {
environ = NULL;
return;
}
for (cpp2 = new_environ, cpp = environ; *cpp; cpp++) {
int reject_it = 0;
for(p = rej; *p; p++)
@@ -1300,10 +1310,15 @@ scrub_env(void)
for(p = acc; *p; p++)
if(strncmp(*cpp, *p, strlen(*p)) == 0)
break;
if(*p != NULL)
*cpp2++ = *cpp;
if(*p != NULL) {
if ((*cpp2++ = strdup(*cpp)) == NULL) {
environ = new_environ;
return;
}
}
}
*cpp2 = NULL;
environ = new_environ;
}
/*
+1 -1
View File
@@ -2038,7 +2038,7 @@ int MAIN(int argc, char **argv)
{
ret=RSA_verify(NID_md5_sha1, buf,36, buf2,
rsa_num, rsa_key[j]);
if (ret == 0)
if (ret <= 0)
{
BIO_printf(bio_err,
"RSA verify failure\n");
+1 -1
View File
@@ -285,7 +285,7 @@ bad:
pkey = NETSCAPE_SPKI_get_pubkey(spki);
if(verify) {
i = NETSCAPE_SPKI_verify(spki, pkey);
if(i) BIO_printf(bio_err, "Signature OK\n");
if (i > 0) BIO_printf(bio_err, "Signature OK\n");
else {
BIO_printf(bio_err, "Signature Failure\n");
ERR_print_errors(bio_err);
+1 -2
View File
@@ -266,7 +266,7 @@ static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X
ret=0;
end:
if (i)
if (i > 0)
{
fprintf(stdout,"OK\n");
ret=1;
@@ -367,4 +367,3 @@ static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx)
ERR_clear_error();
return(ok);
}
+1 -1
View File
@@ -1144,7 +1144,7 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
/* NOTE: this certificate can/should be self signed, unless it was
* a certificate request in which case it is not. */
X509_STORE_CTX_set_cert(&xsc,x);
if (!reqfile && !X509_verify_cert(&xsc))
if (!reqfile && X509_verify_cert(&xsc) <= 0)
goto end;
if (!X509_check_private_key(xca,pkey))
+2
View File
@@ -1134,6 +1134,7 @@ void ERR_load_ASN1_strings(void);
#define ASN1_R_BAD_OBJECT_HEADER 102
#define ASN1_R_BAD_PASSWORD_READ 103
#define ASN1_R_BAD_TAG 104
#define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 210
#define ASN1_R_BN_LIB 105
#define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106
#define ASN1_R_BUFFER_TOO_SMALL 107
@@ -1213,6 +1214,7 @@ void ERR_load_ASN1_strings(void);
#define ASN1_R_UNABLE_TO_DECODE_RSA_KEY 157
#define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY 158
#define ASN1_R_UNEXPECTED_EOC 159
#define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 211
#define ASN1_R_UNKNOWN_FORMAT 160
#define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161
#define ASN1_R_UNKNOWN_OBJECT_TYPE 162
+2
View File
@@ -188,6 +188,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
{ERR_REASON(ASN1_R_BAD_OBJECT_HEADER) ,"bad object header"},
{ERR_REASON(ASN1_R_BAD_PASSWORD_READ) ,"bad password read"},
{ERR_REASON(ASN1_R_BAD_TAG) ,"bad tag"},
{ERR_REASON(ASN1_R_BMPSTRING_IS_WRONG_LENGTH),"bmpstring is wrong length"},
{ERR_REASON(ASN1_R_BN_LIB) ,"bn lib"},
{ERR_REASON(ASN1_R_BOOLEAN_IS_WRONG_LENGTH),"boolean is wrong length"},
{ERR_REASON(ASN1_R_BUFFER_TOO_SMALL) ,"buffer too small"},
@@ -267,6 +268,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
{ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_KEY),"unable to decode rsa key"},
{ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY),"unable to decode rsa private key"},
{ERR_REASON(ASN1_R_UNEXPECTED_EOC) ,"unexpected eoc"},
{ERR_REASON(ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH),"universalstring is wrong length"},
{ERR_REASON(ASN1_R_UNKNOWN_FORMAT) ,"unknown format"},
{ERR_REASON(ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM),"unknown message digest algorithm"},
{ERR_REASON(ASN1_R_UNKNOWN_OBJECT_TYPE) ,"unknown object type"},
+12
View File
@@ -1012,6 +1012,18 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
case V_ASN1_SET:
case V_ASN1_SEQUENCE:
default:
if (utype == V_ASN1_BMPSTRING && (len & 1))
{
ASN1err(ASN1_F_ASN1_EX_C2I,
ASN1_R_BMPSTRING_IS_WRONG_LENGTH);
goto err;
}
if (utype == V_ASN1_UNIVERSALSTRING && (len & 3))
{
ASN1err(ASN1_F_ASN1_EX_C2I,
ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH);
goto err;
}
/* All based on ASN1_STRING and handled the same */
if (!*pval)
{
+1 -1
View File
@@ -1044,7 +1044,7 @@ int ssl2_set_certificate(SSL *s, int type, int len, const unsigned char *data)
i=ssl_verify_cert_chain(s,sk);
if ((s->verify_mode != SSL_VERIFY_NONE) && (!i))
if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0))
{
SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED);
goto err;
+2 -2
View File
@@ -1054,7 +1054,7 @@ static int request_certificate(SSL *s)
i=ssl_verify_cert_chain(s,sk);
if (i) /* we like the packet, now check the chksum */
if (i > 0) /* we like the packet, now check the chksum */
{
EVP_MD_CTX ctx;
EVP_PKEY *pkey=NULL;
@@ -1083,7 +1083,7 @@ static int request_certificate(SSL *s)
EVP_PKEY_free(pkey);
EVP_MD_CTX_cleanup(&ctx);
if (i)
if (i > 0)
{
if (s->session->peer != NULL)
X509_free(s->session->peer);
+4 -3
View File
@@ -883,7 +883,7 @@ int ssl3_get_server_certificate(SSL *s)
}
i=ssl_verify_cert_chain(s,sk);
if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)
if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)
#ifndef OPENSSL_NO_KRB5
&& (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK))
!= (SSL_aKRB5|SSL_kKRB5)
@@ -1289,6 +1289,7 @@ int ssl3_get_key_exchange(SSL *s)
s->session->sess_cert->peer_ecdh_tmp=ecdh;
ecdh=NULL;
BN_CTX_free(bn_ctx);
bn_ctx = NULL;
EC_POINT_free(srvr_ecpoint);
srvr_ecpoint = NULL;
}
@@ -1368,7 +1369,7 @@ int ssl3_get_key_exchange(SSL *s)
EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
EVP_VerifyUpdate(&md_ctx,param,param_len);
if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey))
if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0)
{
/* bad signature */
al=SSL_AD_DECRYPT_ERROR;
@@ -1386,7 +1387,7 @@ int ssl3_get_key_exchange(SSL *s)
EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE);
EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE);
EVP_VerifyUpdate(&md_ctx,param,param_len);
if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey))
if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0)
{
/* bad signature */
al=SSL_AD_DECRYPT_ERROR;
+3
View File
@@ -2375,6 +2375,9 @@ int ssl3_renegotiate(SSL *s)
if (s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS)
return(0);
if (1)
return(0);
s->s3->renegotiate=1;
return(1);
}
+2 -5
View File
@@ -976,9 +976,7 @@ start:
if (s->msg_callback)
s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, s->s3->handshake_fragment, 4, s, s->msg_callback_arg);
if (SSL_is_init_finished(s) &&
!(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS) &&
!s->s3->renegotiate)
if (0)
{
ssl3_renegotiate(s);
if (ssl3_renegotiate_check(s))
@@ -1109,8 +1107,7 @@ start:
/* Unexpected handshake message (Client Hello, or protocol violation) */
if ((s->s3->handshake_fragment_len >= 4) && !s->in_handshake)
{
if (((s->state&SSL_ST_MASK) == SSL_ST_OK) &&
!(s->s3->flags & SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS))
if (0)
{
#if 0 /* worked only because C operator preferences are not as expected (and
* because this is not really needed for clients except for detecting
+8 -1
View File
@@ -672,6 +672,13 @@ int ssl3_get_client_hello(SSL *s)
#endif
STACK_OF(SSL_CIPHER) *ciphers=NULL;
if (s->new_session)
{
al=SSL_AD_HANDSHAKE_FAILURE;
SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, ERR_R_INTERNAL_ERROR);
goto f_err;
}
/* We do this so that we will respond with our native type.
* If we are TLSv1 and we get SSLv3, we will respond with TLSv1,
* This down switching should be handled by a different method.
@@ -2481,7 +2488,7 @@ int ssl3_get_client_certificate(SSL *s)
else
{
i=ssl_verify_cert_chain(s,sk);
if (!i)
if (i <= 0)
{
al=ssl_verify_alarm_type(s->verify_result);
SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED);
+1 -1
View File
@@ -2072,7 +2072,7 @@ static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg)
if (cb_arg->proxy_auth)
{
if (ok)
if (ok > 0)
{
const char *cond_end = NULL;
+1 -1
View File
@@ -32,7 +32,7 @@
db
entropy uname=operator gname=operator mode=0700
..
freebsd-update
freebsd-update mode=0700
..
ipf mode=0700
..
+3 -1
View File
@@ -64,10 +64,12 @@
.ds doc-volume-as-arm arm
.
.\" Default .Os value
.ds doc-default-operating-system FreeBSD\~7.0
.ds doc-default-operating-system FreeBSD\~7.1
.
.\" FreeBSD releases not found in doc-common
.ds doc-operating-system-FreeBSD-6.3 6.3
.ds doc-operating-system-FreeBSD-6.4 6.4
.ds doc-operating-system-FreeBSD-7.1 7.1
.ds doc-operating-system-FreeBSD-8.0 8.0
.
.ec
+3 -2
View File
@@ -49,7 +49,7 @@
*/
/*
* $Id: nameser.h,v 1.7.18.1 2005/04/27 05:00:50 sra Exp $
* $Id: nameser.h,v 1.7.18.2 2008/04/03 23:15:15 marka Exp $
* $FreeBSD$
*/
@@ -424,9 +424,10 @@ typedef enum __ns_cert_types {
#define NS_NXT_MAX 127
/*%
* EDNS0 extended flags, host order.
* EDNS0 extended flags and option codes, host order.
*/
#define NS_OPT_DNSSEC_OK 0x8000U
#define NS_OPT_NSID 3
/*%
* Inline versions of get/put short/long. Pointer is advanced.
+5 -1
View File
@@ -50,7 +50,7 @@
/*%
* @(#)resolv.h 8.1 (Berkeley) 6/2/93
* $Id: resolv.h,v 1.19.18.3 2005/08/25 04:43:51 marka Exp $
* $Id: resolv.h,v 1.19.18.4 2008/04/03 23:15:15 marka Exp $
* $FreeBSD$
*/
@@ -245,6 +245,7 @@ union res_sockaddr_union {
#define RES_NOCHECKNAME 0x00008000 /*%< do not check names for sanity. */
#define RES_KEEPTSIG 0x00010000 /*%< do not strip TSIG records */
#define RES_BLAST 0x00020000 /*%< blast all recursive servers */
#define RES_NSID 0x00040000 /*%< request name server ID */
#define RES_NOTLDQUERY 0x00100000 /*%< don't unqualified name as a tld */
#define RES_USE_DNSSEC 0x00200000 /*%< use DNSSEC using OK bit in OPT */
/* #define RES_DEBUG2 0x00400000 */ /* nslookup internal */
@@ -386,6 +387,7 @@ extern const struct res_sym __p_rcode_syms[];
#define sym_ntos __sym_ntos
#define sym_ston __sym_ston
#define res_nopt __res_nopt
#define res_nopt_rdata __res_nopt_rdata
#define res_ndestroy __res_ndestroy
#define res_nametoclass __res_nametoclass
#define res_nametotype __res_nametotype
@@ -474,6 +476,8 @@ int res_findzonecut2(res_state, const char *, ns_class, int,
union res_sockaddr_union *, int);
void res_nclose(res_state);
int res_nopt(res_state, int, u_char *, int, int);
int res_nopt_rdata(res_state, int, u_char *, int, u_char *,
u_short, u_short, u_char *);
void res_send_setqhook(res_send_qhook);
void res_send_setrhook(res_send_rhook);
int __res_vinit(res_state, int);
+91 -24
View File
@@ -395,8 +395,7 @@ archive_entry_clone(struct archive_entry *entry)
aes_copy(&entry2->ae_hardlink, &entry->ae_hardlink);
aes_copy(&entry2->ae_pathname, &entry->ae_pathname);
aes_copy(&entry2->ae_symlink, &entry->ae_symlink);
entry2->ae_hardlinkset = entry->ae_hardlinkset;
entry2->ae_symlinkset = entry->ae_symlinkset;
entry2->ae_set = entry->ae_set;
aes_copy(&entry2->ae_uname, &entry->ae_uname);
/* Copy ACL data over. */
@@ -455,12 +454,24 @@ archive_entry_atime_nsec(struct archive_entry *entry)
return (entry->ae_stat.aest_atime_nsec);
}
int
archive_entry_atime_is_set(struct archive_entry *entry)
{
return (entry->ae_set & AE_SET_ATIME);
}
time_t
archive_entry_ctime(struct archive_entry *entry)
{
return (entry->ae_stat.aest_ctime);
}
int
archive_entry_ctime_is_set(struct archive_entry *entry)
{
return (entry->ae_set & AE_SET_CTIME);
}
long
archive_entry_ctime_nsec(struct archive_entry *entry)
{
@@ -562,17 +573,17 @@ archive_entry_gname_w(struct archive_entry *entry)
const char *
archive_entry_hardlink(struct archive_entry *entry)
{
if (!entry->ae_hardlinkset)
return (NULL);
return (aes_get_mbs(&entry->ae_hardlink));
if (entry->ae_set & AE_SET_HARDLINK)
return (aes_get_mbs(&entry->ae_hardlink));
return (NULL);
}
const wchar_t *
archive_entry_hardlink_w(struct archive_entry *entry)
{
if (!entry->ae_hardlinkset)
return (NULL);
return (aes_get_wcs(&entry->ae_hardlink));
if (entry->ae_set & AE_SET_HARDLINK)
return (aes_get_wcs(&entry->ae_hardlink));
return (NULL);
}
ino_t
@@ -599,6 +610,12 @@ archive_entry_mtime_nsec(struct archive_entry *entry)
return (entry->ae_stat.aest_mtime_nsec);
}
int
archive_entry_mtime_is_set(struct archive_entry *entry)
{
return (entry->ae_set & AE_SET_MTIME);
}
unsigned int
archive_entry_nlink(struct archive_entry *entry)
{
@@ -651,6 +668,12 @@ archive_entry_size(struct archive_entry *entry)
return (entry->ae_stat.aest_size);
}
int
archive_entry_size_is_set(struct archive_entry *entry)
{
return (entry->ae_set & AE_SET_SIZE);
}
const char *
archive_entry_sourcepath(struct archive_entry *entry)
{
@@ -660,17 +683,17 @@ archive_entry_sourcepath(struct archive_entry *entry)
const char *
archive_entry_symlink(struct archive_entry *entry)
{
if (!entry->ae_symlinkset)
return (NULL);
return (aes_get_mbs(&entry->ae_symlink));
if (entry->ae_set & AE_SET_SYMLINK)
return (aes_get_mbs(&entry->ae_symlink));
return (NULL);
}
const wchar_t *
archive_entry_symlink_w(struct archive_entry *entry)
{
if (!entry->ae_symlinkset)
return (NULL);
return (aes_get_wcs(&entry->ae_symlink));
if (entry->ae_set & AE_SET_SYMLINK)
return (aes_get_wcs(&entry->ae_symlink));
return (NULL);
}
uid_t
@@ -773,7 +796,9 @@ archive_entry_set_hardlink(struct archive_entry *entry, const char *target)
{
aes_set_mbs(&entry->ae_hardlink, target);
if (target != NULL)
entry->ae_hardlinkset = 1;
entry->ae_set |= AE_SET_HARDLINK;
else
entry->ae_set &= ~AE_SET_HARDLINK;
}
void
@@ -781,7 +806,9 @@ archive_entry_copy_hardlink(struct archive_entry *entry, const char *target)
{
aes_copy_mbs(&entry->ae_hardlink, target);
if (target != NULL)
entry->ae_hardlinkset = 1;
entry->ae_set |= AE_SET_HARDLINK;
else
entry->ae_set &= ~AE_SET_HARDLINK;
}
void
@@ -789,25 +816,43 @@ archive_entry_copy_hardlink_w(struct archive_entry *entry, const wchar_t *target
{
aes_copy_wcs(&entry->ae_hardlink, target);
if (target != NULL)
entry->ae_hardlinkset = 1;
entry->ae_set |= AE_SET_HARDLINK;
else
entry->ae_set &= ~AE_SET_HARDLINK;
}
void
archive_entry_set_atime(struct archive_entry *entry, time_t t, long ns)
{
entry->stat_valid = 0;
entry->ae_set |= AE_SET_ATIME;
entry->ae_stat.aest_atime = t;
entry->ae_stat.aest_atime_nsec = ns;
}
void
archive_entry_unset_atime(struct archive_entry *entry)
{
archive_entry_set_atime(entry, 0, 0);
entry->ae_set &= ~AE_SET_ATIME;
}
void
archive_entry_set_ctime(struct archive_entry *entry, time_t t, long ns)
{
entry->stat_valid = 0;
entry->ae_set |= AE_SET_CTIME;
entry->ae_stat.aest_ctime = t;
entry->ae_stat.aest_ctime_nsec = ns;
}
void
archive_entry_unset_ctime(struct archive_entry *entry)
{
archive_entry_set_ctime(entry, 0, 0);
entry->ae_set &= ~AE_SET_CTIME;
}
void
archive_entry_set_dev(struct archive_entry *entry, dev_t d)
{
@@ -836,7 +881,7 @@ archive_entry_set_devminor(struct archive_entry *entry, dev_t m)
void
archive_entry_set_link(struct archive_entry *entry, const char *target)
{
if (entry->ae_symlinkset)
if (entry->ae_set & AE_SET_SYMLINK)
aes_set_mbs(&entry->ae_symlink, target);
else
aes_set_mbs(&entry->ae_hardlink, target);
@@ -846,7 +891,7 @@ archive_entry_set_link(struct archive_entry *entry, const char *target)
void
archive_entry_copy_link(struct archive_entry *entry, const char *target)
{
if (entry->ae_symlinkset)
if (entry->ae_set & AE_SET_SYMLINK)
aes_copy_mbs(&entry->ae_symlink, target);
else
aes_copy_mbs(&entry->ae_hardlink, target);
@@ -856,7 +901,7 @@ archive_entry_copy_link(struct archive_entry *entry, const char *target)
void
archive_entry_copy_link_w(struct archive_entry *entry, const wchar_t *target)
{
if (entry->ae_symlinkset)
if (entry->ae_set & AE_SET_SYMLINK)
aes_copy_wcs(&entry->ae_symlink, target);
else
aes_copy_wcs(&entry->ae_hardlink, target);
@@ -865,7 +910,7 @@ archive_entry_copy_link_w(struct archive_entry *entry, const wchar_t *target)
int
archive_entry_update_link_utf8(struct archive_entry *entry, const char *target)
{
if (entry->ae_symlinkset)
if (entry->ae_set & AE_SET_SYMLINK)
return (aes_update_utf8(&entry->ae_symlink, target));
else
return (aes_update_utf8(&entry->ae_hardlink, target));
@@ -882,10 +927,18 @@ void
archive_entry_set_mtime(struct archive_entry *entry, time_t m, long ns)
{
entry->stat_valid = 0;
entry->ae_set |= AE_SET_MTIME;
entry->ae_stat.aest_mtime = m;
entry->ae_stat.aest_mtime_nsec = ns;
}
void
archive_entry_unset_mtime(struct archive_entry *entry)
{
archive_entry_set_mtime(entry, 0, 0);
entry->ae_set &= ~AE_SET_MTIME;
}
void
archive_entry_set_nlink(struct archive_entry *entry, unsigned int nlink)
{
@@ -954,6 +1007,14 @@ archive_entry_set_size(struct archive_entry *entry, int64_t s)
{
entry->stat_valid = 0;
entry->ae_stat.aest_size = s;
entry->ae_set |= AE_SET_SIZE;
}
void
archive_entry_unset_size(struct archive_entry *entry)
{
archive_entry_set_size(entry, 0);
entry->ae_set &= ~AE_SET_SIZE;
}
void
@@ -967,7 +1028,9 @@ archive_entry_set_symlink(struct archive_entry *entry, const char *linkname)
{
aes_set_mbs(&entry->ae_symlink, linkname);
if (linkname != NULL)
entry->ae_symlinkset = 1;
entry->ae_set |= AE_SET_SYMLINK;
else
entry->ae_set &= ~AE_SET_SYMLINK;
}
void
@@ -975,7 +1038,9 @@ archive_entry_copy_symlink(struct archive_entry *entry, const char *linkname)
{
aes_copy_mbs(&entry->ae_symlink, linkname);
if (linkname != NULL)
entry->ae_symlinkset = 1;
entry->ae_set |= AE_SET_SYMLINK;
else
entry->ae_set &= ~AE_SET_SYMLINK;
}
void
@@ -983,7 +1048,9 @@ archive_entry_copy_symlink_w(struct archive_entry *entry, const wchar_t *linknam
{
aes_copy_wcs(&entry->ae_symlink, linkname);
if (linkname != NULL)
entry->ae_symlinkset = 1;
entry->ae_set |= AE_SET_SYMLINK;
else
entry->ae_set &= ~AE_SET_SYMLINK;
}
void
+30 -2
View File
@@ -1,5 +1,5 @@
/*-
* Copyright (c) 2003-2007 Tim Kientzle
* Copyright (c) 2003-2008 Tim Kientzle
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -152,12 +152,29 @@ __LA_DECL struct archive_entry *archive_entry_new(void);
/*
* Retrieve fields from an archive_entry.
*
* There are a number of implicit conversions among these fields. For
* example, if a regular string field is set and you read the _w wide
* character field, the entry will implicitly convert narrow-to-wide
* using the current locale. Similarly, dev values are automatically
* updated when you write devmajor or devminor and vice versa.
*
* In addition, fields can be "set" or "unset." Unset string fields
* return NULL, non-string fields have _is_set() functions to test
* whether they've been set. You can "unset" a string field by
* assigning NULL; non-string fields have _unset() functions to
* unset them.
*
* Note: There is one ambiguity in the above; string fields will
* also return NULL when implicit character set conversions fail.
* This is usually what you want.
*/
__LA_DECL time_t archive_entry_atime(struct archive_entry *);
__LA_DECL long archive_entry_atime_nsec(struct archive_entry *);
__LA_DECL int archive_entry_atime_is_set(struct archive_entry *);
__LA_DECL time_t archive_entry_ctime(struct archive_entry *);
__LA_DECL long archive_entry_ctime_nsec(struct archive_entry *);
__LA_DECL int archive_entry_ctime_is_set(struct archive_entry *);
__LA_DECL dev_t archive_entry_dev(struct archive_entry *);
__LA_DECL dev_t archive_entry_devmajor(struct archive_entry *);
__LA_DECL dev_t archive_entry_devminor(struct archive_entry *);
@@ -175,6 +192,7 @@ __LA_DECL __LA_INO_T archive_entry_ino(struct archive_entry *);
__LA_DECL __LA_MODE_T archive_entry_mode(struct archive_entry *);
__LA_DECL time_t archive_entry_mtime(struct archive_entry *);
__LA_DECL long archive_entry_mtime_nsec(struct archive_entry *);
__LA_DECL int archive_entry_mtime_is_set(struct archive_entry *);
__LA_DECL unsigned int archive_entry_nlink(struct archive_entry *);
__LA_DECL const char *archive_entry_pathname(struct archive_entry *);
__LA_DECL const wchar_t *archive_entry_pathname_w(struct archive_entry *);
@@ -183,6 +201,7 @@ __LA_DECL dev_t archive_entry_rdevmajor(struct archive_entry *);
__LA_DECL dev_t archive_entry_rdevminor(struct archive_entry *);
__LA_DECL const char *archive_entry_sourcepath(struct archive_entry *);
__LA_DECL int64_t archive_entry_size(struct archive_entry *);
__LA_DECL int archive_entry_size_is_set(struct archive_entry *);
__LA_DECL const char *archive_entry_strmode(struct archive_entry *);
__LA_DECL const char *archive_entry_symlink(struct archive_entry *);
__LA_DECL const wchar_t *archive_entry_symlink_w(struct archive_entry *);
@@ -195,10 +214,16 @@ __LA_DECL const wchar_t *archive_entry_uname_w(struct archive_entry *);
*
* Note that string 'set' functions do not copy the string, only the pointer.
* In contrast, 'copy' functions do copy the object pointed to.
*
* Note: As of libarchive 2.4, 'set' functions do copy the string and
* are therefore exact synonyms for the 'copy' versions. The 'copy'
* names will be retired in libarchive 3.0.
*/
__LA_DECL void archive_entry_set_atime(struct archive_entry *, time_t, long);
__LA_DECL void archive_entry_unset_atime(struct archive_entry *);
__LA_DECL void archive_entry_set_ctime(struct archive_entry *, time_t, long);
__LA_DECL void archive_entry_unset_ctime(struct archive_entry *);
__LA_DECL void archive_entry_set_dev(struct archive_entry *, dev_t);
__LA_DECL void archive_entry_set_devmajor(struct archive_entry *, dev_t);
__LA_DECL void archive_entry_set_devminor(struct archive_entry *, dev_t);
@@ -226,6 +251,7 @@ __LA_DECL void archive_entry_copy_link_w(struct archive_entry *, const wchar_t *
__LA_DECL int archive_entry_update_link_utf8(struct archive_entry *, const char *);
__LA_DECL void archive_entry_set_mode(struct archive_entry *, __LA_MODE_T);
__LA_DECL void archive_entry_set_mtime(struct archive_entry *, time_t, long);
__LA_DECL void archive_entry_unset_mtime(struct archive_entry *);
__LA_DECL void archive_entry_set_nlink(struct archive_entry *, unsigned int);
__LA_DECL void archive_entry_set_pathname(struct archive_entry *, const char *);
__LA_DECL void archive_entry_copy_pathname(struct archive_entry *, const char *);
@@ -236,6 +262,7 @@ __LA_DECL void archive_entry_set_rdev(struct archive_entry *, dev_t);
__LA_DECL void archive_entry_set_rdevmajor(struct archive_entry *, dev_t);
__LA_DECL void archive_entry_set_rdevminor(struct archive_entry *, dev_t);
__LA_DECL void archive_entry_set_size(struct archive_entry *, int64_t);
__LA_DECL void archive_entry_unset_size(struct archive_entry *);
__LA_DECL void archive_entry_copy_sourcepath(struct archive_entry *, const char *);
__LA_DECL void archive_entry_set_symlink(struct archive_entry *, const char *);
__LA_DECL void archive_entry_copy_symlink(struct archive_entry *, const char *);
@@ -257,6 +284,7 @@ __LA_DECL int archive_entry_update_uname_utf8(struct archive_entry *, const char
__LA_DECL const struct stat *archive_entry_stat(struct archive_entry *);
__LA_DECL void archive_entry_copy_stat(struct archive_entry *, const struct stat *);
/*
* ACL routines. This used to simply store and return text-format ACL
* strings, but that proved insufficient for a number of reasons:
+8 -2
View File
@@ -136,6 +136,14 @@ struct archive_entry {
dev_t aest_rdevminor;
} ae_stat;
int ae_set; /* bitmap of fields that are currently set */
#define AE_SET_HARDLINK 1
#define AE_SET_SYMLINK 2
#define AE_SET_ATIME 4
#define AE_SET_CTIME 8
#define AE_SET_MTIME 16
#define AE_SET_SIZE 64
/*
* Use aes here so that we get transparent mbs<->wcs conversions.
*/
@@ -147,8 +155,6 @@ struct archive_entry {
struct aes ae_pathname; /* Name of entry */
struct aes ae_symlink; /* symlink contents */
struct aes ae_uname; /* Name of owner */
unsigned char ae_hardlinkset;
unsigned char ae_symlinkset;
/* Not used within libarchive; useful for some clients. */
struct aes ae_sourcepath; /* Path this entry is sourced from. */
@@ -138,6 +138,15 @@ __FBSDID("$FreeBSD$");
#define PVD_reserved4_size 1
#define PVD_application_data_offset (PVD_reserved4_offset + PVD_reserved4_size)
#define PVD_application_data_size 512
#define PVD_reserved5_offset (PVD_application_data_offset + PVD_application_data_size)
#define PVD_reserved5_size (2048 - PVD_reserved5_offset)
/* TODO: It would make future maintenance easier to just hardcode the
* above values. In particular, ECMA119 states the offsets as part of
* the standard. That would eliminate the need for the following check.*/
#if PVD_reserved5_offset != 1395
#error PVD offset and size definitions are wrong.
#endif
/* Structure of an on-disk directory record. */
/* Note: ISO9660 stores each multi-byte integer twice, once in
@@ -178,17 +187,20 @@ struct file_info {
uint64_t size; /* File size in bytes. */
uint64_t ce_offset; /* Offset of CE */
uint64_t ce_size; /* Size of CE */
time_t birthtime; /* File created time. */
time_t mtime; /* File last modified time. */
time_t atime; /* File last accessed time. */
time_t ctime; /* File creation time. */
time_t ctime; /* File attribute change time. */
uint64_t rdev; /* Device number */
mode_t mode;
uid_t uid;
gid_t gid;
ino_t inode;
int nlinks;
char *name; /* Null-terminated filename. */
struct archive_string name; /* Pathname */
char name_continues; /* Non-zero if name continues */
struct archive_string symlink;
char symlink_continues; /* Non-zero if link continues */
};
@@ -210,6 +222,7 @@ struct iso9660 {
uint64_t current_position;
ssize_t logical_block_size;
uint64_t volume_size; /* Total size of volume in bytes. */
off_t entry_sparse_offset;
int64_t entry_bytes_remaining;
@@ -224,7 +237,9 @@ static int archive_read_format_iso9660_read_data_skip(struct archive_read *);
static int archive_read_format_iso9660_read_header(struct archive_read *,
struct archive_entry *);
static const char *build_pathname(struct archive_string *, struct file_info *);
#if DEBUG
static void dump_isodirrec(FILE *, const unsigned char *isodirrec);
#endif
static time_t time_from_tm(struct tm *);
static time_t isodate17(const unsigned char *);
static time_t isodate7(const unsigned char *);
@@ -238,6 +253,12 @@ static struct file_info *
static void parse_rockridge(struct iso9660 *iso9660,
struct file_info *file, const unsigned char *start,
const unsigned char *end);
static void parse_rockridge_NM1(struct file_info *,
const unsigned char *, int);
static void parse_rockridge_SL1(struct file_info *,
const unsigned char *, int);
static void parse_rockridge_TF1(struct file_info *,
const unsigned char *, int);
static void release_file(struct iso9660 *, struct file_info *);
static unsigned toi(const void *p, int n);
@@ -314,13 +335,61 @@ static int
isPVD(struct iso9660 *iso9660, const unsigned char *h)
{
struct file_info *file;
int i;
if (h[0] != 1)
return (0);
if (memcmp(h+1, "CD001", 5) != 0)
/* Type of the Primary Volume Descriptor must be 1. */
if (h[PVD_type_offset] != 1)
return (0);
/* ID must be "CD001" */
if (memcmp(h + PVD_id_offset, "CD001", 5) != 0)
return (0);
/* PVD version must be 1. */
if (h[PVD_version_offset] != 1)
return (0);
/* Reserved field must be 0. */
if (h[PVD_reserved1_offset] != 0)
return (0);
/* Reserved field must be 0. */
for (i = 0; i < PVD_reserved2_size; ++i)
if (h[PVD_reserved2_offset + i] != 0)
return (0);
/* Reserved field must be 0. */
for (i = 0; i < PVD_reserved3_size; ++i)
if (h[PVD_reserved3_offset + i] != 0)
return (0);
/* Logical block size must be > 0. */
/* I've looked at Ecma 119 and can't find any stronger
* restriction on this field. */
iso9660->logical_block_size = toi(h + PVD_logical_block_size_offset, 2);
if (iso9660->logical_block_size <= 0)
return (0);
iso9660->volume_size = iso9660->logical_block_size
* (uint64_t)toi(h + PVD_volume_space_size_offset, 4);
/* File structure version must be 1 for ISO9660/ECMA119. */
if (h[PVD_file_structure_version_offset] != 1)
return (0);
/* Reserved field must be 0. */
for (i = 0; i < PVD_reserved4_size; ++i)
if (h[PVD_reserved4_offset + i] != 0)
return (0);
/* Reserved field must be 0. */
for (i = 0; i < PVD_reserved5_size; ++i)
if (h[PVD_reserved5_offset + i] != 0)
return (0);
/* XXX TODO: Check other values for sanity; reject more
* malformed PVDs. XXX */
/* Store the root directory in the pending list. */
file = parse_file_info(iso9660, NULL, h + PVD_root_directory_record_offset);
@@ -352,12 +421,22 @@ archive_read_format_iso9660_read_header(struct archive_read *a,
iso9660->entry_bytes_remaining = file->size;
iso9660->entry_sparse_offset = 0; /* Offset for sparse-file-aware clients. */
if (file->offset + file->size > iso9660->volume_size) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"File is beyond end-of-media: %s", file->name);
iso9660->entry_bytes_remaining = 0;
iso9660->entry_sparse_offset = 0;
release_file(iso9660, file);
return (ARCHIVE_WARN);
}
/* Set up the entry structure with information about this entry. */
archive_entry_set_mode(entry, file->mode);
archive_entry_set_uid(entry, file->uid);
archive_entry_set_gid(entry, file->gid);
archive_entry_set_nlink(entry, file->nlinks);
archive_entry_set_ino(entry, file->inode);
/* archive_entry_set_birthtime(entry, file->birthtime, 0); */
archive_entry_set_mtime(entry, file->mtime, 0);
archive_entry_set_ctime(entry, file->ctime, 0);
archive_entry_set_atime(entry, file->atime, 0);
@@ -535,13 +614,7 @@ parse_file_info(struct iso9660 *iso9660, struct file_info *parent,
file->mtime = isodate7(isodirrec + DR_date_offset);
file->ctime = file->atime = file->mtime;
name_len = (size_t)*(const unsigned char *)(isodirrec + DR_name_len_offset);
file->name = (char *)malloc(name_len + 1);
if (file->name == NULL) {
free(file);
return (NULL);
}
memcpy(file->name, isodirrec + DR_name_offset, name_len);
file->name[name_len] = '\0';
archive_strncpy(&file->name, isodirrec + DR_name_offset, name_len);
flags = *(isodirrec + DR_flags_offset);
if (flags & 0x02)
file->mode = AE_IFDIR | 0700;
@@ -561,6 +634,7 @@ parse_file_info(struct iso9660 *iso9660, struct file_info *parent,
parse_rockridge(iso9660, file, rr_start, rr_end);
}
#if DEBUG
/* DEBUGGING: Warn about attributes I don't yet fully support. */
if ((flags & ~0x02) != 0) {
fprintf(stderr, "\n ** Unrecognized flag: ");
@@ -583,7 +657,7 @@ parse_file_info(struct iso9660 *iso9660, struct file_info *parent,
dump_isodirrec(stderr, isodirrec);
fprintf(stderr, "\n");
}
#endif
return (file);
}
@@ -623,6 +697,7 @@ parse_rockridge(struct iso9660 *iso9660, struct file_info *file,
while (p + 4 < end /* Enough space for another entry. */
&& p[0] >= 'A' && p[0] <= 'Z' /* Sanity-check 1st char of name. */
&& p[1] >= 'A' && p[1] <= 'Z' /* Sanity-check 2nd char of name. */
&& p[2] >= 4 /* Sanity-check length. */
&& p + p[2] <= end) { /* Sanity-check length. */
const unsigned char *data = p + 4;
int data_length = p[2] - 4;
@@ -635,61 +710,54 @@ parse_rockridge(struct iso9660 *iso9660, struct file_info *file,
*/
switch(p[0]) {
case 'C':
if (p[0] == 'C' && p[1] == 'E' && version == 1) {
/*
* CE extension comprises:
* 8 byte sector containing extension
* 8 byte offset w/in above sector
* 8 byte length of continuation
*/
file->ce_offset = toi(data, 4)
* iso9660->logical_block_size
+ toi(data + 8, 4);
file->ce_size = toi(data + 16, 4);
if (p[0] == 'C' && p[1] == 'E') {
if (version == 1 && data_length == 24) {
/*
* CE extension comprises:
* 8 byte sector containing extension
* 8 byte offset w/in above sector
* 8 byte length of continuation
*/
file->ce_offset = (uint64_t)toi(data, 4)
* iso9660->logical_block_size
+ toi(data + 8, 4);
file->ce_size = toi(data + 16, 4);
/* If the result is rediculous,
* ignore it. */
if (file->ce_offset + file->ce_size
> iso9660->volume_size) {
file->ce_offset = 0;
file->ce_size = 0;
}
}
break;
}
/* FALLTHROUGH */
case 'N':
if (p[0] == 'N' && p[1] == 'M' && version == 1
&& *data == 0) {
/* NM extension with flag byte == 0 */
/*
* NM extension comprises:
* one byte flag
* rest is long name
*/
/* TODO: Obey flags. */
char *old_name = file->name;
data++; /* Skip flag byte. */
data_length--;
file->name = (char *)malloc(data_length + 1);
if (file->name != NULL) {
free(old_name);
memcpy(file->name, data, data_length);
file->name[data_length] = '\0';
} else
file->name = old_name;
if (p[0] == 'N' && p[1] == 'M') {
if (version == 1)
parse_rockridge_NM1(file,
data, data_length);
break;
}
/* FALLTHROUGH */
case 'P':
if (p[0] == 'P' && p[1] == 'D' && version == 1) {
if (p[0] == 'P' && p[1] == 'D') {
/*
* PD extension is padding;
* contents are always ignored.
*/
break;
}
if (p[0] == 'P' && p[1] == 'N' && version == 1) {
if (data_length == 16) {
if (p[0] == 'P' && p[1] == 'N') {
if (version == 1 && data_length == 16) {
file->rdev = toi(data,4);
file->rdev <<= 32;
file->rdev |= toi(data + 8, 4);
}
break;
}
if (p[0] == 'P' && p[1] == 'X' && version == 1) {
if (p[0] == 'P' && p[1] == 'X') {
/*
* PX extension comprises:
* 8 bytes for mode,
@@ -698,12 +766,22 @@ parse_rockridge(struct iso9660 *iso9660, struct file_info *file,
* 8 bytes for gid,
* 8 bytes for inode.
*/
if (data_length == 32) {
file->mode = toi(data, 4);
file->nlinks = toi(data + 8, 4);
file->uid = toi(data + 16, 4);
file->gid = toi(data + 24, 4);
file->inode = toi(data + 32, 4);
if (version == 1) {
if (data_length >= 8)
file->mode
= toi(data, 4);
if (data_length >= 16)
file->nlinks
= toi(data + 8, 4);
if (data_length >= 24)
file->uid
= toi(data + 16, 4);
if (data_length >= 32)
file->gid
= toi(data + 24, 4);
if (data_length >= 40)
file->inode
= toi(data + 32, 4);
}
break;
}
@@ -720,56 +798,14 @@ parse_rockridge(struct iso9660 *iso9660, struct file_info *file,
}
/* FALLTHROUGH */
case 'S':
if (p[0] == 'S' && p[1] == 'L' && version == 1
&& *data == 0) {
int cont = 1;
/* SL extension with flags == 0 */
/* TODO: handle non-zero flag values. */
data++; /* Skip flag byte. */
data_length--;
while (data_length > 0) {
unsigned char flag = *data++;
unsigned char nlen = *data++;
data_length -= 2;
if (cont == 0)
archive_strcat(&file->symlink, "/");
cont = 0;
switch(flag) {
case 0x01: /* Continue */
archive_strncat(&file->symlink,
(const char *)data, nlen);
cont = 1;
break;
case 0x02: /* Current */
archive_strcat(&file->symlink, ".");
break;
case 0x04: /* Parent */
archive_strcat(&file->symlink, "..");
break;
case 0x08: /* Root */
case 0x10: /* Volume root */
archive_string_empty(&file->symlink);
break;
case 0x20: /* Hostname */
archive_strcat(&file->symlink, "hostname");
break;
case 0:
archive_strncat(&file->symlink,
(const char *)data, nlen);
break;
default:
/* TODO: issue a warning ? */
break;
}
data += nlen;
data_length -= nlen;
}
if (p[0] == 'S' && p[1] == 'L') {
if (version == 1)
parse_rockridge_SL1(file,
data, data_length);
break;
}
if (p[0] == 'S' && p[1] == 'P'
&& version == 1 && data_length == 7
&& version == 1 && data_length == 3
&& data[0] == (unsigned char)'\xbe'
&& data[1] == (unsigned char)'\xef') {
/*
@@ -805,66 +841,27 @@ parse_rockridge(struct iso9660 *iso9660, struct file_info *file,
return;
}
case 'T':
if (p[0] == 'T' && p[1] == 'F' && version == 1) {
char flag = data[0];
/*
* TF extension comprises:
* one byte flag
* create time (optional)
* modify time (optional)
* access time (optional)
* attribute time (optional)
* Time format and presence of fields
* is controlled by flag bits.
*/
data++;
if (flag & 0x80) {
/* Use 17-byte time format. */
if (flag & 1) /* Create time. */
data += 17;
if (flag & 2) { /* Modify time. */
file->mtime = isodate17(data);
data += 17;
}
if (flag & 4) { /* Access time. */
file->atime = isodate17(data);
data += 17;
}
if (flag & 8) { /* Attribute time. */
file->ctime = isodate17(data);
data += 17;
}
} else {
/* Use 7-byte time format. */
if (flag & 1) /* Create time. */
data += 7;
if (flag & 2) { /* Modify time. */
file->mtime = isodate7(data);
data += 7;
}
if (flag & 4) { /* Access time. */
file->atime = isodate7(data);
data += 7;
}
if (flag & 8) { /* Attribute time. */
file->ctime = isodate7(data);
data += 7;
}
}
if (p[0] == 'T' && p[1] == 'F') {
if (version == 1)
parse_rockridge_TF1(file,
data, data_length);
break;
}
/* FALLTHROUGH */
default:
/* The FALLTHROUGHs above leave us here for
* any unsupported extension. */
#if DEBUG
{
const unsigned char *t;
fprintf(stderr, "\nUnsupported RRIP extension for %s\n", file->name);
fprintf(stderr, "\nUnsupported RRIP extension for %s\n", file->name.s);
fprintf(stderr, " %c%c(%d):", p[0], p[1], data_length);
for (t = data; t < data + data_length && t < data + 16; t++)
fprintf(stderr, " %02x", *t);
fprintf(stderr, "\n");
}
#endif
break;
}
@@ -873,6 +870,215 @@ parse_rockridge(struct iso9660 *iso9660, struct file_info *file,
}
}
static void
parse_rockridge_NM1(struct file_info *file, const unsigned char *data,
int data_length)
{
if (!file->name_continues)
archive_string_empty(&file->name);
file->name_continues = 0;
if (data_length < 1)
return;
/*
* NM version 1 extension comprises:
* 1 byte flag, value is one of:
* = 0: remainder is name
* = 1: remainder is name, next NM entry continues name
* = 2: "."
* = 4: ".."
* = 32: Implementation specific
* All other values are reserved.
*/
switch(data[0]) {
case 0:
if (data_length < 2)
return;
archive_strncat(&file->name, data + 1, data_length - 1);
break;
case 1:
if (data_length < 2)
return;
archive_strncat(&file->name, data + 1, data_length - 1);
file->name_continues = 1;
break;
case 2:
archive_strcat(&file->name, ".");
break;
case 4:
archive_strcat(&file->name, "..");
break;
default:
return;
}
}
static void
parse_rockridge_TF1(struct file_info *file, const unsigned char *data,
int data_length)
{
char flag;
/*
* TF extension comprises:
* one byte flag
* create time (optional)
* modify time (optional)
* access time (optional)
* attribute time (optional)
* Time format and presence of fields
* is controlled by flag bits.
*/
if (data_length < 1)
return;
flag = data[0];
++data;
--data_length;
if (flag & 0x80) {
/* Use 17-byte time format. */
if ((flag & 1) && data_length >= 17) {
/* Create time. */
file->birthtime = isodate17(data);
data += 17;
data_length -= 17;
}
if ((flag & 2) && data_length >= 17) {
/* Modify time. */
file->mtime = isodate17(data);
data += 17;
data_length -= 17;
}
if ((flag & 4) && data_length >= 17) {
/* Access time. */
file->atime = isodate17(data);
data += 17;
data_length -= 17;
}
if ((flag & 8) && data_length >= 17) {
/* Attribute change time. */
file->ctime = isodate17(data);
data += 17;
data_length -= 17;
}
} else {
/* Use 7-byte time format. */
if ((flag & 1) && data_length >= 7) {
/* Create time. */
file->birthtime = isodate17(data);
data += 7;
data_length -= 7;
}
if ((flag & 2) && data_length >= 7) {
/* Modify time. */
file->mtime = isodate7(data);
data += 7;
data_length -= 7;
}
if ((flag & 4) && data_length >= 7) {
/* Access time. */
file->atime = isodate7(data);
data += 7;
data_length -= 7;
}
if ((flag & 8) && data_length >= 7) {
/* Attribute change time. */
file->ctime = isodate7(data);
data += 7;
data_length -= 7;
}
}
}
static void
parse_rockridge_SL1(struct file_info *file, const unsigned char *data,
int data_length)
{
int component_continues = 1;
if (!file->symlink_continues)
archive_string_empty(&file->symlink);
else
archive_strcat(&file->symlink, "/");
file->symlink_continues = 0;
/*
* Defined flag values:
* 0: This is the last SL record for this symbolic link
* 1: this symbolic link field continues in next SL entry
* All other values are reserved.
*/
if (data_length < 1)
return;
switch(*data) {
case 0:
break;
case 1:
file->symlink_continues = 1;
break;
default:
return;
}
++data; /* Skip flag byte. */
--data_length;
/*
* SL extension body stores "components".
* Basically, this is a complicated way of storing
* a POSIX path. It also interferes with using
* symlinks for storing non-path data. <sigh>
*
* Each component is 2 bytes (flag and length)
* possibly followed by name data.
*/
while (data_length >= 2) {
unsigned char flag = *data++;
unsigned char nlen = *data++;
data_length -= 2;
if (!component_continues)
archive_strcat(&file->symlink, "/");
component_continues = 0;
switch(flag) {
case 0: /* Usual case, this is text. */
if (data_length < nlen)
return;
archive_strncat(&file->symlink,
(const char *)data, nlen);
break;
case 0x01: /* Text continues in next component. */
if (data_length < nlen)
return;
archive_strncat(&file->symlink,
(const char *)data, nlen);
component_continues = 1;
break;
case 0x02: /* Current dir. */
archive_strcat(&file->symlink, ".");
break;
case 0x04: /* Parent dir. */
archive_strcat(&file->symlink, "..");
break;
case 0x08: /* Root of filesystem. */
archive_string_empty(&file->symlink);
archive_strcat(&file->symlink, "/");
break;
case 0x10: /* Undefined (historically "volume root" */
archive_string_empty(&file->symlink);
archive_strcat(&file->symlink, "ROOT");
break;
case 0x20: /* Undefined (historically "hostname") */
archive_strcat(&file->symlink, "hostname");
break;
default:
/* TODO: issue a warning ? */
return;
}
data += nlen;
data_length -= nlen;
}
}
static void
release_file(struct iso9660 *iso9660, struct file_info *file)
{
@@ -880,8 +1086,7 @@ release_file(struct iso9660 *iso9660, struct file_info *file)
if (file->refcount == 0) {
parent = file->parent;
if (file->name)
free(file->name);
archive_string_free(&file->name);
archive_string_free(&file->symlink);
free(file);
if (parent != NULL) {
@@ -906,7 +1111,9 @@ next_entry_seek(struct archive_read *a, struct iso9660 *iso9660,
/* CE area precedes actual file data? Ignore it. */
if (file->ce_offset > file->offset) {
fprintf(stderr, " *** Discarding CE data.\n");
#if DEBUG
fprintf(stderr, " *** Discarding CE data.\n");
#endif
file->ce_offset = 0;
file->ce_size = 0;
}
@@ -1071,17 +1278,18 @@ time_from_tm(struct tm *t)
static const char *
build_pathname(struct archive_string *as, struct file_info *file)
{
if (file->parent != NULL && file->parent->name[0] != '\0') {
if (file->parent != NULL && archive_strlen(&file->parent->name) > 0) {
build_pathname(as, file->parent);
archive_strcat(as, "/");
}
if (file->name[0] == '\0')
if (archive_strlen(&file->name) == 0)
archive_strcat(as, ".");
else
archive_strcat(as, file->name);
archive_string_concat(as, &file->name);
return (as->s);
}
#if DEBUG
static void
dump_isodirrec(FILE *out, const unsigned char *isodirrec)
{
@@ -1106,3 +1314,4 @@ dump_isodirrec(FILE *out, const unsigned char *isodirrec)
fprintf(out, " `%.*s'",
toi(isodirrec + DR_name_len_offset, DR_name_len_size), isodirrec + DR_name_offset);
}
#endif
@@ -444,7 +444,9 @@ zip_read_file_header(struct archive_read *a, struct archive_entry *entry,
archive_entry_set_mtime(entry, zip->mtime, 0);
archive_entry_set_ctime(entry, zip->ctime, 0);
archive_entry_set_atime(entry, zip->atime, 0);
archive_entry_set_size(entry, zip->uncompressed_size);
/* Set the size only if it's meaningful. */
if (0 == (zip->flags & ZIP_LENGTH_AT_END))
archive_entry_set_size(entry, zip->uncompressed_size);
zip->entry_bytes_remaining = zip->compressed_size;
zip->entry_offset = 0;
@@ -573,12 +575,16 @@ archive_read_format_zip_read_data(struct archive_read *a,
}
break;
}
if (r != ARCHIVE_OK)
return (r);
/* Update checksum */
if (r == ARCHIVE_OK && *size) {
if (*size)
zip->entry_crc32 =
crc32(zip->entry_crc32, *buff, *size);
}
return (r);
/* Return EOF immediately if this is a non-regular file. */
if (AE_IFREG != (zip->mode & AE_IFMT))
return (ARCHIVE_EOF);
return (ARCHIVE_OK);
}
/*
+12
View File
@@ -69,6 +69,18 @@ __archive_string_copy(struct archive_string *dest, struct archive_string *src)
}
}
void
__archive_string_concat(struct archive_string *dest, struct archive_string *src)
{
if (src->length > 0) {
if (__archive_string_ensure(dest, dest->length + src->length + 1) == NULL)
__archive_errx(1, "Out of memory");
memcpy(dest->s + dest->length, src->s, src->length);
dest->length += src->length;
dest->s[dest->length] = 0;
}
}
void
__archive_string_free(struct archive_string *as)
{
+6
View File
@@ -92,6 +92,12 @@ __archive_string_copy(struct archive_string *dest, struct archive_string *src);
#define archive_string_copy(dest, src) \
__archive_string_copy(dest, src)
/* Concatenate one archive_string to another */
void
__archive_string_concat(struct archive_string *dest, struct archive_string *src);
#define archive_string_concat(dest, src) \
__archive_string_concat(dest, src)
/* Ensure that the underlying buffer is at least as large as the request. */
struct archive_string *
__archive_string_ensure(struct archive_string *, size_t);
+132 -57
View File
@@ -176,7 +176,7 @@ struct archive_write_disk {
int fd;
/* Current offset for writing data to the file. */
off_t offset;
/* Maximum size of file. */
/* Maximum size of file, -1 if unknown. */
off_t filesize;
/* Dir we were in before this restore; only for deep paths. */
int restore_pwd;
@@ -231,7 +231,8 @@ static int set_time(struct archive_write_disk *);
static struct fixup_entry *sort_dir_list(struct fixup_entry *p);
static gid_t trivial_lookup_gid(void *, const char *, gid_t);
static uid_t trivial_lookup_uid(void *, const char *, uid_t);
static ssize_t write_data_block(struct archive_write_disk *,
const char *, size_t, off_t);
static struct archive_vtable *archive_write_disk_vtable(void);
@@ -337,7 +338,10 @@ _archive_write_header(struct archive *_a, struct archive_entry *entry)
a->offset = 0;
a->uid = a->user_uid;
a->mode = archive_entry_mode(a->entry);
a->filesize = archive_entry_size(a->entry);
if (archive_entry_size_is_set(a->entry))
a->filesize = archive_entry_size(a->entry);
else
a->filesize = -1;
archive_strcpy(&(a->_name_data), archive_entry_pathname(a->entry));
a->name = a->_name_data.s;
archive_clear_error(&a->archive);
@@ -439,15 +443,25 @@ _archive_write_header(struct archive *_a, struct archive_entry *entry)
fe->mode = a->mode;
}
if (a->deferred & TODO_TIMES) {
if ((a->deferred & TODO_TIMES)
&& (archive_entry_mtime_is_set(entry)
|| archive_entry_atime_is_set(entry))) {
fe = current_fixup(a, archive_entry_pathname(entry));
fe->fixup |= TODO_TIMES;
fe->mtime = archive_entry_mtime(entry);
fe->mtime_nanos = archive_entry_mtime_nsec(entry);
fe->atime = archive_entry_atime(entry);
fe->atime_nanos = archive_entry_atime_nsec(entry);
if (fe->atime == 0 && fe->atime_nanos == 0)
if (archive_entry_mtime_is_set(entry)) {
fe->mtime = archive_entry_mtime(entry);
fe->mtime_nanos = archive_entry_mtime_nsec(entry);
} else {
fe->mtime = a->start_time;
fe->mtime_nanos = 0;
}
if (archive_entry_atime_is_set(entry)) {
fe->atime = archive_entry_atime(entry);
fe->atime_nanos = archive_entry_atime_nsec(entry);
} else {
fe->atime = a->start_time;
fe->atime_nanos = 0;
}
}
if (a->deferred & TODO_FFLAGS) {
@@ -486,89 +500,113 @@ archive_write_disk_set_skip_file(struct archive *_a, dev_t d, ino_t i)
}
static ssize_t
_archive_write_data_block(struct archive *_a,
const void *buff, size_t size, off_t offset)
write_data_block(struct archive_write_disk *a,
const char *buff, size_t size, off_t offset)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
ssize_t bytes_written = 0;
ssize_t block_size, bytes_to_write;
int r = ARCHIVE_OK;
ssize_t block_size = 0, bytes_to_write;
int r;
__archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
ARCHIVE_STATE_DATA, "archive_write_disk_block");
if (a->fd < 0) {
archive_set_error(&a->archive, 0, "File not open");
if (a->filesize == 0 || a->fd < 0) {
archive_set_error(&a->archive, 0,
"Attempt to write to an empty file");
return (ARCHIVE_WARN);
}
archive_clear_error(&a->archive);
if (a->flags & ARCHIVE_EXTRACT_SPARSE) {
if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK)
return (r);
block_size = a->pst->st_blksize;
} else
block_size = -1;
if ((off_t)(offset + size) > a->filesize) {
size = (size_t)(a->filesize - a->offset);
archive_set_error(&a->archive, 0,
"Write request too large");
r = ARCHIVE_WARN;
}
if (a->filesize >= 0 && (off_t)(offset + size) > a->filesize)
size = (size_t)(a->filesize - offset);
/* Write the data. */
while (size > 0) {
if (block_size != -1) {
const char *buf;
if (block_size == 0) {
bytes_to_write = size;
} else {
/* We're sparsifying the file. */
const char *p, *end;
off_t block_end;
for (buf = buff; size; ++buf, --size, ++offset) {
if (*buf != '\0')
/* Skip leading zero bytes. */
for (p = buff, end = buff + size; p < end; ++p) {
if (*p != '\0')
break;
}
offset += p - buff;
size -= p - buff;
buff = p;
if (size == 0)
break;
bytes_to_write = block_size - offset % block_size;
buff = buf;
} else
/* Calculate next block boundary after offset. */
block_end
= (offset / block_size) * block_size + block_size;
/* If the adjusted write would cross block boundary,
* truncate it to the block boundary. */
bytes_to_write = size;
if (offset + bytes_to_write > block_end)
bytes_to_write = block_end - offset;
}
/* Seek if necessary to the specified offset. */
if (offset != a->last_offset) {
if (lseek(a->fd, offset, SEEK_SET) < 0) {
archive_set_error(&a->archive, errno, "Seek failed");
archive_set_error(&a->archive, errno,
"Seek failed");
return (ARCHIVE_FATAL);
}
}
bytes_written = write(a->fd, buff, size);
bytes_written = write(a->fd, buff, bytes_to_write);
if (bytes_written < 0) {
archive_set_error(&a->archive, errno, "Write failed");
return (ARCHIVE_WARN);
}
buff = (const char *)buff + bytes_written;
buff += bytes_written;
size -= bytes_written;
offset += bytes_written;
a->archive.file_position += bytes_written;
a->archive.raw_position += bytes_written;
a->last_offset = a->offset = offset;
}
a->offset = offset;
return (r);
return (bytes_written);
}
static ssize_t
_archive_write_data_block(struct archive *_a,
const void *buff, size_t size, off_t offset)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
ssize_t r;
__archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
ARCHIVE_STATE_DATA, "archive_write_disk_block");
r = write_data_block(a, buff, size, offset);
if (r < 0)
return (r);
if ((size_t)r < size) {
archive_set_error(&a->archive, 0,
"Write request too large");
return (ARCHIVE_WARN);
}
return (ARCHIVE_OK);
}
static ssize_t
_archive_write_data(struct archive *_a, const void *buff, size_t size)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
int r;
__archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
ARCHIVE_STATE_DATA, "archive_write_data");
if (a->fd < 0)
return (ARCHIVE_OK);
r = _archive_write_data_block(_a, buff, size, a->offset);
if (r < ARCHIVE_OK)
return (r);
return size;
return (write_data_block(a, buff, size, a->offset));
}
static int
@@ -584,7 +622,15 @@ _archive_write_finish_entry(struct archive *_a)
return (ARCHIVE_OK);
archive_clear_error(&a->archive);
if (a->last_offset != a->filesize && a->fd >= 0) {
/* Pad or truncate file to the right size. */
if (a->fd < 0) {
/* There's no file. */
} else if (a->filesize < 0) {
/* File size is unknown, so we can't set the size. */
} else if (a->last_offset == a->filesize) {
/* Last write ended at exactly the filesize; we're done. */
/* Hopefully, this is the common case. */
} else {
if (ftruncate(a->fd, a->filesize) == -1 &&
a->filesize == 0) {
archive_set_error(&a->archive, errno,
@@ -601,7 +647,8 @@ _archive_write_finish_entry(struct archive *_a)
if (a->st.st_size != a->filesize) {
const char nul = '\0';
if (lseek(a->fd, a->st.st_size - 1, SEEK_SET) < 0) {
archive_set_error(&a->archive, errno, "Seek failed");
archive_set_error(&a->archive, errno,
"Seek failed");
return (ARCHIVE_FATAL);
}
if (write(a->fd, &nul, 1) < 0) {
@@ -609,6 +656,7 @@ _archive_write_finish_entry(struct archive *_a)
"Write to restore size failed");
return (ARCHIVE_FATAL);
}
a->pst = NULL;
}
}
@@ -975,7 +1023,7 @@ create_filesystem_object(struct archive_write_disk *a)
* If the hardlink does carry data, let the last
* archive entry decide ownership.
*/
if (r == 0 && a->filesize == 0) {
if (r == 0 && a->filesize <= 0) {
a->todo = 0;
a->deferred = 0;
} if (r == 0 && a->filesize > 0) {
@@ -1635,18 +1683,31 @@ set_time(struct archive_write_disk *a)
{
struct timeval times[2];
times[1].tv_sec = archive_entry_mtime(a->entry);
times[1].tv_usec = archive_entry_mtime_nsec(a->entry) / 1000;
/* If no time was provided, we're done. */
if (!archive_entry_atime_is_set(a->entry)
&& !archive_entry_mtime_is_set(a->entry))
return (ARCHIVE_OK);
times[0].tv_sec = archive_entry_atime(a->entry);
times[0].tv_usec = archive_entry_atime_nsec(a->entry) / 1000;
/* We know at least one is set, so... */
if (archive_entry_mtime_is_set(a->entry)) {
times[1].tv_sec = archive_entry_mtime(a->entry);
times[1].tv_usec = archive_entry_mtime_nsec(a->entry) / 1000;
} else {
times[1].tv_sec = a->start_time;
times[1].tv_usec = 0;
}
/* If no atime was specified, use start time instead. */
/* In theory, it would be marginally more correct to use
* time(NULL) here, but that would cost us an extra syscall
* for little gain. */
if (times[0].tv_sec == 0 && times[0].tv_usec == 0)
if (archive_entry_atime_is_set(a->entry)) {
times[0].tv_sec = archive_entry_atime(a->entry);
times[0].tv_usec = archive_entry_atime_nsec(a->entry) / 1000;
} else {
times[0].tv_sec = a->start_time;
times[0].tv_usec = 0;
}
#ifdef HAVE_FUTIMES
if (a->fd >= 0 && futimes(a->fd, times) == 0) {
@@ -1684,10 +1745,24 @@ set_time(struct archive_write_disk *a)
{
struct utimbuf times;
times.modtime = archive_entry_mtime(a->entry);
times.actime = archive_entry_atime(a->entry);
if (times.actime == 0)
/* If no time was provided, we're done. */
if (!archive_entry_atime_is_set(a->entry)
&& !archive_entry_mtime_is_set(a->entry))
return (ARCHIVE_OK);
/* We know at least one is set, so... */
/* Set mtime from mtime if set, else start time. */
if (archive_entry_mtime_is_set(a->entry))
times.modtime = archive_entry_mtime(a->entry);
else
times.modtime = a->start_time;
/* Set atime from provided atime, else mtime. */
if (archive_entry_atime_is_set(a->entry))
times.actime = archive_entry_atime(a->entry);
else
times.actime = a->start_time;
if (!S_ISLNK(a->mode) && utime(a->name, &times) != 0) {
archive_set_error(&a->archive, errno,
"Can't update time for %s", a->name);
+31
View File
@@ -69,14 +69,25 @@ DEFINE_TEST(test_entry)
* The following tests are ordered alphabetically by the
* name of the field.
*/
/* atime */
archive_entry_set_atime(e, 13579, 24680);
assertEqualInt(archive_entry_atime(e), 13579);
assertEqualInt(archive_entry_atime_nsec(e), 24680);
archive_entry_unset_atime(e);
assertEqualInt(archive_entry_atime(e), 0);
assertEqualInt(archive_entry_atime_nsec(e), 0);
assert(!archive_entry_atime_is_set(e));
/* ctime */
archive_entry_set_ctime(e, 13580, 24681);
assertEqualInt(archive_entry_ctime(e), 13580);
assertEqualInt(archive_entry_ctime_nsec(e), 24681);
archive_entry_unset_ctime(e);
assertEqualInt(archive_entry_ctime(e), 0);
assertEqualInt(archive_entry_ctime_nsec(e), 0);
assert(!archive_entry_ctime_is_set(e));
#if ARCHIVE_VERSION_STAMP >= 1009000
/* dev */
archive_entry_set_dev(e, 235);
@@ -85,6 +96,7 @@ DEFINE_TEST(test_entry)
skipping("archive_entry_dev()");
#endif
/* devmajor/devminor are tested specially below. */
#if ARCHIVE_VERSION_STAMP >= 1009000
/* filetype */
archive_entry_set_filetype(e, AE_IFREG);
@@ -92,10 +104,13 @@ DEFINE_TEST(test_entry)
#else
skipping("archive_entry_filetype()");
#endif
/* fflags are tested specially below */
/* gid */
archive_entry_set_gid(e, 204);
assertEqualInt(archive_entry_gid(e), 204);
/* gname */
archive_entry_set_gname(e, "group");
assertEqualString(archive_entry_gname(e), "group");
@@ -104,6 +119,7 @@ DEFINE_TEST(test_entry)
assertEqualWString(archive_entry_gname_w(e), L"wgroup");
memset(wbuff, 0, sizeof(wbuff));
assertEqualWString(archive_entry_gname_w(e), L"wgroup");
/* hardlink */
archive_entry_set_hardlink(e, "hardlinkname");
assertEqualString(archive_entry_hardlink(e), "hardlinkname");
@@ -158,10 +174,16 @@ DEFINE_TEST(test_entry)
/* mode */
archive_entry_set_mode(e, 0123456);
assertEqualInt(archive_entry_mode(e), 0123456);
/* mtime */
archive_entry_set_mtime(e, 13581, 24682);
assertEqualInt(archive_entry_mtime(e), 13581);
assertEqualInt(archive_entry_mtime_nsec(e), 24682);
archive_entry_unset_mtime(e);
assertEqualInt(archive_entry_mtime(e), 0);
assertEqualInt(archive_entry_mtime_nsec(e), 0);
assert(!archive_entry_mtime_is_set(e));
#if ARCHIVE_VERSION_STAMP >= 1009000
/* nlink */
archive_entry_set_nlink(e, 736);
@@ -169,6 +191,7 @@ DEFINE_TEST(test_entry)
#else
skipping("archive_entry_nlink()");
#endif
/* pathname */
archive_entry_set_pathname(e, "path");
assertEqualString(archive_entry_pathname(e), "path");
@@ -184,6 +207,7 @@ DEFINE_TEST(test_entry)
assertEqualWString(archive_entry_pathname_w(e), L"wpath");
memset(wbuff, 0, sizeof(wbuff));
assertEqualWString(archive_entry_pathname_w(e), L"wpath");
#if ARCHIVE_VERSION_STAMP >= 1009000
/* rdev */
archive_entry_set_rdev(e, 532);
@@ -192,9 +216,14 @@ DEFINE_TEST(test_entry)
skipping("archive_entry_rdev()");
#endif
/* rdevmajor/rdevminor are tested specially below. */
/* size */
archive_entry_set_size(e, 987654321);
assertEqualInt(archive_entry_size(e), 987654321);
archive_entry_unset_size(e);
assertEqualInt(archive_entry_size(e), 0);
assert(!archive_entry_size_is_set(e));
/* symlink */
archive_entry_set_symlink(e, "symlinkname");
assertEqualString(archive_entry_symlink(e), "symlinkname");
@@ -207,9 +236,11 @@ DEFINE_TEST(test_entry)
#endif
archive_entry_copy_symlink_w(e, L"wsymlink");
assertEqualWString(archive_entry_symlink_w(e), L"wsymlink");
/* uid */
archive_entry_set_uid(e, 83);
assertEqualInt(archive_entry_uid(e), 83);
/* uname */
archive_entry_set_uname(e, "user");
assertEqualString(archive_entry_uname(e), "user");
+8 -1
View File
@@ -25,6 +25,12 @@
#include "test.h"
__FBSDID("$FreeBSD$");
/*
* The reference file for this has been manually tweaked so that:
* * file2 has length-at-end but file1 does not
* * file2 has an invalid CRC
*/
DEFINE_TEST(test_read_format_zip)
{
const char *refname = "test_read_format_zip.zip";
@@ -57,7 +63,8 @@ DEFINE_TEST(test_read_format_zip)
assertA(0 == archive_read_next_header(a, &ae));
assertEqualString("file2", archive_entry_pathname(ae));
assertEqualInt(1179605932, archive_entry_mtime(ae));
assertEqualInt(18, archive_entry_size(ae));
failure("file2 has length-at-end, so we shouldn't see a valid size");
assertEqualInt(0, archive_entry_size_is_set(ae));
failure("file2 has a bad CRC, so reading to end should fail");
assertEqualInt(ARCHIVE_WARN, archive_read_data(a, buff, 19));
assert(0 == memcmp(buff, "hello\nhello\nhello\n", 18));
@@ -1,13 +1,14 @@
$FreeBSD$
begin 644 test_read_format_zip.zip
M4$L#!`H``````%EFLS8````````````````$`!4`9&ER+U54"0`#&55/1AE5
M3T95>`0`Z`/H`U!+`P04````"`!O9K,V.C=F/0H````2````!0`5`&9I;&4Q
M550)``-!54]&K%M/1E5X!`#H`^@#RTC-R<GGRD`B`5!+`P04````"`!::K,V
M>%8T$@H````2````!0`5`&9I;&4R550)``.L6T]&K%M/1E5X!`#H`^@#RTC-
MR<GGRD`B`5!+`0(7`PH``````%EFLS8````````````````$``T`````````
M$`#M00````!D:7(O550%``,954]&57@``%!+`0(7`Q0````(`&]FLS8Z-V8]
M"@```!(````%``T```````$```"D@3<```!F:6QE,554!0`#055/1E5X``!0
M2P$"%P,4````"`!::K,V>%8T$@H````2````!0`-```````!````I(%Y````
H9FEL93)55`4``ZQ;3T95>```4$L%!@`````#``,`OP```+L`````````
M4$L#!`H`"````%EFLS8````````````````$`!4`9&ER+U54"0`#&55/1M19
M_4A5>`0`Z`/H`U!+!P@```````````````!02P,$%`````@`;V:S-CHW9CT*
M````$@````4`%0!F:6QE,554"0`#055/1L!9_4A5>`0`Z`/H`\M(S<G)Y\I`
M(@%02P,$%``(``@`6FJS-@``````````$@````4`%0!F:6QE,E54"0`#K%M/
M1L!9_4A5>`0`Z`/H`\M(S<G)Y\I`(@%02P<(.C=F$@H````2````4$L!`A<#
M"@`(````66:S-@````````````````0`#0`````````0`.U!`````&1I<B]5
M5`4``QE53T95>```4$L!`A<#%``(``@`;V:S-CHW9CT*````$@````4`#0``
M`````0```.V!1P```&9I;&4Q550%``-!54]&57@``%!+`0(7`Q0`"``(`%IJ
MLS8Z-V8]"@```!(````%``T```````$```#M@8D```!F:6QE,E54!0`#K%M/
;1E5X``!02P4&``````,``P"_````VP``````
`
end
+70 -1
View File
@@ -84,7 +84,7 @@ static void create_reg_file(struct archive_entry *ae, const char *msg)
* the entry being a maximum size.
*/
archive_entry_set_size(ae, sizeof(data));
archive_entry_set_mtime(ae, 123456789, 0);
archive_entry_set_mtime(ae, 123456789, 0);
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
assertEqualInt(sizeof(data), archive_write_data(ad, data, sizeof(data)));
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
@@ -152,6 +152,61 @@ static void create_reg_file2(struct archive_entry *ae, const char *msg)
free(compare);
free(data);
}
static void create_reg_file3(struct archive_entry *ae, const char *msg)
{
static const char data[]="abcdefghijklmnopqrstuvwxyz";
struct archive *ad;
struct stat st;
/* Write the entry to disk. */
assert((ad = archive_write_disk_new()) != NULL);
failure("%s", msg);
/* Set the size smaller than the data and verify the truncation. */
archive_entry_set_size(ae, 5);
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
assertEqualInt(5, archive_write_data(ad, data, sizeof(data)));
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
#if ARCHIVE_VERSION_NUMBER < 2000000
archive_write_finish(ad);
#else
assertEqualInt(0, archive_write_finish(ad));
#endif
/* Test the entry on disk. */
assert(0 == stat(archive_entry_pathname(ae), &st));
failure("st.st_mode=%o archive_entry_mode(ae)=%o",
st.st_mode, archive_entry_mode(ae));
assertEqualInt(st.st_mode, (archive_entry_mode(ae) & ~UMASK));
assertEqualInt(st.st_size, 5);
}
static void create_reg_file4(struct archive_entry *ae, const char *msg)
{
static const char data[]="abcdefghijklmnopqrstuvwxyz";
struct archive *ad;
struct stat st;
/* Write the entry to disk. */
assert((ad = archive_write_disk_new()) != NULL);
/* Leave the size unset. The data should not be truncated. */
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
assertEqualInt(ARCHIVE_OK,
archive_write_data_block(ad, data, sizeof(data), 0));
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
#if ARCHIVE_VERSION_NUMBER < 2000000
archive_write_finish(ad);
#else
assertEqualInt(0, archive_write_finish(ad));
#endif
/* Test the entry on disk. */
assert(0 == stat(archive_entry_pathname(ae), &st));
failure("st.st_mode=%o archive_entry_mode(ae)=%o",
st.st_mode, archive_entry_mode(ae));
assertEqualInt(st.st_mode, (archive_entry_mode(ae) & ~UMASK));
failure(msg);
assertEqualInt(st.st_size, sizeof(data));
}
#endif
DEFINE_TEST(test_write_disk)
@@ -178,6 +233,20 @@ DEFINE_TEST(test_write_disk)
create_reg_file2(ae, "Test creating another regular file");
archive_entry_free(ae);
/* A regular file with a size restriction */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "file3");
archive_entry_set_mode(ae, S_IFREG | 0755);
create_reg_file3(ae, "Regular file with size restriction");
archive_entry_free(ae);
/* A regular file with an unspecified size */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "file3");
archive_entry_set_mode(ae, S_IFREG | 0755);
create_reg_file4(ae, "Regular file with unspecified size");
archive_entry_free(ae);
/* A regular file over an existing file */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "file");
+99 -42
View File
@@ -61,18 +61,48 @@ DEFINE_TEST(test_write_disk_hardlink)
archive_entry_set_mode(ae, S_IFREG | 0755);
archive_entry_set_size(ae, sizeof(data));
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
assertEqualInt(sizeof(data), archive_write_data(ad, data, sizeof(data)));
assertEqualInt(sizeof(data),
archive_write_data(ad, data, sizeof(data)));
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
archive_entry_free(ae);
/* Link. */
/* Link. Size of zero means this doesn't carry data. */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "link1b");
archive_entry_set_mode(ae, S_IFREG | 0600);
archive_entry_set_mode(ae, S_IFREG | 0642);
archive_entry_set_size(ae, 0);
archive_entry_copy_hardlink(ae, "link1a");
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
assertEqualInt(0, archive_write_data(ad, data, sizeof(data)));
assertEqualInt(ARCHIVE_WARN,
archive_write_data(ad, data, sizeof(data)));
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
archive_entry_free(ae);
/*
* Repeat tar approach test, but use unset to mark the
* hardlink as having no data.
*/
/* Regular file. */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "link2a");
archive_entry_set_mode(ae, S_IFREG | 0755);
archive_entry_set_size(ae, sizeof(data));
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
assertEqualInt(sizeof(data),
archive_write_data(ad, data, sizeof(data)));
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
archive_entry_free(ae);
/* Link. Unset size means this doesn't carry data. */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "link2b");
archive_entry_set_mode(ae, S_IFREG | 0642);
archive_entry_unset_size(ae);
archive_entry_copy_hardlink(ae, "link2a");
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
assertEqualInt(ARCHIVE_WARN,
archive_write_data(ad, data, sizeof(data)));
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
archive_entry_free(ae);
@@ -81,43 +111,13 @@ DEFINE_TEST(test_write_disk_hardlink)
* another identical one (which has been marked hardlink).
*/
/* Regular file. */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "link2a");
archive_entry_set_mode(ae, S_IFREG | 0600);
archive_entry_set_size(ae, sizeof(data));
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
assertEqualInt(sizeof(data), archive_write_data(ad, data, sizeof(data)));
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
archive_entry_free(ae);
/* Link. */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "link2b");
archive_entry_set_mode(ae, S_IFREG | 0755);
archive_entry_set_size(ae, sizeof(data));
archive_entry_copy_hardlink(ae, "link2a");
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
assertEqualInt(sizeof(data), archive_write_data(ad, data, sizeof(data)));
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
archive_entry_free(ae);
/*
* Finally, try a new-cpio-like approach, where the initial
* regular file is empty and the hardlink has the data.
*/
/* Regular file. */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "link3a");
archive_entry_set_mode(ae, S_IFREG | 0600);
archive_entry_set_size(ae, 0);
archive_entry_set_size(ae, sizeof(data));
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
#if ARCHIVE_VERSION_NUMBER < 3000000
assertEqualInt(ARCHIVE_WARN, archive_write_data(ad, data, 1));
#else
assertEqualInt(-1, archive_write_data(ad, data, 1));
#endif
assertEqualInt(sizeof(data), archive_write_data(ad, data, sizeof(data)));
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
archive_entry_free(ae);
@@ -131,6 +131,36 @@ DEFINE_TEST(test_write_disk_hardlink)
assertEqualInt(sizeof(data), archive_write_data(ad, data, sizeof(data)));
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
archive_entry_free(ae);
/*
* Finally, try a new-cpio-like approach, where the initial
* regular file is empty and the hardlink has the data.
*/
/* Regular file. */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "link4a");
archive_entry_set_mode(ae, S_IFREG | 0600);
archive_entry_set_size(ae, 0);
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
#if ARCHIVE_VERSION_NUMBER < 3000000
assertEqualInt(ARCHIVE_WARN, archive_write_data(ad, data, 1));
#else
assertEqualInt(-1, archive_write_data(ad, data, 1));
#endif
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
archive_entry_free(ae);
/* Link. */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "link4b");
archive_entry_set_mode(ae, S_IFREG | 0755);
archive_entry_set_size(ae, sizeof(data));
archive_entry_copy_hardlink(ae, "link4a");
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
assertEqualInt(sizeof(data), archive_write_data(ad, data, sizeof(data)));
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
archive_entry_free(ae);
#if ARCHIVE_VERSION_NUMBER < 2000000
archive_write_finish(ad);
#else
@@ -138,30 +168,44 @@ DEFINE_TEST(test_write_disk_hardlink)
#endif
/* Test the entries on disk. */
/* Test #1 */
assert(0 == stat("link1a", &st));
/* If the hardlink was successfully created and the archive
* doesn't carry data for it, we consider it to be
* non-authoritive for meta data as well. This is consistent
* with GNU tar and BSD pax. */
assertEqualInt(st.st_mode, (S_IFREG | 0755) & ~UMASK);
assertEqualInt(st.st_size, sizeof(data));
assertEqualInt(st.st_nlink, 2);
assert(0 == stat("link1b", &st2));
assertEqualInt(st2.st_mode, (S_IFREG | 0755) & ~UMASK);
assertEqualInt(st2.st_size, sizeof(data));
assertEqualInt(st2.st_nlink, 2);
assertEqualInt(st.st_mode, st2.st_mode);
assertEqualInt(st.st_size, st2.st_size);
assertEqualInt(st.st_nlink, st2.st_nlink);
assertEqualInt(st.st_ino, st2.st_ino);
assertEqualInt(st.st_dev, st2.st_dev);
/* Test #2: Should produce identical results to test #1 */
/* Note that marking a hardlink with size = 0 is treated the
* same as having an unset size. This is partly for backwards
* compatibility (we used to not have unset tracking, so
* relied on size == 0) and partly to match the model used by
* common file formats that store a size of zero for
* hardlinks. */
assert(0 == stat("link2a", &st));
assertEqualInt(st.st_mode, (S_IFREG | 0755) & ~UMASK);
assertEqualInt(st.st_size, sizeof(data));
assertEqualInt(st.st_nlink, 2);
assert(0 == stat("link2b", &st2));
assertEqualInt(st2.st_mode, (S_IFREG | 0755) & ~UMASK);
assertEqualInt(st2.st_size, sizeof(data));
assertEqualInt(st2.st_nlink, 2);
assertEqualInt(st.st_mode, st2.st_mode);
assertEqualInt(st.st_size, st2.st_size);
assertEqualInt(st.st_nlink, st2.st_nlink);
assertEqualInt(st.st_ino, st2.st_ino);
assertEqualInt(st.st_dev, st2.st_dev);
/* Test #3 */
assert(0 == stat("link3a", &st));
assertEqualInt(st.st_mode, (S_IFREG | 0755) & ~UMASK);
assertEqualInt(st.st_size, sizeof(data));
@@ -173,5 +217,18 @@ DEFINE_TEST(test_write_disk_hardlink)
assertEqualInt(st2.st_nlink, 2);
assertEqualInt(st.st_ino, st2.st_ino);
assertEqualInt(st.st_dev, st2.st_dev);
/* Test #4 */
assert(0 == stat("link4a", &st));
assertEqualInt(st.st_mode, (S_IFREG | 0755) & ~UMASK);
assertEqualInt(st.st_size, sizeof(data));
assertEqualInt(st.st_nlink, 2);
assert(0 == stat("link4b", &st2));
assertEqualInt(st2.st_mode, (S_IFREG | 0755) & ~UMASK);
assertEqualInt(st2.st_size, sizeof(data));
assertEqualInt(st2.st_nlink, 2);
assertEqualInt(st.st_ino, st2.st_ino);
assertEqualInt(st.st_dev, st2.st_dev);
#endif
}
+1 -1
View File
@@ -381,7 +381,7 @@ bt_page(t, h, lp, rp, skip, ilen)
}
/* Put the new left page for the split into place. */
if ((l = (PAGE *)malloc(t->bt_psize)) == NULL) {
if ((l = (PAGE *)calloc(1, t->bt_psize)) == NULL) {
mpool_put(t->bt_mp, r, 0);
return (NULL);
}
+6 -3
View File
@@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$");
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef DEBUG
#include <assert.h>
@@ -174,12 +175,12 @@ newbuf(hashp, addr, prev_bp)
*/
if (hashp->nbufs || (bp->flags & BUF_PIN)) {
/* Allocate a new one */
if ((bp = (BUFHEAD *)malloc(sizeof(BUFHEAD))) == NULL)
if ((bp = (BUFHEAD *)calloc(1, sizeof(BUFHEAD))) == NULL)
return (NULL);
#ifdef PURIFY
memset(bp, 0xff, sizeof(BUFHEAD));
#endif
if ((bp->page = (char *)malloc(hashp->BSIZE)) == NULL) {
if ((bp->page = (char *)calloc(1, hashp->BSIZE)) == NULL) {
free(bp);
return (NULL);
}
@@ -328,8 +329,10 @@ __buf_free(hashp, do_free, to_disk)
}
/* Check if we are freeing stuff */
if (do_free) {
if (bp->page)
if (bp->page) {
(void)memset(bp->page, 0, hashp->BSIZE);
free(bp->page);
}
BUF_REMOVE(bp);
free(bp);
bp = LRU;
+1 -1
View File
@@ -343,7 +343,7 @@ mpool_bkt(mp)
return (bp);
}
new: if ((bp = (BKT *)malloc(sizeof(BKT) + mp->pagesize)) == NULL)
new: if ((bp = (BKT *)calloc(1, sizeof(BKT) + mp->pagesize)) == NULL)
return (NULL);
#ifdef STATISTICS
++mp->pagealloc;
+9 -4
View File
@@ -28,7 +28,7 @@
.\" @(#)times.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
.Dd June 4, 1993
.Dd December 1, 2008
.Dt TIMES 3
.Os
.Sh NAME
@@ -52,9 +52,13 @@ The
.Fn times
function returns the value of time in
.Dv CLK_TCK Ns 's
of a second since
0 hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal
Time.
of a second since the system startup time.
The current value of
.Dv CLK_TCK ,
the frequency of the statistics clock in ticks per second, may be
obtained through the
.Xr sysconf 3
interface.
.Pp
It also fills in the structure pointed to by
.Fa tp
@@ -131,6 +135,7 @@ and
.Xr getrusage 2 ,
.Xr gettimeofday 2 ,
.Xr wait 2 ,
.Xr sysconf 3 ,
.Xr clocks 7
.Sh STANDARDS
The
+1 -1
View File
@@ -44,4 +44,4 @@ SYSCALL(pipe)
movl %edx,4(%ecx)
movl $0,%eax
ret
END(pipe)
END(__sys_pipe)
+1 -1
View File
@@ -40,4 +40,4 @@ __FBSDID("$FreeBSD$");
SYSCALL(reboot)
iret
END(reboot)
END(__sys_reboot)
+1 -1
View File
@@ -52,4 +52,4 @@ SYSCALL(setlogin)
movl $0,CNAME(_logname_valid)
#endif
ret /* setlogin(name) */
END(setlogin)
END(__sys_setlogin)
+3 -1
View File
@@ -18,7 +18,7 @@
/* eventlib.h - exported interfaces for eventlib
* vix 09sep95 [initial]
*
* $Id: eventlib.h,v 1.3.18.2 2005/07/28 07:38:07 marka Exp $
* $Id: eventlib.h,v 1.3.18.3 2008/01/23 02:12:01 marka Exp $
*/
#ifndef _EVENTLIB_H
@@ -29,6 +29,8 @@
#include <sys/time.h>
#include <stdio.h>
#include <isc/platform.h>
#ifndef __P
# define __EVENTLIB_P_DEFINED
# ifdef __STDC__
+37
View File
@@ -0,0 +1,37 @@
/*
* Copyright (C) 2008 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: platform.h.in,v 1.2.6.2 2008/01/23 02:15:02 tbox Exp $ */
/* $FreeBSD$ */
/*! \file */
#ifndef ISC_PLATFORM_H
#define ISC_PLATFORM_H
/*
* Define if the OS does not define struct timespec.
*/
#undef ISC_PLATFORM_NEEDTIMESPEC
#ifdef ISC_PLATFORM_NEEDTIMESPEC
#include <time.h> /* For time_t */
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
};
#endif
#endif
+3 -3
View File
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$Id: inet_net_pton.c,v 1.7.18.1 2005/04/27 05:00:53 sra Exp $";
static const char rcsid[] = "$Id: inet_net_pton.c,v 1.7.18.2 2008/08/26 04:42:43 marka Exp $";
#endif
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -135,11 +135,11 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
assert(n >= 0 && n <= 9);
bits *= 10;
bits += n;
if (bits > 32)
goto enoent;
} while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
if (ch != '\0')
goto enoent;
if (bits > 32)
goto emsgsize;
}
/* Firey death and destruction unless we prefetched EOS. */
+51 -4
View File
@@ -91,7 +91,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
static const char rcsid[] = "$Id: res_debug.c,v 1.10.18.5 2005/07/28 07:38:11 marka Exp $";
static const char rcsid[] = "$Id: res_debug.c,v 1.10.18.6 2008/04/03 23:15:15 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -187,10 +187,56 @@ do_section(const res_state statp,
p_type(ns_rr_type(rr)),
p_class(ns_rr_class(rr)));
else if (section == ns_s_ar && ns_rr_type(rr) == ns_t_opt) {
u_int16_t optcode, optlen, rdatalen = ns_rr_rdlen(rr);
u_int32_t ttl = ns_rr_ttl(rr);
fprintf(file,
"; EDNS: version: %u, udp=%u, flags=%04x\n",
(ttl>>16)&0xff, ns_rr_class(rr), ttl&0xffff);
while (rdatalen >= 4) {
const u_char *cp = ns_rr_rdata(rr);
int i;
GETSHORT(optcode, cp);
GETSHORT(optlen, cp);
if (optcode == NS_OPT_NSID) {
fputs("; NSID: ", file);
if (optlen == 0) {
fputs("; NSID\n", file);
} else {
fputs("; NSID: ", file);
for (i = 0; i < optlen; i++)
fprintf(file, "%02x ",
cp[i]);
fputs(" (",file);
for (i = 0; i < optlen; i++)
fprintf(file, "%c",
isprint(cp[i])?
cp[i] : '.');
fputs(")\n", file);
}
} else {
if (optlen == 0) {
fprintf(file, "; OPT=%u\n",
optcode);
} else {
fprintf(file, "; OPT=%u: ",
optcode);
for (i = 0; i < optlen; i++)
fprintf(file, "%02x ",
cp[i]);
fputs(" (",file);
for (i = 0; i < optlen; i++)
fprintf(file, "%c",
isprint(cp[i]) ?
cp[i] : '.');
fputs(")\n", file);
}
}
rdatalen -= 4 + optlen;
}
} else {
n = ns_sprintrr(handle, &rr, NULL, NULL,
buf, buflen);
@@ -202,7 +248,7 @@ do_section(const res_state statp,
buf = malloc(buflen += 1024);
if (buf == NULL) {
fprintf(file,
";; memory allocation failure\n");
";; memory allocation failure\n");
return;
}
continue;
@@ -379,7 +425,7 @@ static const struct res_sym __p_default_section_syms[] = {
{ns_s_an, "ANSWER", (char *)0},
{ns_s_ns, "AUTHORITY", (char *)0},
{ns_s_ar, "ADDITIONAL", (char *)0},
{0, (char *)0, (char *)0}
{0, (char *)0, (char *)0}
};
static const struct res_sym __p_update_section_syms[] = {
@@ -387,7 +433,7 @@ static const struct res_sym __p_update_section_syms[] = {
{S_PREREQ, "PREREQUISITE", (char *)0},
{S_UPDATE, "UPDATE", (char *)0},
{S_ADDT, "ADDITIONAL", (char *)0},
{0, (char *)0, (char *)0}
{0, (char *)0, (char *)0}
};
const struct res_sym __p_key_syms[] = {
@@ -615,6 +661,7 @@ p_option(u_long option) {
case RES_USE_INET6: return "inet6";
#ifdef RES_USE_EDNS0 /*%< KAME extension */
case RES_USE_EDNS0: return "edns0";
case RES_NSID: return "nsid";
#endif
#ifdef RES_USE_DNAME
case RES_USE_DNAME: return "dname";
+56 -10
View File
@@ -66,7 +66,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
static const char rcsid[] = "$Id: res_mkquery.c,v 1.5.18.1 2005/04/27 05:01:11 sra Exp $";
static const char rcsid[] = "$Id: res_mkquery.c,v 1.5.18.2 2008/04/03 23:15:15 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -201,9 +201,6 @@ res_nmkquery(res_state statp,
#ifdef RES_USE_EDNS0
/* attach OPT pseudo-RR, as documented in RFC2671 (EDNS0). */
#ifndef T_OPT
#define T_OPT 41
#endif
int
res_nopt(res_state statp,
@@ -228,15 +225,16 @@ res_nopt(res_state statp,
if ((ep - cp) < 1 + RRFIXEDSZ)
return (-1);
*cp++ = 0; /*%< "." */
ns_put16(T_OPT, cp); /*%< TYPE */
*cp++ = 0; /*%< "." */
ns_put16(ns_t_opt, cp); /*%< TYPE */
cp += INT16SZ;
if (anslen > 0xffff)
anslen = 0xffff; /* limit to 16bit value */
ns_put16(anslen & 0xffff, cp); /*%< CLASS = UDP payload size */
ns_put16(anslen & 0xffff, cp); /*%< CLASS = UDP payload size */
cp += INT16SZ;
*cp++ = NOERROR; /*%< extended RCODE */
*cp++ = 0; /*%< EDNS version */
*cp++ = NOERROR; /*%< extended RCODE */
*cp++ = 0; /*%< EDNS version */
if (statp->options & RES_USE_DNSSEC) {
#ifdef DEBUG
if (statp->options & RES_DEBUG)
@@ -246,12 +244,60 @@ res_nopt(res_state statp,
}
ns_put16(flags, cp);
cp += INT16SZ;
ns_put16(0, cp); /*%< RDLEN */
ns_put16(0U, cp); /*%< RDLEN */
cp += INT16SZ;
hp->arcount = htons(ntohs(hp->arcount) + 1);
return (cp - buf);
}
/*
* Construct variable data (RDATA) block for OPT psuedo-RR, append it
* to the buffer, then update the RDLEN field (previously set to zero by
* res_nopt()) with the new RDATA length.
*/
int
res_nopt_rdata(res_state statp,
int n0, /*%< current offset in buffer */
u_char *buf, /*%< buffer to put query */
int buflen, /*%< size of buffer */
u_char *rdata, /*%< ptr to start of opt rdata */
u_short code, /*%< OPTION-CODE */
u_short len, /*%< OPTION-LENGTH */
u_char *data) /*%< OPTION_DATA */
{
register u_char *cp, *ep;
#ifdef DEBUG
if ((statp->options & RES_DEBUG) != 0U)
printf(";; res_nopt_rdata()\n");
#endif
cp = buf + n0;
ep = buf + buflen;
if ((ep - cp) < (4 + len))
return (-1);
if (rdata < (buf + 2) || rdata >= ep)
return (-1);
ns_put16(code, cp);
cp += INT16SZ;
ns_put16(len, cp);
cp += INT16SZ;
memcpy(cp, data, len);
cp += len;
len = cp - rdata;
ns_put16(len, rdata - 2); /* Update RDLEN field */
return (cp - buf);
}
#endif
/*! \file */
+11 -3
View File
@@ -66,7 +66,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
static const char rcsid[] = "$Id: res_query.c,v 1.7.18.1 2005/04/27 05:01:11 sra Exp $";
static const char rcsid[] = "$Id: res_query.c,v 1.7.18.2 2008/04/03 23:15:15 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -115,8 +115,9 @@ res_nquery(res_state statp,
{
u_char buf[MAXPACKET];
HEADER *hp = (HEADER *) answer;
int n;
u_int oflags;
u_char *rdata;
int n;
oflags = statp->_flags;
@@ -131,8 +132,14 @@ again:
buf, sizeof(buf));
#ifdef RES_USE_EDNS0
if (n > 0 && (statp->_flags & RES_F_EDNS0ERR) == 0 &&
(statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0U)
(statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC|RES_NSID))) {
n = res_nopt(statp, n, buf, sizeof(buf), anslen);
rdata = &buf[n];
if (n > 0 && (statp->options & RES_NSID) != 0U) {
n = res_nopt_rdata(statp, n, buf, sizeof(buf), rdata,
NS_OPT_NSID, 0, NULL);
}
}
#endif
if (n <= 0) {
#ifdef DEBUG
@@ -142,6 +149,7 @@ again:
RES_SET_H_ERRNO(statp, NO_RECOVERY);
return (n);
}
n = res_nsend(statp, buf, n, answer, anslen);
if (n < 0) {
#ifdef RES_USE_EDNS0
+21 -7
View File
@@ -66,7 +66,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
static const char rcsid[] = "$Id: res_send.c,v 1.9.18.8 2006/10/16 23:00:58 marka Exp $";
static const char rcsid[] = "$Id: res_send.c,v 1.9.18.10 2008/01/27 02:06:26 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -302,7 +302,7 @@ int
res_nsend(res_state statp,
const u_char *buf, int buflen, u_char *ans, int anssiz)
{
int gotsomewhere, terrno, try, v_circuit, resplen, ns, n;
int gotsomewhere, terrno, tries, v_circuit, resplen, ns, n;
#ifdef USE_KQUEUE
int kq;
#endif
@@ -420,7 +420,7 @@ res_nsend(res_state statp,
/*
* Send request, RETRY times, or until successful.
*/
for (try = 0; try < statp->retry; try++) {
for (tries = 0; tries < statp->retry; tries++) {
for (ns = 0; ns < statp->nscount; ns++) {
struct sockaddr *nsap;
int nsaplen;
@@ -471,7 +471,7 @@ res_nsend(res_state statp,
if (v_circuit) {
/* Use VC; at most one attempt per server. */
try = statp->retry;
tries = statp->retry;
n = send_vc(statp, buf, buflen, ans, anssiz, &terrno,
ns);
if (n < 0)
@@ -486,7 +486,7 @@ res_nsend(res_state statp,
kq,
#endif
buf, buflen, ans, anssiz, &terrno,
ns, try, &v_circuit, &gotsomewhere);
ns, tries, &v_circuit, &gotsomewhere);
if (n < 0)
goto fail;
if (n == 0)
@@ -632,6 +632,9 @@ send_vc(res_state statp,
u_short len;
u_char *cp;
void *tmp;
#ifdef SO_NOSIGPIPE
int on = 1;
#endif
nsap = get_nsaddr(statp, ns);
nsaplen = get_salen(nsap);
@@ -679,6 +682,17 @@ send_vc(res_state statp,
return (-1);
}
}
#ifdef SO_NOSIGPIPE
/*
* Disable generation of SIGPIPE when writing to a closed
* socket. Write should return -1 and set errno to EPIPE
* instead.
*
* Push on even if setsockopt(SO_NOSIGPIPE) fails.
*/
(void)_setsockopt(statp->_vcsock, SOL_SOCKET, SO_NOSIGPIPE, &on,
sizeof(on));
#endif
errno = 0;
if (_connect(statp->_vcsock, nsap, nsaplen) < 0) {
*terrno = errno;
@@ -811,7 +825,7 @@ send_dg(res_state statp,
int kq,
#endif
const u_char *buf, int buflen, u_char *ans,
int anssiz, int *terrno, int ns, int try, int *v_circuit,
int anssiz, int *terrno, int ns, int tries, int *v_circuit,
int *gotsomewhere)
{
const HEADER *hp = (const HEADER *) buf;
@@ -915,7 +929,7 @@ send_dg(res_state statp,
/*
* Wait for reply.
*/
seconds = (statp->retrans << try);
seconds = (statp->retrans << tries);
if (ns > 0)
seconds /= statp->nscount;
if (seconds <= 0)
+1 -1
View File
@@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
size_t
fread(void * __restrict buf, size_t size, size_t count, FILE * __restrict fp)
{
int ret;
size_t ret;
FLOCKFILE(fp);
ret = __fread(buf, size, count, fp);
+1 -1
View File
@@ -214,7 +214,7 @@ _thr_rtld_init(void)
{
struct RtldLockInfo li;
struct pthread *curthread;
long dummy;
long dummy = -1;
curthread = _get_curthread();
+2 -1
View File
@@ -9,7 +9,8 @@ LIB= util
SHLIB_MAJOR= 7
SRCS= _secure_path.c auth.c gr_util.c expand_number.c flopen.c fparseln.c \
humanize_number.c kld.c login.c login_auth.c login_cap.c login_class.c \
humanize_number.c kinfo_getfile.c kinfo_getvmmap.c kld.c \
login.c login_auth.c login_cap.c login_class.c \
login_crypt.c login_ok.c login_times.c login_tty.c logout.c \
logwtmp.c pidfile.c property.c pty.c pw_util.c realhostname.c \
stub.c trimdomain.c uucplock.c
+73
View File
@@ -0,0 +1,73 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/user.h>
#include <sys/sysctl.h>
#include <stdlib.h>
#include <string.h>
#include "libutil.h"
struct kinfo_file *
kinfo_getfile(pid_t pid, int *cntp)
{
int mib[4];
int error;
int cnt;
size_t len;
char *buf, *bp, *eb;
struct kinfo_file *kif, *kp, *kf;
*cntp = 0;
len = 0;
mib[0] = CTL_KERN;
mib[1] = KERN_PROC;
mib[2] = KERN_PROC_FILEDESC;
mib[3] = pid;
error = sysctl(mib, 4, NULL, &len, NULL, 0);
if (error)
return (NULL);
len = len * 4 / 3;
buf = malloc(len);
if (buf == NULL)
return (NULL);
error = sysctl(mib, 4, buf, &len, NULL, 0);
if (error) {
free(buf);
return (NULL);
}
/* Pass 1: count items */
cnt = 0;
bp = buf;
eb = buf + len;
while (bp < eb) {
kf = (struct kinfo_file *)(uintptr_t)bp;
bp += kf->kf_structsize;
cnt++;
}
kif = calloc(cnt, sizeof(*kif));
if (kif == NULL) {
free(buf);
return (NULL);
}
bp = buf;
eb = buf + len;
kp = kif;
/* Pass 2: unpack */
while (bp < eb) {
kf = (struct kinfo_file *)(uintptr_t)bp;
/* Copy/expand into pre-zeroed buffer */
memcpy(kp, kf, kf->kf_structsize);
/* Advance to next packed record */
bp += kf->kf_structsize;
/* Set field size to fixed length, advance */
kp->kf_structsize = sizeof(*kp);
kp++;
}
free(buf);
*cntp = cnt;
return (kif); /* Caller must free() return value */
}
+73
View File
@@ -0,0 +1,73 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/user.h>
#include <sys/sysctl.h>
#include <stdlib.h>
#include <string.h>
#include "libutil.h"
struct kinfo_vmentry *
kinfo_getvmmap(pid_t pid, int *cntp)
{
int mib[4];
int error;
int cnt;
size_t len;
char *buf, *bp, *eb;
struct kinfo_vmentry *kiv, *kp, *kv;
*cntp = 0;
len = 0;
mib[0] = CTL_KERN;
mib[1] = KERN_PROC;
mib[2] = KERN_PROC_VMMAP;
mib[3] = pid;
error = sysctl(mib, 4, NULL, &len, NULL, 0);
if (error)
return (NULL);
len = len * 4 / 3;
buf = malloc(len);
if (buf == NULL)
return (NULL);
error = sysctl(mib, 4, buf, &len, NULL, 0);
if (error) {
free(buf);
return (NULL);
}
/* Pass 1: count items */
cnt = 0;
bp = buf;
eb = buf + len;
while (bp < eb) {
kv = (struct kinfo_vmentry *)(uintptr_t)bp;
bp += kv->kve_structsize;
cnt++;
}
kiv = calloc(cnt, sizeof(*kiv));
if (kiv == NULL) {
free(buf);
return (NULL);
}
bp = buf;
eb = buf + len;
kp = kiv;
/* Pass 2: unpack */
while (bp < eb) {
kv = (struct kinfo_vmentry *)(uintptr_t)bp;
/* Copy/expand into pre-zeroed buffer */
memcpy(kp, kv, kv->kve_structsize);
/* Advance to next packed record */
bp += kv->kve_structsize;
/* Set field size to fixed length, advance */
kp->kve_structsize = sizeof(*kp);
kp++;
}
free(buf);
*cntp = cnt;
return (kiv); /* Caller must free() return value */
}
+6
View File
@@ -64,6 +64,8 @@ struct termios;
struct winsize;
struct utmp;
struct in_addr;
struct kinfo_file;
struct kinfo_vmentry;
__BEGIN_DECLS
void clean_environment(const char * const *_white,
@@ -99,6 +101,10 @@ int realhostname_sa(char *host, size_t hsize, struct sockaddr *addr,
int kld_isloaded(const char *name);
int kld_load(const char *name);
struct kinfo_file *
kinfo_getfile(pid_t _pid, int *_cntp);
struct kinfo_vmentry *
kinfo_getvmmap(pid_t _pid, int *_cntp);
#ifdef _STDIO_H_ /* avoid adding new includes */
char *fparseln(FILE *, size_t *, size_t *, const char[3], int);
+1 -1
View File
@@ -46,7 +46,7 @@ void fatalerror(char *);
void ftpd_logwtmp(char *, char *, struct sockaddr *addr);
int ftpd_pclose(FILE *);
FILE *ftpd_popen(char *, char *);
char *getline(char *, int, FILE *);
int getline(char *, int, FILE *);
void lreply(int, const char *, ...) __printflike(2, 3);
void makedir(char *);
void nack(char *);
+22 -6
View File
@@ -1191,7 +1191,7 @@ lookup(struct tab *p, char *cmd)
/*
* getline - a hacked up version of fgets to ignore TELNET escape codes.
*/
char *
int
getline(char *s, int n, FILE *iop)
{
int c;
@@ -1207,7 +1207,7 @@ getline(char *s, int n, FILE *iop)
if (ftpdebug)
syslog(LOG_DEBUG, "command: %s", s);
tmpline[0] = '\0';
return(s);
return(0);
}
if (c == 0)
tmpline[0] = '\0';
@@ -1244,13 +1244,24 @@ getline(char *s, int n, FILE *iop)
}
}
*cs++ = c;
if (--n <= 0 || c == '\n')
if (--n <= 0) {
/*
* If command doesn't fit into buffer, discard the
* rest of the command and indicate truncation.
* This prevents the command to be split up into
* multiple commands.
*/
while (c != '\n' && (c = getc(iop)) != EOF)
;
return (-2);
}
if (c == '\n')
break;
}
got_eof:
sigprocmask(SIG_SETMASK, &osset, NULL);
if (c == EOF && cs == s)
return (NULL);
return (-1);
*cs++ = '\0';
if (ftpdebug) {
if (!guest && strncasecmp("pass ", s, 5) == 0) {
@@ -1270,7 +1281,7 @@ got_eof:
syslog(LOG_DEBUG, "command: %.*s", len, s);
}
}
return (s);
return (0);
}
static void
@@ -1300,9 +1311,14 @@ yylex(void)
case CMD:
(void) signal(SIGALRM, toolong);
(void) alarm(timeout);
if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) {
n = getline(cbuf, sizeof(cbuf)-1, stdin);
if (n == -1) {
reply(221, "You could at least say goodbye.");
dologout(0);
} else if (n == -2) {
reply(500, "Command too long.");
(void) alarm(0);
continue;
}
(void) alarm(0);
#ifdef SETPROCTITLE
+6 -1
View File
@@ -2794,15 +2794,20 @@ static int
myoob(void)
{
char *cp;
int ret;
if (!transflag) {
syslog(LOG_ERR, "Internal: myoob() while no transfer");
return (0);
}
cp = tmpline;
if (getline(cp, 7, stdin) == NULL) {
ret = getline(cp, 7, stdin);
if (ret == -1) {
reply(221, "You could at least say goodbye.");
dologout(0);
} else if (ret == -2) {
/* Ignore truncated command. */
return (0);
}
upper(cp);
if (strcmp(cp, "ABOR\r\n") == 0) {
+6 -5
View File
@@ -358,11 +358,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp)
* future processes to honor the potentially un-safe variables.
*/
if (!trust) {
unsetenv(LD_ "PRELOAD");
unsetenv(LD_ "LIBMAP");
unsetenv(LD_ "LIBRARY_PATH");
unsetenv(LD_ "LIBMAP_DISABLE");
unsetenv(LD_ "DEBUG");
if (unsetenv(LD_ "PRELOAD") || unsetenv(LD_ "LIBMAP") ||
unsetenv(LD_ "LIBRARY_PATH") || unsetenv(LD_ "LIBMAP_DISABLE") ||
unsetenv(LD_ "DEBUG")) {
_rtld_error("environment corrupt; aborting");
die();
}
}
ld_debug = getenv(LD_ "DEBUG");
libmap_disable = getenv(LD_ "LIBMAP_DISABLE") != NULL;
+2 -2
View File
@@ -18,11 +18,11 @@
# Set these, release builder!
#
# Fixed version:
#BUILDNAME=7.0-STABLE
#BUILDNAME=7.1-STABLE
#
# Automatic SNAP versioning:
DATE != date +%Y%m%d
BASE = 7.0
BASE = 7.1
BUILDNAME?=${BASE}-${DATE}-SNAP
#
#CHROOTDIR=/junk/release
-17
View File
@@ -1,17 +0,0 @@
# $FreeBSD$
# $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/Makefile,v 1.4 2002/10/28 18:37:19 ue Exp $
# basiert auf: 1.3
RELN_ROOT?= ${.CURDIR}/..
SUBDIR = relnotes
SUBDIR+= hardware
SUBDIR+= readme
SUBDIR+= errata
SUBDIR+= installation
SUBDIR+= early-adopter
COMPAT_SYMLINK = de
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
@@ -1,23 +0,0 @@
# The FreeBSD Documentation
# The FreeBSD German Documentation Project
#
# $FreeBSD$
# $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/early-adopter/Makefile,v 1.1 2002/10/28 18:37:20 ue Exp $
# basiert auf: 1.3
RELN_ROOT?= ${.CURDIR}/../..
.ifdef NO_LANGCODE_IN_DESTDIR
DESTDIR?= ${DOCDIR}/early-adopter
.else
DESTDIR?= ${DOCDIR}/de_DE.ISO8859-1/early-adopter
.endif
DOC?= article
FORMATS?= html
INSTALL_COMPRESSED?=gz
INSTALL_ONLY_COMPRESSED?=
SRCS+= article.sgml
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
@@ -1,557 +0,0 @@
<!--
The FreeBSD Documentation Project
The FreeBSD German Documentation Project
$FreeBSD$
$FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/early-adopter/article.sgml,v 1.24 2003/05/25 12:44:41 mheinen Exp $
basiert auf: 1.15
-->
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
%man;
<!ENTITY % freebsd PUBLIC "-//FreeBSD//ENTITIES DocBook Miscellaneous FreeBSD Entities//EN">
%freebsd;
<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN">
%authors;
<!ENTITY % teams PUBLIC "-//FreeBSD//ENTITIES DocBook Team Entities//EN">
%teams;
<!ENTITY % mailing-lists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DE">
%mailing-lists;
<!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN">
%release;
<!ENTITY release.4x "4.<replaceable>X</replaceable>">
<!ENTITY release.5x "5.<replaceable>X</replaceable>">
]>
<article lang="de">
<articleinfo>
<title>Hinweise f&uuml;r die ersten Anwender von &os;
&release.current;</title>
<authorgroup>
<corpauthor>The &os; Release Engineering Team</corpauthor>
</authorgroup>
<pubdate>$FreeBSD$</pubdate>
<copyright>
<year>2002</year>
<year>2003</year>
<holder role="mailto:[email protected]">The &os; Release
Engineering Team</holder>
</copyright>
<abstract>
<para>Dieser Artikel enth&auml;lt Informationen &uuml;ber den
Status von &os; &release.current; f&uuml;r die Anwender, die
bisher noch keine Erfahrung mit den &release.5x; Versionen
oder &os; sammeln konnten. Er enth&auml;lt einige
Hintergrundinformationen &uuml;ber die vor und w&auml;hrend
einer Ver&ouml;ffentlichung ablaufende Prozesse, nennt die
wichtigsten Neuerungen und die Stellen, an denen die ersten
Anwender Probleme haben k&ouml;nnten. Weiterhin gibt es
Informationen &uuml;ber die Pl&auml;ne f&uuml;r weitere
Ver&ouml;ffentlichungen im Entwicklungszweig 4-STABLE und
ein paar Hinweise f&uuml;r die Aktualisierung bestehender
Systeme.</para>
</abstract>
</articleinfo>
<sect1 id="intro">
<title>Einf&uuml;hrung</title>
<para>Nach &uuml;ber zwei Jahren steht mit &os; &release.5x;
wieder eine komplett neue &os;-Version zur Verf&uuml;gung. Sie
bietet nicht nur diverse neue M&ouml;glichkeiten, auch und
gerade <quote>unter der Haube</quote> hat sich einiges
verbessert. Der Nachteil dieser Neuerungen ist, da&szlig;
gro&szlig;e Teile des Systems neu und nicht ausreichend getestet
sind. Im Vergleich zu den existierenden &release.4x; Versionen
kann der Schritt zu den ersten &release.5x; Versionen zu
Verschlechterungen in den Bereichen Stabilit&auml;t, Leistung
und teilweise auch Funktionalit&auml;t f&uuml;hren.</para>
<para>Aus diesen Gr&uuml;nden warnen wir alle Anwender, ihre
Systeme nicht von &auml;lteren &os;-Versionen auf 5.0 zu
aktualisieren, wenn sie die &quot;Problemzonen&quot; nicht kennen
oder nicht bereit sind, die Einschr&auml;nkungen in den neuesten
Versionen in Kauf zu nehmen. Gerade konservative Anwender
sollten in der nahen Zukunft &release.4x;-Versionen (wie
4.8-RELEASE) benutzen. Wir meinen, da&szlig; diese Anwender
erst zu &release.5x; wechseln sollten, nachdem der
Entwicklungszweig 5-STABLE existiert; dies wird wahrscheinlich
nach der Ver&ouml;ffentlichung von 5.2-RELEASE
passieren.</para>
<para>Hier zeigt sich das <quote>Henne und Ei</quote> Problem bei
der Ver&ouml;ffentlichung von &os; &release.5x;. Alle am &os;
Project beteiligten Personen wollen ein &os;, das m&ouml;glichst
stabil und zuverl&auml;ssig ist. Um dieses Ziel zu erreichen,
m&uuml;ssen die neue Version und speziell die neuen Komponenten
von m&ouml;glichst vielen Anwendern getestet werden.
Dummerweise gibt es bei realistischer Betrachtung nur eine
M&ouml;glichkeit, eine gr&ouml;&szlig;ere Anzahl an Anwender
f&uuml;r einen Test zu gewinnen: Die Ver&ouml;ffentlichung der
zu testenden Version!</para>
<para>Dieser Artikel beschreibt einige der Probleme, die bei der
Installation und Benutzung von &os; &release.current; auftreten
k&ouml;nnen. Zuerst wird beschrieben, wie eine neue FreeBSD
Version ver&ouml;ffentlicht wird. Dann werden die
interessanteren Neuerungen in FreeBSD &release.current; und die
Bereiche, in denen (gerade f&uuml;r unvorsichtige Anwender)
Probleme auftreten k&ouml;nnen, vorgestellt. Anwender, die erst
einmal bei Systemen auf Basis von 4-STABLE bleiben m&ouml;chten,
erhalten einen kurzen Ausblick auf die kurz- und mittelfristigen
Planungen f&uuml;r diesen Entwicklungszweig. Zuletzt wird
besprochen, was bei einer Aktualisierung eines existierenden
&release.4x; Systems auf 5.0 beachtet werden mu&szlig;.</para>
</sect1>
<sect1 id="release-overview">
<title>Ver&ouml;ffentlichung neuer &os;-Versionen</title>
<para>Das Prinzip der &os;-Entwicklung ist die Verwendung mehrerer
Entwicklungszweige innerhalb eines <quote>CVS
Repository</quote>. Der Hauptzweig wird <quote>CURRENT</quote>
genannt und innerhalb des Repository mit dem symbolischen Namen
<literal>HEAD</literal> referenziert. Neuerungen werden
zun&auml;chst in diesen Zweig eingebracht. Das bedeutet zwar,
da&szlig; neue M&ouml;glichkeiten zun&auml;chst einmal nur in
CURRENT zur Verf&uuml;gung stehen, es bedeutet allerdings auch,
da&szlig; dieser Zweig von Zeit zu Zeit Kummer bereitet,
w&auml;hrend die Neuerungen getestet und ihre Fehler entfernt
werden.</para>
<para>Wenn eine neue &os;-Version ver&ouml;ffentlicht wird,
basiert diese in der Regel auf einem der <quote>STABLE</quote>
(stabil) genannten Entwicklungszweige. Neuerungen werden nur in
diese Entwicklungszweige &uuml;bernommen, nachdem sie in CURRENT
getestet wurden. Zur Zeit gibt es nur einen aktiven STABLE
Entwicklungszweig: <quote>4-STABLE</quote>; dieser Zweig war
die Grundlage f&uuml;r alle &release.4x; Versionen. Dieser
Zweig wird innerhalb des CVS Repository durch den symbolischen
Namen <literal>RELENG_4</literal> gekennzeichnet.</para>
<para>Die Basis f&uuml;r &os; 5.0 und 5.1 ist der
Entwicklungszweig CURRENT. Damit wird zum ersten Mal nach
&uuml;ber zwei Jahren eine neue Version auf Basis dieses
Entwicklungszweiges erscheinen (die letzte war &os; 4.0, im
M&auml;rz 2000).</para>
<para>Einige Zeit nach der Ver&ouml;ffentlichung von &os; 5.0 wird
im &os; CVS Repository der Zweig <quote>5-STABLE</quote> mit dem
symbolischen Namen <literal>RELENG_5</literal> erzeugt werden.
Die letzten beiden Entwicklungszweige dieser Art (3-STABLE und
4-STABLE) wurden unmittelbar nach der Ver&ouml;ffentlichung der
jeweiligen <quote>Punkt Null</quote> Versionen (3.0 bzw. 4.0)
erzeugt. R&uuml;ckblickend m&uuml;ssen wir feststellen,
da&szlig; dadurch in beiden F&auml;llen nicht genug Zeit war, um
CURRENT zu stabilisieren, bevor der neue Entwicklungszweig
eingerichtet wurde. Dies f&uuml;hrte zu unn&ouml;tiger
Mehrarbeit, da Fehlerkorrekturen von einem Zweig in den anderen
Zweig &uuml;bertragen werden mu&szlig;ten; au&szlig;erdem kam
es zu einigen &Auml;nderungen in der Architektur, die nicht in
den jeweils anderen Zweig &uuml;bernommen werden konnten.</para>
<para>Aus diesem Grund wird das Release Engineering Team den neuen
5-STABLE Entwicklungszweig erst dann im CVS Repository
einrichten, wenn eine solide Grundlage zur Verf&uuml;gung steht.
Es ist sehr wahrscheinlich, da&szlig; vorher mehrere
&release.5x; Versionen erscheinen werden; zur Zeit rechnen wir
damit, da&szlig; 5-STABLE nach dem Erscheinen von 5.2-RELEASE
erzeugt werden wird.</para>
<para>Weitere Informationen &uuml;ber den Ablauf bei der
Ver&ouml;ffentlichung einer neuen &os; Version finden Sie auf
den <ulink
url="http://www.FreeBSD.org/releng/index.html">Release
Engineering Web pages</ulink> und im Artikel <ulink
url="http://www.freebsd.org/doc/en_US.ISO8859-1/articles/releng/index.html">&os;
Release Engineering</ulink>. Informationen &uuml;ber den
geplanten Entwicklungszweig 5-STABLE finden Sie auf der <ulink
url="http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/5-roadmap/index.html"><quote>The
Roadmap for 5-STABLE</quote></ulink>.</para>
</sect1>
<sect1 id="new">
<title>Neuerungen</title>
<para>Die Glanzpunkte von &os; &release.5x; sind die vielen Neuerungen.
Diese Neuerungen und die neue Funktionalit&auml;t basieren zum
gr&ouml;&szlig;ten Teil auf massiven &Auml;nderungen der
Systemarchitektur, die nicht in den Entwicklungszweig 4-STABLE
eingepflegt wurden. Viele in sich abgeschlossene
&Auml;nderungen wie Treiber f&uuml;r neue Ger&auml;te oder neue
Benutzerprogramme wurden dagegen schon nach 4-STABLE
&uuml;bernommen. Die folgende Liste enth&auml;lt eine kurze
&Uuml;bersicht &uuml;ber die wichtigsten Neuerungen in &os;
5.0:</para>
<itemizedlist>
<listitem>
<para>SMPng: Die <quote>n&auml;chste Generation</quote> der
Unterst&uuml;tzung f&uuml;r Systeme mit mehreren Prozessoren
(noch nicht abgeschlossen). Es ist jetzt m&ouml;glich,
da&szlig; mehrere Prozessoren gleichzeitig den Kernel
nutzen.</para>
</listitem>
<listitem>
<para>KSE: Die <quote>Kernel Scheduled Entities</quote>
erlauben es einem Prozess, mehrere Threads auf Kernel-Ebene
zu nutzen, analog zur Aktivierung via Scheduler. Die
(experimentellen) Bibliotheken <filename>libkse</filename>
und <filename>libthr</filename> erlauben auch normalen
Programmen mit mehreren Threads, diese Erweiterung zu
nutzen.</para>
</listitem>
<listitem>
<para>Neue Plattformen: Zus&auml;tzlich zu i386, pc98 und
Alpha werden jetzt auch sparc64 und ia64 Systeme
unterst&uuml;tzt.</para>
</listitem>
<listitem>
<para>GCC: Der Compiler und die dazugeh&ouml;rigen Werkzeuge
basieren jetzt auf GCC 3.2.2 und nicht mehr auf GCC
2.95.<replaceable>X</replaceable>.</para>
</listitem>
<listitem>
<para>MAC: Unterst&uuml;tzung f&uuml;r erweiterbare
<quote>Mandatory Access Control</quote> Regelwerke.</para>
</listitem>
<listitem>
<para>GEOM: Ein flexibles Ger&uuml;st zur Manipulation von
Daten beim Transfer von und zu Festplatten. Auf dieser
Basis wurde ein experimentelles Modul zur
Verschl&uuml;sselung des Festplatteninhaltes
entwickelt.</para>
</listitem>
<listitem>
<para>FFS: Das Dateisystem unterst&uuml;tzt jetzt
Hintergrund-&man.fsck.8; (um das System nach einem Absturz
schneller verf&uuml;gbar zu machen) sowie
<quote>Schnappsch&uuml;sse</quote>.</para>
</listitem>
<listitem>
<para>UFS2: Dieses neue Dateisystem unterst&uuml;tzt
gr&ouml;&szlig;ere Dateien und zus&auml;tzliche
Dateiberechtigungen. &man.newfs.8; erzeugt jetzt
standardm&auml;&szlig;ig UFS2 Dateisysteme und auf allen
Plattformen au&szlig;er PC98 gilt dies auch f&uuml;r
Dateisysteme, die mit &man.sysinstall.8; erzeugt
werden.</para>
</listitem>
<listitem>
<para>Cardbus: Cardbus wird jetzt unterst&uuml;tzt.</para>
</listitem>
</itemizedlist>
<para>Eine ausf&uuml;hrlichere &Uuml;bersicht &uuml;ber die
Neuerungen finden Sie in den <quote>Release Notes</quote>
f&uuml;r &os; &release.prev; und &release.current;.</para>
</sect1>
<sect1 id="drawbacks">
<title>Nachteile f&uuml;r fr&uuml;he Anwender</title>
<para>Ein Nachteil der Neuerungen in &os; &release.5x; ist,
da&szlig; es in einigen Bereichen auf Grund der noch nicht
abgeschlossenen Entwicklung zu Problemen oder zu unerwarteten
Effekten kommen kann. Einige (aber nicht alle) der Problemzonen
sind in der folgenden Liste zusammengefa&szlig;t:</para>
<itemizedlist>
<listitem>
<para>Die Arbeit an diversen Neuerungen ist noch nicht
abgeschlossen, dazu geh&ouml;ren unter anderem SMPng und
KSE. Diese Erweiterungen sind zwar f&uuml;r Test- und
Experimentalzwecke ausreichend stabil, aber unter
Umst&auml;nden nicht stabil genug f&uuml;r den
Produktionsbetrieb.</para>
</listitem>
<listitem>
<para>Durch die &Auml;nderungen in den Datenstrukturen des
Kernels und der Schnittstellen f&uuml;r Anwendungen und
Programmierer (ABI/API), m&uuml;ssen Treiber anderer
Hersteller angepa&szlig;t werden, damit sie korrekt mit &os;
5.0 zusammenarbeiten. Es ist nicht ausgeschlossen,
da&szlig; es bis zum Erscheinen des Entwicklungszweiges
5-STABLE weitere kleinere &Auml;nderungen am ABI/API geben
wird.</para>
</listitem>
<listitem>
<para>Einige Teile des &os; Basissystems wurden in die Ports
Collection verschoben. Dazu geh&ouml;ren insbesondere
<application>Perl</application>,
<application>UUCP</application> und die meisten (nicht alle)
Spiele. Diese Programme werden zwar weiterhin entwickelt
und unterst&uuml;tzt, es kann aber verwirren, da&szlig; sie
nicht mehr Teil des Basissystems sind.</para>
</listitem>
<listitem>
<para>Einige Teile des &os;-Basissystems wurden nicht mehr
gepflegt, weil es nicht gen&uuml;gend Anwender und/oder
Entwickler gab. Diese Teile mu&szlig;ten entfernt werden,
dazu z&auml;hlen unter anderem die Erzeugung von Programmen
im Format a.out;, die XNS-Netzwerkprotokolle und der Treiber
f&uuml;r den X-10 Controller.</para>
</listitem>
<listitem>
<para>Viele Ports und Packages, die mit &os; 4-STABLE noch
korrekt liefen, k&ouml;nnen mit &os; 5.0 nicht genutzt oder
nicht kompiliert werden. Der Grund ist in der Regel der
neue Compiler oder die Aufr&auml;umarbeiten in den
Header-Dateien.</para>
</listitem>
<listitem>
<para>Viele der Neuerungen in &os; &release.5x; wurden bisher
nur auf relativ wenigen Systemen getestet. Viele dieser
Neuerungen (wie SMPng) haben Auswirkungen auf gro&szlig;e
Bereiche des Kernels.</para>
</listitem>
<listitem>
<para>Die Neuerungen in &os; 5.0 enthalten noch Routinen
zur Unterst&uuml;tzung bei der Fehlersuche und Diagnose.
Dadurch kann es dazu kommen, da&szlig; ein System mit
&os; 5.0 langsamer ist als mit 4-STABLE.</para>
</listitem>
<listitem>
<para>Neuerungen werden erst in den Entwicklungszweig 4-STABLE
&uuml;bernommen, nachdem sie eine Zeit lang in -CURRENT
<quote>gereift</quote> sind. Bei &os; 5.0 fehlt dieser
stabilisierende Effekt eines -STABLE Entwicklungszweiges.
Der Entwicklungszweig 5-STABLE wird wahrscheinlich erst
einige Zeit nach der Ver&ouml;ffentlichung von 5.2-RELEASE
eingerichtet werden.</para>
</listitem>
<listitem>
<para>Die Dokumentation (wie z.B. das &os; <ulink
url="http://www.FreeBSD.org/doc/de_DE.ISO8859-1/books/handbook/index.html">Handbuch</ulink>
und der <ulink
url="http://www.FreeBSD.org/doc/de_DE.ISO8859-1/books/faq/index.html">FAQ</ulink>)
ist teilweise noch nicht auf dem Stand von
&os; &release.5x;.</para>
</listitem>
</itemizedlist>
<para>Da einige dieser Probleme auch negative Auswirkungen auf die
Stabilit&auml;t des Systems haben, r&auml;t das Release
Engineering Team konservativen Anwendern und Firmen, Versionen
aus dem Entwicklungszweig 4-STABLE zu verwenden, bis die
&release.5x; Versionen zuverl&auml;ssiger
geworden sind.</para>
</sect1>
<sect1 id="plans-stable">
<title>Die Zukunft des Entwicklungszweiges 4-STABLE</title>
<para>Die Ver&ouml;ffentlichung von &os; 5.0 bedeutete nicht das
Ende des Entwicklungszweiges 4-STABLE: &os; 4.8 erschien im
April 2003, zwei Monate nach der Ver&ouml;ffentlichung von &os;
5.0. Es wird wahrscheinlich noch eine weitere Version auf der
Basis dieses Entwicklungszweiges geben: Das f&uuml;r den Sommer
2003 geplante 4.9-RELEASE. Auch eine Version 4.10 liegt im
Bereich des M&ouml;glichen. Dies h&auml;ngt von mehreren
Faktoren ab, der wichtigste davon ist die Existenz und
Stabilit&auml;t des Entwicklungszweiges 5-STABLE. Wenn CURRENT
nicht stabil genug ist, um einen Entwicklungszweig 5-STABLE zu
rechtfertigen, werden weitere Versionen auf Basis des
Entwicklungszweiges 4-STABLE m&ouml;glich und notwendig sein.
Bis zum Erscheinen der offiziell letzten Version auf Basis von
4-STABLE bleibt es den Entwicklern &uuml;berlassen, ob sie
Neuerungen aus <literal>HEAD</literal> in 4-STABLE einpflegen
(im Rahmen der schon bestehenden Regelungen).</para>
<para>Bis zu einem gewissen Grad werden das Release Engineering
Team und die Entwickler auch die W&uuml;nsche der Benutzer nach
weiteren Versionen auf Basis von 4-STABLE beachten. Allerdings
nur, so weit dies im Rahmen der beschr&auml;nkten Ressourcen
m&ouml;glich ist.</para>
<para>Neue Versionen auf Basis des Entwicklungszweiges 4-STABLE
werden vom &a.security-officer; im &uuml;blichen Rahmen
unterst&uuml;tzt werden, genauere Informationen dazu finden Sie
auf der <ulink
url="http://www.FreeBSD.org/security/index.html">Security
page</ulink> auf der &os; Webseite. In der Regel werden die
letzten beiden Versionen jedes Entwicklungszweiges durch die
Ver&ouml;ffentlichung von Sicherheitshinweisen und Patches
unterst&uuml;tzt; dem Team ist es allerdings freigestellt, diese
Unterst&uuml;tzung auf weitere Versionen oder spezielle Probleme
auszudehnen.</para>
</sect1>
<sect1 id="upgrade">
<title>Hinweise f&uuml;r die Aktualisierung von &os; &release.4x;</title>
<para>Dieses Kapitel enth&auml;lt Hinweise f&uuml;r Anwender, die
ihr bestehendes &os; &release.4x; System auf &os; &release.5x;
aktualisieren wollen. Wie bei jeder Aktualisierung ist es auf
jeden Fall notwendig, vorher die Release Notes und die Errata der
neuen Version zu lesen; bei Aktualisierung &uuml;ber den
Quellcode ist <filename>src/UPDATING</filename>
Pflichtlekt&uuml;re.</para>
<sect2>
<title>Aktualisierung ohne Quellcode</title>
<para>Der einfachste Ansatz ist immer noch
<quote>Sicherheitskopien erstellen, Platte formatieren, neues
System installieren, Daten wieder einspielen</quote>. Dadurch
werden alle Probleme mit veralteten und nicht kompatiblen
Programmen und Konfigurationsdateien umgangen. Die neuen
Dateisysteme k&ouml;nnen maximalen Nutzen aus den diversen
Neuerungen (speziell UFS2) ziehen.</para>
<para>Zum gegenw&auml;rtigen Zeitpunkt hat noch niemand
ausf&uuml;hrlich getestet, ob und wie gut die
<quote>Upgrade</quote>-Option in &man.sysinstall.8; bei einem
Update von 4.0 zu 5.0 funktioniert. Wir raten daher dringend
von der Verwendung dieser Funktion ab. Eines der
Hauptprobleme ist, da&szlig; bei dieser Variante diverse
Dateien nicht gel&ouml;scht werden, die zwar von &release.4x;
genutzt wurden, aber in &release.5x; nicht mehr vorhanden
sind. Diese Altlasten k&ouml;nnen zu Problemen
f&uuml;hren.</para>
<para>Auf i386 und pc98 Systemen kann die Konfiguration von ISA
Ger&auml;ten beim Systemstart mit dem Werkzeug UserConfig
eingestellt werden, dies gilt auch beim Start von einem
Installations-Medium. Dieses Programm wurde in &os; 5.0 durch
&man.device.hints.5; ersetzt; dieses stellt zwar die gleiche
Funktionalit&auml;t bereit, ist aber von der Bedienung her
v&ouml;llig verschieden.</para>
<para>Bei einer Installation von Diskette kann es notwendig
werden, die neue Treiber-Diskette zu benutzen. Das
<filename>drivers.flp</filename> Diskettenimage sollte im
allgemeinen &uuml;berall dort verf&uuml;gbar sein, wo auch
schon die bekannten <filename>kern.flp</filename> und
<filename>mfsroot.flp</filename> verf&uuml;gbar sind.</para>
<para>Bei einer Installation von CD-ROM auf einem i386-System
wird jetzt ein neues Startprogramm mit dem Namen
<quote>no-emulation boot loader</quote> genutzt. Dadurch ist
es unter anderem m&ouml;glich, auf der CD den Standardkernel
(<literal>GENERIC</literal>) statt des auf den Disketten
verwendeten Mini-Kernels zu nutzen. Jedes System, das von den
Installations-CDs f&uuml;r Windows NT 4.0 booten kann, sollte
auch mit den &os; &release.5x; CD-ROMs zurechtkommen.</para>
</sect2>
<sect2>
<title>Aktualisierung mit Quellcode</title>
<para>Es ist auf jeden Fall erforderlich, vor der Aktualisierung
<filename>src/UPDATING</filename> zu lesen. Der Abschnitt
<quote>To upgrade from 4.x-stable to current</quote>
enth&auml;lt eine Schritt-f&uuml;r-Schritt Anleitung, der Sie
unbedingt folgen m&uuml;ssen, die Nutzung der &uuml;blichen
<quote>Abk&uuml;rzungen</quote> ist nicht
m&ouml;glich.</para>
</sect2>
<sect2>
<title>Allgemeine Hinweise</title>
<para><application>Perl</application> wurde aus dem Basissystem
entfernt und sollte entweder als Package oder &uuml;ber die
Ports Collection installiert werden. Die bisher &uuml;bliche
Praxis, Perl als Teil des Basissystems zu behandeln und mit ihm
zusammen zu kompilieren, f&uuml;hrte zu diversen Problemen,
die eine Aktualisierung von Perl erschwerten. Die im
Standardsystem vorhandenen Programme, die Perl
ben&ouml;tigten, wurden entweder in einer anderen Sprache neu
geschrieben (wenn sie noch ben&ouml;tigt wurden) oder
ersatzlos entfernt (wenn sie &uuml;berfl&uuml;ssig waren). Da
&man.sysinstall.8; das Perl Package bei den meisten
Distributionen automatisch mit installiert, sollte diese
&Auml;nderung kaum Auswirkungen auf die Anwender
haben.</para>
<para>Einige Scripte verlassen sich darauf, da&szlig; der
Perl-Interpreter als <filename>/usr/bin/perl</filename>
verf&uuml;gbar ist. Der Perl Port enth&auml;lt das Programm
<filename>use.perl</filename>, mit dem ein passender Satz
symbolischer Links f&uuml;r diese Scripte erzeugt werden kann.
Nach dem Aufruf von <command>use.perl port</command> sollte
alles wie erwartet funktionieren.</para>
<para>Es ist zwar m&ouml;glich, f&uuml;r &release.4x;
geschriebene Programme unter &release.5x; zu nutzen,
allerdings mu&szlig; dazu die Distribution
<filename>compat4x</filename> installiert sein. Damit
<emphasis>k&ouml;nnte</emphasis> es auch m&ouml;glich sein,
alte Ports zu benutzen.</para>
<para>Bei der Aktualisierung eines bestehenden Systems auf Basis
von 4-STABLE, ist es unbedingt notwendig, die alten Dateien in
<filename>/usr/include</filename> zu l&ouml;schen. Im
allgemeinen ist es ausreichend, dieses Verzeichnis vor der
Installation bzw. vor dem
<maketarget>installworld</maketarget> zu entfernen. Wird das
Verzeichnis nicht entfernt, kann es zu Problemen kommen
(speziell mit C++-Programmen), da der Compiler dann einen Mix
aus alten und neuen Headerdateien verwendet.</para>
<para>Es gibt kein <filename>MAKEDEV</filename> mehr, weil es
nicht mehr ben&ouml;tigt wird. &os; &release.5x; benutzt ein
spezielles Dateisystem f&uuml;r Ger&auml;te, das die
entsprechenden Device Nodes bei Bedarf automatisch erzeugt.
Weitere Informationen finden Sie in &man.devfs.5;.</para>
<para>Alle mit &man.newfs.8; erzeugten Dateisysteme werden
standardm&auml;&szlig;ig im Format UFS2 angelegt. Diese gilt
auf allen Plattformen au&szlig;er PC98 auch f&uuml;r
Dateisysteme, die mit &man.sysinstall.8; erzeugt werden. Da
&os; &release.4x; nur UFS1 lesen kann, m&uuml;ssen alle
Dateisysteme, die sowohl mit &release.4x; als auch mit
&release.5x; nutzbar sein sollen, im Format UFS1 erzeugt
werden. Dieser Fall tritt typischerweise auf Systemen auf,
auf denen &release.4x; und &release.5x; installiert und
abwechselnd betrieben werden. In &man.newfs.8; steht dazu die
Option <option>-O1</option> zur Verf&uuml;gung, auch
&man.sysinstall.8; enth&auml;lt eine entsprechende Option.
Bitte beachten Sie, da&szlig; es kein Konvertierungsprogramm
zur Umwandlung von UFS1 nach UFS2 (oder umgekehrt) gibt, nur
die Variante Backup, Formatieren, Restore.</para>
</sect2>
</sect1>
<sect1 id="summary">
<title>Zusammenfassung</title>
<para>&os; &release.current; enth&auml;lt zwar viele interessante
Neuerungen, aber es ist noch nicht f&uuml;r alle Anwender
geeignet. Aus diesem Grund haben wir in diesem Dokument
Informationen &uuml;ber die Abl&auml;ufe bei der
Ver&ouml;ffentlichung einer neuen Version, die interessantesten
Neuerungen in den &release.5x; Versionen und wahrscheinliche
Probleme gegeben. Weiterhin enthielt er einen Ausblick auf die
Zukunft des Entwicklungszweiges 4-STABLE und Informationen
f&uuml;r Anwender, die schon jetzt umsteigen wollen.</para>
</sect1>
</article>
@@ -1,22 +0,0 @@
# $FreeBSD$
# $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/errata/Makefile,v 1.4 2002/03/10 18:26:34 ue Exp $
# $Id: Makefile,v 1.5 2002/03/10 16:39:26 ue Exp $
# basiert auf: 1.5
RELN_ROOT?= ${.CURDIR}/../..
.ifdef NO_LANGCODE_IN_DESTDIR
DESTDIR?= ${DOCDIR}/errata
.else
DESTDIR?= ${DOCDIR}/de_DE.ISO8859-1/errata
.endif
DOC?= article
FORMATS?= html
INSTALL_COMPRESSED?= gz
INSTALL_ONLY_COMPRESSED?=
# SGML content
SRCS+= article.sgml
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
@@ -1,411 +0,0 @@
<!--
FreeBSD errata document. Unlike some of the other RELNOTESng
files, this file should remain as a single SGML file, so that
the dollar FreeBSD dollar header has a meaningful modification
time. This file is all but useless without a datestamp on it,
so we'll take some extra care to make sure it has one.
(If we didn't do this, then the file with the datestamp might
not be the one that received the last change in the document.)
$FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/errata/article.sgml,v 1.39 2003/05/24 13:23:46 ue Exp $
basiert auf: 1.38
-->
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
%man;
<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN">
%authors;
<!ENTITY % translators PUBLIC "-//FreeBSD//ENTITIES DocBook Translator Entities//DE">
%translators;
<!ENTITY % mlists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DE">
%mlists;
<!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN">
%release;
]>
<article lang="de">
<articleinfo>
<title>&os;
<![ %release.type.snapshot [
&release.prev;
]]>
<![ %release.type.release [
&release.current;
]]>
Errata</title>
<authorgroup>
<corpauthor>Das &os; Projekt</corpauthor>
</authorgroup>
<pubdate>$FreeBSD$</pubdate>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<holder role="mailto:[email protected]">The FreeBSD Documentation Project</holder>
</copyright>
<copyright>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<holder role="mailto:[email protected]">The FreeBSD German Documentation Project</holder>
</copyright>
</articleinfo>
<abstract>
<para>Dieses Dokument enth&auml;lt die Errata f&uuml;r &os;
<![ %release.type.current [
&release.prev;,
]]>
<![ %release.type.snapshot [
&release.prev;,
]]>
<![ %release.type.release [
&release.current;,
]]>
also wichtige Informationen, die kurz vor bzw. erst nach
der Ver&ouml;ffentlichung bekannt wurden. Dazu geh&ouml;ren
Ratschl&auml;ge zur Sicherheit sowie &Auml;nderungen in der
Software oder Dokumentation, welche die Stabilit&auml;t und die
Nutzung beeintr&auml;chtigen k&ouml;nnten. Sie sollten immer
die aktuelle Version dieses Dokumentes lesen, bevor sie diese
Version von &os; installieren.</para>
<para>Diese Errata f&uuml;r &os;
<![ %release.type.current [
&release.prev;
]]>
<![ %release.type.snapshot [
&release.prev;
]]>
<![ %release.type.release [
&release.current;
]]>
werden bis zum
Erscheinen von &os; 5.1-RELEASE weiter aktualisiert
werden.</para>
</abstract>
<sect1 id="intro">
<title>Einleitung</title>
<para>Diese Errata enthalten <quote>brandhei&szlig;e</quote>
Informationen &uuml;ber &os;
<![ %release.type.current [
&release.prev;.
]]>
<![ %release.type.snapshot [
&release.prev;.
]]>
<![ %release.type.release [
&release.current;.
]]>
Bevor Sie diese
Version installieren, sollten Sie auf jeden Fall dieses Dokument
lesen, um &uuml;ber Probleme informiert zu werden, die erst nach
der Ver&ouml;ffentlichung entdeckt (und vielleicht auch schon
behoben) wurden.</para>
<para>Die zusammen mit der Ver&ouml;ffentlichung erschienene
Version dieses Dokumentes (zum Beispiel die Version auf der
CDROM) ist per Definition veraltet. Allerdings sind im Internet
aktualisierte Versionen verf&uuml;gbar, die die <quote>aktuellen
Errata</quote> f&uuml;r diese Version sind. Diese Versionen
sind bei <ulink url="http://www.FreeBSD.org/releases/"></ulink>
und allen aktuellen Mirrors dieser Webseite
verf&uuml;gbar.</para>
<para>Die Snapshots von &os; &release.branch; (sowohl die der
Quelltexte als auch die der ausf&uuml;hrbaren Programme)
enthalten ebenfalls die zum Zeitpunkt ihrer
Ver&ouml;ffentlichung aktuelle Version dieses
Dokumentes.</para>
<para>Die Liste der &os; CERT security advisories finden Sie bei
<ulink url="http://www.FreeBSD.org/security/"></ulink> oder
<ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/"></ulink>.</para>
</sect1>
<sect1 id="security">
<title>Sicherheitshinweise</title>
<para>Ein &uuml;ber das Netzwerk nutzbarer Fehler in
<application>CVS</application> k&ouml;nnte dazu f&uuml;hren,
da&szlig; ein Angreifer beliebige Programme auf dem CVS Server
ausf&uuml;hren kann. Weitere Informationen finden Sie in <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-03:01.cvs.asc">FreeBSD-SA-03:01</ulink>.</para>
<para>Durch Auswertung der Antwortzeiten von
<application>OpenSSL</application> w&auml;re es einem Angreifer
mit sehr viel Rechenleistung m&ouml;glich gewesen, unter
bestimmten Umst&auml;nden den Klartext der &uuml;bermittelten
Daten zu erhalten. Dieser Fehler wurde in &os;
&release.current; durch die neue
<application>OpenSSL</application> Version 0.9.7 behoben. Auf
den f&uuml;r Sicherheitsprobleme unterst&uuml;tzten
Entwicklungszweigen wurde der Fehler durch die neue
<application>OpenSSL</application> Version 0.9.6i behoben.
Weitere Informationen finden Sie in <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-03:02.openssl.asc">FreeBSD-SA-03:02</ulink></para>
<para>Es ist theoretisch m&ouml;glich, da&szlig; ein Angreifer den
geheimen Schl&uuml;ssel ermittelt, der von der Erweiterung
<quote>syncookies</quote> genutzt wird. Dadurch sinkt deren
Effektivit&auml;t beim Schutz vor TCP SYN Flood
Denial-of-Service Angriffen. Hinweise, wie sie das Problem
umgehen k&ouml;nnen und weitere Informationen finden Sie in
<ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-03:03.syncookies.asc">FreeBSD-SA-03:03</ulink>.</para>
<para>Durch diverse Puffer-&Uuml;berl&auml;ufe in den von
<application>sendmail</application> genutzten Routinen zum
Parsen des Headers war es einen Angreifer m&ouml;glich, eine
speziell konstruierte Nachricht an &man.sendmail.8; zu senden
und so beliebige Programme ausf&uuml;hren zu lassen. Diese
Programme verf&uuml;gten &uuml;ber die Rechte des Benutzers,
unter dessen Kennung &man.sendmail.8; lief, also typischerweise
<username>root</username>. Weitere Informationen und Verweise
auf Patches finden Sie in <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-03:04.sendmail.asc">FreeBSD-SA-03:04</ulink>
und <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-03:07.sendmail.asc">FreeBSD-SA-03:07</ulink>.</para>
<para>Durch einen Puffer-&Uuml;berlauf im XDR Kodierer/Dekodierer
war es einem Angreifer m&ouml;glich, den Service zum Absturz zu
bringen. Informationen, wie Sie den Fehler beheben, finden Sie
in <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-03:05.xdr.asc">FreeBSD-SA-03:05</ulink>.</para>
<para><application>OpenSSL</application> enth&auml;lt zwei
Schwachstellen, die erst vor kurzer Zeit bekannt gemacht wurden.
Informationen, wie Sie die Probleme umgehen k&ouml;nnen und
weitere Informationen finden Sie in <ulink
url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-03:06.openssl.asc">FreeBSD-SA-03:06</ulink>.</para>
</sect1>
<sect1 id="late-news">
<title>Aktuelle Informationen</title>
<bridgehead renderas="sect3">GEOM</bridgehead>
<para>Die auf &man.geom.4; basierenden Routinen des Kernel zur
Partitionierung erlauben es nicht, eine aktive Partition zu
&uuml;berschreiben. Mit anderen Worten, es ist in der Regel
nicht m&ouml;glich, den Bootsektor einer Festplatte mit
<command>disklabel -B</command> zu aktualisieren, da die
Partition <literal>a</literal> auch den Bereich enth&auml;lt, in
dem die Bootsektoren gespeichert sind. Um dieses Problem zu
umgehen, sollten Sie von einer anderen Platte, einer CD oder der
Fixit-Diskette booten.</para>
<bridgehead renderas="sect3">&man.dump.8;</bridgehead>
<para>Werden Festplatten und &auml;hnliche Medien mit einer
Blockgr&ouml;&szlig;e von mehr als 512 Byte benutzt (zum
Beispiel mit &man.geom.4; verschl&uuml;sselte Partitionen),
behandelt &man.dump.8; die gr&ouml;&szlig;eren Sektoren nicht
korrekt und kann daher das Dateisystem nicht dumpen. Eine
M&ouml;glichkeit, das Problem zu umgehen, ist die Erzeugung einer
<quote>rohen</quote> Kopie des gesamten Dateisystems, die dann
als Eingabedatei f&uuml;r &man.dump.8; dient. Es ist
m&ouml;glich, ein komplettes Dateisystem in einer normalen Datei
zu speichern:</para>
<screen>&prompt.root; <userinput>dd if=/dev/ad0s1d.bde of=/junk/ad0.dd bs=1m</userinput>
&prompt.root; <userinput>dump 0f - /junk/ad0.dd | ...</userinput></screen>
<para>Eine etwas einfachere L&ouml;sung ist, &man.tar.1; oder
&man.cpio.1; zur Erzeugung des Backups zu verwende.</para>
<bridgehead renderas="sect3">&man.mly.4;</bridgehead>
<para>Es gibt Berichte, da&szlig; sich Systeme bei der
Installation von &os; 5.0 Snapshots auf RAIDs an
&man.mly.4;-kompatiblen Controller aufgeh&auml;ngt haben, obwohl
die Systeme problemlos mit 4.7-RELEASE zusammenarbeiten. Dieser
Fehler wurde in &os; &release.current; bereits behoben.</para>
<bridgehead renderas="sect3">NETNCP/Unterst&uuml;tzung des
Dateisystems</bridgehead>
<para>NETNCP und nwfs sind offenbar noch nicht an KSE
angepa&szlig;t worden und funktionieren daher nicht. Dieser
Fehler wurde in &os; &release.current; bereits behoben.</para>
<bridgehead renderas="sect3">&man.iir.4; Controller</bridgehead>
<para>Bei der Installation scheinen &man.iir.4;-Controller korrekt
erkannt zu werden, allerdings finden Sie keine der
angeschlossenen Festplatten.</para>
<bridgehead renderas="sect3">Timing-Probleme in
&man.truss.1;</bridgehead>
<para>Es scheint ein Timing-Problem beim Start des Debuggings mit
&man.truss.1; zu geben, durch das &man.truss.1; manchmal nicht
in der Lage ist, eine Verbindung zu einem Proze&szlig;
aufzubauen, bevor er gestartet wird. In diesem Fall meldet
&man.truss.1;, da&szlig; es die &man.procfs.5; Node f&uuml;r den
zu debuggenden Proze&szlig; nicht &ouml;ffnen kann. Es scheint
einen weiteren Fehler zu geben, durch den &man.truss.1; sich
aufh&auml;ngt, wenn &man.execve.2; den Wert
<literal>ENOENT</literal> zur&uuml;ckgibt. Ein weiteres
Timing-Problem f&uuml;hrt dazu, da&szlig; &man.truss.1; beim
Start manchmal <errorname>PIOCWAIT: Input/output
error</errorname> meldet. Es existieren zwar Korrekturen
f&uuml;r diese Probleme, da diese aber zu sehr in die Routinen
zur Ausf&uuml;hrung von Prozessen eingreifen, werden sie erst
nach dem Erscheinen von 5.0 ins System aufgenommen.</para>
<bridgehead renderas="sect3">Partitionierung von Festplatten durch
das Installationsprogramm</bridgehead>
<para>Es gibt einige Meldungen &uuml;ber Fehler bei der
Partitionierung von Festplatten mit &man.sysinstall.8;. Eines
der Probleme ist, da&szlig; &man.sysinstall.8; den freien Platz
auf einer Festplatten nicht neu berechnen kann, nachdem der Typ
einer FDISK-Partition ge&auml;ndert wurde.</para>
<bridgehead renderas="sect3">Veraltete Dokumentation</bridgehead>
<para>In einigen F&auml;llen wurde die Dokumentation (wie zum
Beispiel die FAQ und das Handbuch) nicht aktualisiert und geht
nicht auf die Neuerungen in &os; &release.prev; ein. Zum
Beispiel fehlt noch Dokumentation zu &man.gbde.8; und den neuen
<quote>fast IPsec</quote> Routinen.</para>
<bridgehead renderas="sect3">SMB Dateisystem</bridgehead>
<para>Ab und zu kommt beim Versuch, die Verbindung zu einem SMBFS
Share zu trennen, die Meldung <errorname>Device
busy</errorname>, obwohl das Share nicht benutzt wird. Die
einzige L&ouml;sung f&uuml;r dieses Problem ist, die Operation
so lange zu wiederholen, bis die Verbindung getrennt wird.
Dieser Fehler wurde in &release.current; bereits behoben.</para>
<para>Der Versuch, die Trennung der Verbindung zu einem SMBFS
Share mit <command>umount -f</command> zu erzwingen, kann zu
einer Kernel Panic f&uuml;hren. Dieser Fehler wurde in
&release.current; bereits behoben.</para>
<bridgehead renderas="sect3">&man.fstat.2;</bridgehead>
<para>Wird &man.fstat.2; auf einen Socket angewendet, f&uuml;r den
bereits eine Verbindung besteht, sollte es die Anzahl der zum
Lesen verf&uuml;gbaren Zeichen in dem Feld
<varname>st_size</varname> der Struktur <varname>struct
stat</varname> zur&uuml;ckgeben. Leider wird bei TCP Sockets immer ein
<varname>st_size</varname> von <literal>0</literal> gemeldet.
Dieser Fehler wurde in &release.current; bereits behoben.</para>
<bridgehead renderas="sect3">Kernel Event Queues</bridgehead>
<para>Der zu &man.kqueue.2; geh&ouml;rende Filter
<literal>EVFILT_READ</literal> meldet f&auml;lschlicherweise
immer, da&szlig; an einem TCP Socket <literal>0</literal>
Zeichen zum Lesen bereitstehen, auch wenn in Wirklichkeit
Zeichen zum Lesen verf&uuml;gbar sind. Die bei
<literal>EVFILT_READ</literal> verf&uuml;gbare Option
<literal>NOTE_LOWAT</literal> arbeitet bei TCP Sockets ebenfalls
fehlerhaft. Dieser Fehler wurde in &release.current; bereits
behoben.</para>
<bridgehead renderas="sect3">POSIX Named Semaphores</bridgehead>
<para>Eine der Neuerungen in &os; &release.prev; ist die
Unterst&uuml;tzung f&uuml;r Named Semaphores nach POSIX. Die
Routinen enthalten leider einen Fehler, durch den sich
&man.sem.open.3; falsch verhalten kann, wenn eine Semaphore von
einem Proze&szlig; mehrfach ge&ouml;ffnet wird und durch den
&man.sem.close.3; zum Absturz des Programms f&uuml;hren kann.
Dieser Fehler wurde in &release.current; bereits behoben.</para>
<bridgehead renderas="sect3">Zugriffsrechte f&uuml;r
<filename>/dev/tty</filename></bridgehead>
<para>&os; &release.prev; enth&auml;lt einen kleinen Fehler im
Bereich der Berechtigungen von <filename>/dev/tty</filename>.
Dieser Fehler tritt auf, wenn sich ein Benutzer einloggt, der
weder <username>root</username> noch Mitglied der Gruppe
<groupname>tty</groupname> ist. Wechselt dieser Benutzer nun mit
&man.su.1; zu einer anderen Benutzerkennung, die ebenfalls
weder <username>root</username> noch Mitglied der Gruppe
<groupname>tty</groupname> ist, kann er &man.ssh.1; nicht
nutzen, da es <filename>/dev/tty</filename> nicht &ouml;ffnen
kann. Dieser Fehler wurde in &release.current; bereits
behoben.</para>
<bridgehead renderas="sect3">&man.growfs.8;</bridgehead>
<para>&man.growfs.8; funktioniert auf &man.vinum.4; Partitionen
nicht mehr, da auf ihnen kein Disklabel mehr emuliert wird und
&man.growfs.8; das Disklabel analysieren will. Das Problem
betrifft wahrscheinlich auch alle anderen Massenspeicher,
f&uuml;r die &man.geom.4; benutzt wird.</para>
<bridgehead renderas="sect3">IPFW</bridgehead>
<para>&man.ipfw.4; <literal>skipto</literal> Regeln funktionieren
nicht, wenn gleichzeitig das Schl&uuml;sselwort
<literal>log</literal> verwendet wird. Auch die
<literal>uid</literal> funktionieren nicht richtig. Diese Fehler
wurden in &release.current; bereits behoben.</para>
<bridgehead renderas="sect3"> &man.adduser.8; und
Pa&szlig;w&ouml;rter</bridgehead>
<para>&man.adduser.8; kann das Pa&szlig;wort eines neu angelegten
Benutzers nicht setzen, wenn dieses Sonderzeichen der Shell
enth&auml;lt. Dieser Fehler wurde in &release.current; bereits
behoben.</para>
<bridgehead renderas="sect3">&man.xl.4;</bridgehead>
<para>Der Treiber &man.xl.4; enth&auml;lt einen Fehler, der zu
einem Absturz des Systems mit der Meldung <errorname>kernel
panic</errorname> und anderen Problemen f&uuml;hren kann, wenn
man versucht, ein Netzwerk-Interface zu konfigurieren. Dieser
Fehler wurde in &release.current; bereits behoben.</para>
<bridgehead renderas="sect3">ISC DHCP</bridgehead>
<para><application>ISC DHCP</application> steht jetzt in der
Version 3.0.1rc11 zur Verf&uuml;gung. Diese Aktualisierung
erfolgte bereits in &os; &release.prev;, wurde aber nicht in
den Release Notes dokumentiert.</para>
<bridgehead renderas="sect3">Kompatibilit&auml;tsprobleme bei
&man.amd.8;</bridgehead>
<para>Der nicht-blockierende Teil der RPC-Routinen in
&release.prev; ist fehlerhaft. Einer der auff&auml;lligsten
Effekte dieser Fehler ist, da&szlig; Anwender von &man.amd.8;
nicht in der Lage sind, Dateisysteme von einem &release.prev;
Server zu mounten. Dieser Fehler wurde in &release.current;
bereits behoben.</para>
<bridgehead renderas="sect3">nsswitch</bridgehead>
<para>Im Eintrag f&uuml;r <application>nsswitch</application> in
den Release Notes wurde ein falscher Name f&uuml;r die bisher
genutzte Konfigurationsdatei genannt. Die bisher genutzte
Konfigurationsdatei ist
<filename>/etc/host.conf</filename>.</para>
<bridgehead renderas="sect3">Mailman</bridgehead>
<para>Die &os; Mailinglisten werden jetzt mit Mailman und nicht
mehr mit Majordomo verwaltet. Weitere Informationen finden sie
auf der <ulink
url="http://www.FreeBSD.org/mailman/listinfo/">FreeBSD Mailman
Info Page</ulink>.</para>
</sect1>
</article>
@@ -1,14 +0,0 @@
# $FreeBSD$
# $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/Makefile,v 1.4 2002/11/09 18:00:42 ue Exp $
# basiert auf: 1.5
RELN_ROOT?= ${.CURDIR}/../..
SUBDIR = alpha
SUBDIR+= ia64
SUBDIR+= i386
SUBDIR+= pc98
SUBDIR+= sparc64
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
@@ -1,11 +0,0 @@
# $FreeBSD$
# $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/Makefile.inc,v 1.2 2002/03/10 18:41:33 ue Exp $
# $Id: Makefile.inc,v 1.5 2002/03/10 15:37:14 ue Exp $
# basiert auf: 1.2
.ifdef NO_LANGCODE_IN_DESTDIR
DESTDIR?= ${DOCDIR}/hardware/${.CURDIR:T}
.else
DESTDIR?= ${DOCDIR}/de_DE.ISO8859-1/hardware/${.CURDIR:T}
.endif
@@ -1,23 +0,0 @@
# $FreeBSD$
# $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/alpha/Makefile,v 1.3 2002/03/10 18:41:33 ue Exp $
# $Id: Makefile,v 1.6 2002/03/10 15:37:14 ue Exp $
# basiert auf: 1.6
RELN_ROOT?= ${.CURDIR}/../../..
DOC?= article
FORMATS?= html
INSTALL_COMPRESSED?= gz
INSTALL_ONLY_COMPRESSED?=
JADEFLAGS+= -V %generate-article-toc%
# SGML content
SRCS+= article.sgml
SRCS+= proc-alpha.sgml
SRCS+= ../common/hw.ent
SRCS+= ../common/artheader.sgml
SRCS+= ../common/dev.sgml
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
@@ -1,32 +0,0 @@
<!--
$FreeBSD$
$FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/alpha/article.sgml,v 1.5 2002/10/12 18:02:21 ue Exp $
basiert auf: 1.4
-->
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
%man;
<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN">
%authors;
<!ENTITY % translators PUBLIC "-//FreeBSD//ENTITIES DocBook Translator Entities//DE">
%translators;
<!ENTITY % mlists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DE">
%mlists;
<!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN">
%release;
<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections;
<!-- Architecture-specific customization -->
<!ENTITY arch "alpha">
<!ENTITY arch.print "Alpha/AXP">
]>
<article lang="de">
&artheader;
&sect.intro;
&sect.proc.alpha;
&sect.dev;
</article>
File diff suppressed because it is too large. Load diff
@@ -1,33 +0,0 @@
<!--
$FreeBSD$
$FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/common/artheader.sgml,v 1.4 2003/01/09 12:14:47 ue Exp $
basiert auf: 1.4
-->
<articleinfo>
<title>&os;/&arch; &release.current; Hardware Information</title>
<corpauthor>The FreeBSD German Documentation Project</corpauthor>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<holder role="mailto:[email protected]">The FreeBSD Documentation
Project</holder>
</copyright>
<copyright>
<year>2002</year>
<year>2003</year>
<holder role="mailto:[email protected]">The
FreeBSD German Documentation Project</holder>
</copyright>
</articleinfo>
File diff suppressed because it is too large. Load diff
@@ -1,20 +0,0 @@
<!-- -*- sgml -*- -->
<!--
$FreeBSD$
$FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/common/hw.ent,v 1.4 2002/07/08 18:42:56 ue Exp $
basiert auf: 1.4
-->
<!-- Text constants which probably don't need to be changed.-->
<!-- Files to be included -->
<!ENTITY artheader SYSTEM "../common/artheader.sgml">
<!ENTITY sect.intro SYSTEM "../common/intro.sgml">
<!ENTITY sect.proc.alpha SYSTEM "../alpha/proc-alpha.sgml">
<!ENTITY sect.proc.i386 SYSTEM "../i386/proc-i386.sgml">
<!ENTITY sect.proc.ia64 SYSTEM "../ia64/proc-ia64.sgml">
<!ENTITY sect.proc.pc98 SYSTEM "../pc98/proc-pc98.sgml">
<!ENTITY sect.proc.sparc64 SYSTEM "../sparc64/proc-sparc64.sgml">
<!ENTITY sect.dev SYSTEM "../common/dev.sgml">
@@ -1,30 +0,0 @@
<!--
$FreeBSD$
$FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/common/intro.sgml,v 1.6 2003/05/24 21:35:15 ue Exp $
basiert auf: 1.6
-->
<sect1 id="intro">
<title>Einf&uuml;hrung</title>
<para>Dieses Dokument enth&auml;lt die Liste der unterst&uuml;tzen
Ger&auml;te f&uuml;r &os; &release.current; auf &arch.print;
Systemen (meistens einfach &os;/&arch; &release.current; genannt).
Hier finden Sie zum einen alle die Ger&auml;te, von denen wir
wissen, da&szlig; Sie funktionieren; zum anderen finden Sie hier
Hinweise, wie Sie den Kernel anpassen k&ouml;nnen, wenn Sie ein
bisher noch nicht unterst&uuml;tztes Ger&auml;t verwenden
wollen.</para>
<note>
<para>Dieses Dokument enth&auml;lt Informationen f&uuml;r
&arch.print; Systeme. Andere Versionen dieses Dokumentes, die
f&uuml;r andere Plattformen gedacht sind, werden in vielen
Punkten von diesem Dokument abweichen.</para>
</note>
<para arch="ia64">Weitergehende Informationen &uuml;ber &os;/&arch;
finden Sie auf den Webseiten des <ulink
url="http://www.FreeBSD.org/platforms/ia64/index.html">&os;/&arch;
Project</ulink>.</para>
</sect1>
@@ -1,23 +0,0 @@
# $FreeBSD$
# $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/i386/Makefile,v 1.2 2002/03/10 18:41:36 ue Exp $
# $Id: Makefile,v 1.3 2002/03/10 15:37:15 ue Exp $
# basiert auf: 1.5
RELN_ROOT?= ${.CURDIR}/../../..
DOC?= article
FORMATS?= html
INSTALL_COMPRESSED?= gz
INSTALL_ONLY_COMPRESSED?=
JADEFLAGS+= -V %generate-article-toc%
# SGML content
SRCS+= article.sgml
SRCS+= proc-i386.sgml
SRCS+= ../common/hw.ent
SRCS+= ../common/artheader.sgml
SRCS+= ../common/dev.sgml
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
@@ -1,30 +0,0 @@
<!--
$FreeBSD$
$FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/i386/article.sgml,v 1.5 2002/12/07 21:09:09 ue Exp $
basiert auf: 1.4
-->
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
%man;
<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN">
%authors;
<!ENTITY % mlists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DE">
%mlists;
<!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN">
%release;
<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections;
<!-- Architecture-specific customization -->
<!ENTITY arch "i386">
<!ENTITY arch.print "i386">
]>
<article lang="de">
&artheader;
&sect.intro;
&sect.proc.i386;
&sect.dev;
</article>
@@ -1,117 +0,0 @@
<!--
$FreeBSD$
$FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/i386/proc-i386.sgml,v 1.13 2003/05/24 21:49:22 ue Exp $
basiert auf: 1.11
-->
<sect1 id="proc">
<title>Unterst&uuml;tzte Prozessoren und Mainboards</title>
<para>&os;/i386 kann auf vielen <quote>IBM PC kompatiblen</quote>
Maschinen benutzt werden. Es ist nicht m&ouml;glich, hier alle
unterst&uuml;tzten Kombinationen aufzuf&uuml;hren, die von &os;
unterst&uuml;tzt werden, da es viel zu viele M&ouml;glichkeiten
gibt. Dennoch ist es m&ouml;glich, einige allgemeine Hinweise zu
geben.</para>
<para>Fast alle i386-kompatiblen Prozessoren werden
unterst&uuml;tzt. Alle Prozessoren von Intel ab dem 80386 werden
unterst&uuml;tzt, also 80386, 80486, Pentium, Pentium Pro, Pentium
II, Pentium III, Pentium 4, und die Modellvarianten dieser
Prozessoren, wie der Xeon und Celeron. Der 80386sx wird zwar
unterst&uuml;tzt, wir raten aber dringend von der Verwendung
dieser CPU ab). Alle i386-kompatiblen Prozessoren von AMD werden
unterst&uuml;tzt, dazu geh&ouml;ren Am486, Am5x86, K5, K6 (alle
Varianten), Athlon (einschlie&szlig;lich Athlon-MP, Athlon-XP,
Athlon-4 und Athlon Thunderbird) und Duron. Der integrierte
Prozessor AMD &Eacute;lan SC520 wird unterst&uuml;tzt. Der
Transmeta Crusoe wird erkannt und unterst&uuml;tzt, das gleiche
gilt f&uuml;r die i386-kompatiblen Prozessoren von Cyrix und
NexGen.</para>
<para>F&uuml;r diese Plattform gibt es ganz Reihe verschiedener
Mainboards. F&uuml;r Mainboards mit ISA, VLB, EISA, AGP, und PCI
Steckpl&auml;tzen ist die Unterst&uuml;tzung ausgezeichnet. Der
MCA (<quote>MicroChannel</quote>) Bus, der in den IBM PS/2
Computern zu finden ist, wird nur teilweise
unterst&uuml;tzt.</para>
<para>Symmetrische Multi-Prozessor (SMP) Systeme werden im
allgemeinen von &os; unterst&uuml;tzt. Allerdings kommt es in
einigen F&auml;llen zu Problemen, weil das BIOS oder das Mainboard
fehlerhaft sind. Ein Blick in der Archive der Mailingliste &a.smp;
kann hier weiterhelfen.</para>
<para>&os; nutzt HyperThreading (HTT) auf Intel CPUs, wenn die CPU
dies unterst&uuml;tzt. Wenn in der Konfigurationsdatei f&uuml;r
den angepa&szlig;ten Kernel die Zeile
<literal>options&nbsp;SMP</literal> angegeben ist, erkennt und
aktiviert der Kernel die zus&auml;tzlichen logischen Prozessoren.
Der Standard-Scheduler in &os; behandelt diese logischen
Prozessoren genau so wie zus&auml;tzliche physikalische
Prozessoren. Mit anderen Worten, der Scheduler
ber&uuml;cksichtigt bei seinen Entscheidungen nicht, da&szlig;
sich die logischen Prozessoren auf einer CPU bestimmte Ressourcen
teilen. Da dieses sehr einfache Vorgehen zu schlechter
Performance f&uuml;hren kann, werden die logischen CPUs beim
Systemstart standardm&auml;&szlig;ig deaktiviert. Sie k&ouml;nnen
mit der sysctl-Variable
<varname>machdep.hlt_logical_cpus</varname> aktiviert werden. Es
ist au&szlig;erdem m&ouml;glich, jede CPU anzuhalten, die sich im
Idle-Loop befindet, dazu dient die sysctl-Variable
<varname>machdep.hlt_cpus</varname>. Weitere Informationen finden
Sie in &man.smp.4;.</para>
<para>Unterst&uuml;tzt die CPU die Physical Address Extension (PAE),
kann &os; diese Erweiterung nutzen, wenn in der
Konfigurationsdatei f&uuml;r den angepa&szlig;ten Kernel die
Option <literal>PAE</literal> angegeben wird. In diesem Fall
wird der Speicher oberhalb von 4 GByte erkannt und steht f&uuml;r
die Nutzung durch das System zur Verf&uuml;gung. Allerdings sind
nicht alle Teile von &os; und alle Treiber kompatibel zu
<literal>PAE</literal>. Weitere Informationen finden Sie in
&man.pae.4;.</para>
<para>&os; l&auml;uft normalerweise auf Laptops mit i386-Prozessoren,
allerdings gibt es keinen einheitlichen Standard f&uuml;r die
Unterst&uuml;tzung bestimmter Ausstattungsmerkmale wie Audio,
Grafik, Power Management und PCCARD Steckpl&auml;tzen. Diese
Merkmale sind von Maschine zu Maschine verschiedenen. In vielen
F&auml;llen ist es sogar notwendig, &os; speziell anzupassen, um
Fehlern in der Hardware und anderen Merkw&uuml;rdigkeiten
auszuweichen. Im Zweifelsfalle kann ein Blick in der Archive der
Mailingliste &a.mobile; weiterhelfen.</para>
<para>Die meisten aktuellen Laptops (und auch f&uuml;r den
Schreibtisch vorgesehene Ger&auml;te) unterst&uuml;tzen den
Advanced Configuration and Power Management (ACPI) Standard. Wie
in &man.acpi.4; beschrieben, nutzt &os; die von Intel
ver&ouml;ffentlichte Referenz-Implementierung &quot;ACPI Component
Architecture&quot;, um ACPI unterst&uuml;tzen zu k&ouml;nnen.
Leider kann es durch die Benutzung von ACPI auf einigen Systemen
zu Stabilit&auml;tsproblemen kommen, die es notwendig machen, den
ACPI-Treiber abzuschalten. Dieser wird normalerweise beim
Systemstart als Kernel-Modul geladen. Um ihn abzuschalten,
m&uuml;ssen Sie die folgende Zeile in die Datei
<filename>/boot/device.hints</filename> eintragen:</para>
<programlisting>hint.acpi.0.disabled="1"</programlisting>
<para>Wenn Sie ein Problem im Zusammenhang mit ACPI l&ouml;sen
wollen, kann es helfen, Teile der ACPI-Funktionen abzuschalten.
Informationen, welche der Einstellungen im Bootloader daf&uuml;r
verantwortlich sind, finden Sie in der Onlinehilfe zu
&man.acpi.4;</para>
<para>ACPI braucht zur korrekten Funktion die Differentiated System
Descriptor Table (DSDT), die vom BIOS bereitgestellt wird. Einige
Systemen haben fehlerhafte oder unvollst&auml;ndige DSDTs, daher
kann ACPI auf diesen Maschinen nicht korrekt funktionieren.
Korrigierte DSDTs f&uuml;r einige Maschinen sind im Bereich <ulink
url="http://acpi.sourceforge.net/dsdt/index.php">DSDT</ulink> der
Webseiten des <ulink
url="http://acpi.sourceforge.net/">ACPI4Linux</ulink> Projekts
verf&uuml;gbar. &os; kann diese DSDTs an Stelle der vom BIOS
bereitgestellten DSDT nutzen, weitere Informationen dazu finden
Sie in der Onlinehilfe zu &man.acpi.4;</para>
</sect1>
@@ -1,23 +0,0 @@
# $FreeBSD$
# $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/ia64/Makefile,v 1.2 2002/03/10 18:41:37 ue Exp $
# $Id: Makefile,v 1.2 2002/03/10 15:37:16 ue Exp $
# basiert auf: 1.2
RELN_ROOT?= ${.CURDIR}/../../..
DOC?= article
FORMATS?= html
INSTALL_COMPRESSED?= gz
INSTALL_ONLY_COMPRESSED?=
JADEFLAGS+= -V %generate-article-toc%
# SGML content
SRCS+= article.sgml
# SRCS+= proc-ia64.sgml
SRCS+= ../common/hw.ent
SRCS+= ../common/artheader.sgml
SRCS+= ../common/dev.sgml
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
@@ -1,40 +0,0 @@
<!--
$FreeBSD$
$FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/ia64/article.sgml,v 1.6 2003/05/24 21:52:46 ue Exp $
basiert auf: 1.3
-->
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
%man;
<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN">
%authors;
<!ENTITY % mlists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DE">
%mlists;
<!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN">
%release;
<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections;
<!-- Architecture-specific customization -->
<!ENTITY arch "ia64">
<!ENTITY arch.print "IA-64">
]>
<article lang="de">
&artheader;
<abstract>
<para>Dieses Dokument befindet sich noch in einem sehr fr&uuml;hen
Stadium. Die Angaben sind unvollst&auml;ndig und m&uuml;ssen
dringend erweitert werden. Wenn Sie Informationen &uuml;ber
&os; &arch.print; Prozessoren, Mainboards und andere Ger&auml;te
haben, die mit &os; funktionieren, senden Sie sie bitte an die
&a.ia64; Mailingliste.</para>
</abstract>
&sect.intro;
&sect.proc.ia64;
&sect.dev;
</article>
@@ -1,108 +0,0 @@
<!--
$FreeBSD$
$FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/ia64/proc-ia64.sgml,v 1.5 2003/05/24 22:16:24 ue Exp $
basiert auf: 1.7
-->
<sect1 id="proc-ia64">
<title>Unterst&uuml;tzte Prozessoren und Mainboards</title>
<para>Zur Zeit werden die <ulink
url="http://www.intel.com/design/itanium/itanium/index.htm">Itanium</ulink>
und <ulink
url="http://www.intel.com/design/itanium2/index.htm">Itanium
2</ulink> Prozessoren unterst&uuml;tzt. Die folgenden
Mainboard-Chips&auml;tze werden unterst&uuml;tzt:</para>
<itemizedlist>
<listitem>
<para>HP zx1 (nur auf dem Entwicklungszweig, weitere
Informationen finden Sie im <ulink
url="http://perforce.freebsd.org/">Perforce
repository</ulink>) </para>
</listitem>
<listitem>
<para>HP i2000</para>
</listitem>
<listitem>
<para>Intel 460GX</para>
</listitem>
<listitem>
<para>Intel E8870</para>
</listitem>
</itemizedlist>
<para>Zur Zeit wird sowohl an Ein-Prozessor (UP) als auch an
Mehr-Prozessor Systemen gearbeitet. Letztere sind zur Zeit
weniger stabil. Zur Zeit konzentriert sich die Arbeit auf
Verbesserungen f&uuml;r UP-Systeme, um deren Stabilit&auml;t zu
erh&ouml;hen.</para>
<sect2>
<title>&Uuml;bersicht &uuml;ber die unterst&uuml;tzten
Systeme</title>
<para>Dieser Abschnitt enth&auml;lt zus&auml;tzliche Informationen
dar&uuml;ber, welche Ger&auml;te von &os;/&arch;
unterst&uuml;tzt werden und welche nicht.</para>
<para>Mit Ausnahme der in die PC-Chips&auml;tze integrierten
Varianten sollten alle &man.ata.4; Kontroller sofort
funktionieren. Wir gehen davon aus, da&szlig; fr&uuml;her oder
sp&auml;ter alle &arch;-kompatiblen Kontroller vollst&auml;ndig
unterst&uuml;tzt werden. In den folgenden Abschnitten finden
Sie genauere Informationen &uuml;ber die verschiedenen
Festplattencontroller und ihren aktuellen Status.</para>
<para>Ganz generell sollten serielle Schnittstellen nach
<quote>PC-Standard</quote> auf Intel-Hardware funktionieren,
w&auml;hrend sie auf PA-Hardware nicht funktionieren werden.
Der Grund ist, da&szlig; auf HP-Maschinen alle Ger&auml;te in
den Speicher eingeblendet werden. Mit Ausnahme der von PCI
verlangten VGA-Unterst&uuml;tzung gibt es
<emphasis>keinerlei</emphasis> Unterst&uuml;tzung f&uuml;r
ISA-Ger&auml;te.</para>
<para>Au&szlig;er den schon genannten seriellen Schnittstellen mit
&man.sio.4;-Treiber gibt es eine Reihe weiterer Ger&auml;ten,
von denen wir wissen, da&szlig; sie auf Nicht-Intel Systemen
nicht funktionieren k&ouml;nnen, weil sie sich auf
ISA-spezifische Begebenheiten verlassen, die nicht mehr
zutreffen. Diese Ger&auml;te sollten jedoch auf Intel-Hardware
funktionieren.</para>
<informaltable frame="none">
<tgroup cols="2">
<tbody>
<row>
<entry>&man.sio.4;</entry>
<entry>Keine Unterst&uuml;tzung f&uuml;r I/O durch in den
Hauptspeicher eingeblendete Bereiche</entry>
</row>
<row>
<entry>&man.syscons.4;</entry>
<entry>Erwartet ein BIOS, VGA-Erkennung, etc.</entry>
</row>
<row>
<entry>&man.pcm.4;</entry>
<entry>Pr&uuml;ft MSS ISA Ports <emphasis>bis zum
Erbrechen</emphasis></entry>
</row>
<row>
<entry>&man.atkbd.4;, &man.psm.4;</entry>
<entry>Fest verdrahte ISA-Adressen</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect2>
</sect1>
@@ -1,22 +0,0 @@
# $FreeBSD$
# $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/pc98/Makefile,v 1.1 2002/07/08 18:41:44 ue Exp $
# basiert auf: 1.1
RELN_ROOT?= ${.CURDIR}/../../..
DOC?= article
FORMATS?= html
INSTALL_COMPRESSED?= gz
INSTALL_ONLY_COMPRESSED?=
JADEFLAGS+= -V %generate-article-toc%
# SGML content
SRCS+= article.sgml
SRCS+= proc-pc98.sgml
SRCS+= ../common/hw.ent
SRCS+= ../common/artheader.sgml
SRCS+= ../common/dev.sgml
.include "${RELN_ROOT}/share/mk/doc.relnotes.mk"
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
@@ -1,30 +0,0 @@
<!--
$FreeBSD$
$FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/pc98/article.sgml,v 1.2 2002/10/12 18:02:22 ue Exp $
basiert auf: 1.1
-->
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
%man;
<!ENTITY % authors PUBLIC "-//FreeBSD//ENTITIES DocBook Author Entities//EN">
%authors;
<!ENTITY % mlists PUBLIC "-//FreeBSD//ENTITIES DocBook Mailing List Entities//DE">
%mlists;
<!ENTITY % release PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN">
%release;
<!ENTITY % sections SYSTEM "../common/hw.ent"> %sections;
<!-- Architecture-specific customization -->
<!ENTITY arch "pc98">
<!ENTITY arch.print "NEC PC-98x1">
]>
<article lang="de">
&artheader;
&sect.intro;
&sect.proc.pc98;
&sect.dev;
</article>
@@ -1,36 +0,0 @@
<!--
$FreeBSD$
$FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/pc98/proc-pc98.sgml,v 1.3 2003/01/13 20:30:49 ue Exp $
basiert auf: 1.4
-->
<sect1 id="support-sys">
<title>Unterst&uuml;tzte Systeme</title>
<para>NEC PC-9801/9821 Systeme mit fast allen i386-kompatiblen
Prozessoren, dazu geh&ouml;ren unter anderem 80386, 80486,
Pentium, Pentium Pro und Pentium II inklusive aller Varianten.
Die i386-kompatiblen Prozessoren von AMD, Cyrix, IBM und IDT
werden ebenfalls unterst&uuml;tzt.</para>
<para>NEC FC-9801/9821 und NEC SV-98 (beide sind mit der
PC-9801/9821 Familie kompatibel) sollten auch unterst&uuml;tzt
werden.</para>
<para>Die EPSON PC-386/486/586 Familien sind kompatibel zur NEC
PC-9801 Familie und sollten auch unterst&uuml;tzt werden.</para>
<para>Der hochaufl&ouml;sende Modus wird nicht unterst&uuml;tzt.
Die Familien NEC PC-98XA/XL/RL/XL^2 und NEC PC-H98 werden nur im
normalen (PC-9801 kompatiblen) Modus unterst&uuml;tzt.</para>
<para>Es gibt zwar einige Mehrprozessorsysteme (wie Rs20/B20), die
SMP-F&auml;higkeiten in &os; werden allerdings noch nicht
unterst&uuml;tzt.</para>
<para>Der Standard-Bus des PC-9801/9821 (der sogenannte C-Bus), der
Erweiterungsbus des PC9801NOTE (110 Pin) und der PCI-Bus werden
unterst&uuml;tzt. Der New Extended Standard Architecture (NESA)
Bus (wird in den Familien PC-H98, SV-H98 und FC-H98 genutzt) wird
noch nicht unterst&uuml;tzt.</para>
</sect1>
Loaded 100 of 463 files, more files were not shown because too many files have changed in this diff. Show more