mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-30 04:15:06 +01:00
Compare commits
114
Commits
stable/7
...
releng/7.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a43cb98ef | ||
|
|
9738e0c840 | ||
|
|
7814303c3f | ||
|
|
8244752809 | ||
|
|
24a6124130 | ||
|
|
e1ba7e0b95 | ||
|
|
0e393837bf | ||
|
|
07b034faa6 | ||
|
|
47b396aad3 | ||
|
|
6dd22f288d | ||
|
|
1a56c1b168 | ||
|
|
62ad930474 | ||
|
|
60a77caa53 | ||
|
|
e7f2236051 | ||
|
|
8f4f718530 | ||
|
|
ee2c012a40 | ||
|
|
6bf3a636fa | ||
|
|
44472f708e | ||
|
|
a1fc2b0c89 | ||
|
|
70fc74b056 | ||
|
|
cd743ad0dc | ||
|
|
b1bb6a3b3f | ||
|
|
9a42d00083 | ||
|
|
8e7023f868 | ||
|
|
621df53ec2 | ||
|
|
3ab7c7d68c | ||
|
|
00a9318f0c | ||
|
|
8d6fabce01 | ||
|
|
88b95e6d80 | ||
|
|
53933eb8d7 | ||
|
|
edf911093a | ||
|
|
48b6a05055 | ||
|
|
b62549d11b | ||
|
|
0d022b4cad | ||
|
|
03e4a93de8 | ||
|
|
19ba15332a | ||
|
|
1b9288497e | ||
|
|
709f4e5025 | ||
|
|
d517dc04ef | ||
|
|
76acf827a2 | ||
|
|
b99e4e1a7e | ||
|
|
940cae7a4f | ||
|
|
f2a9b8efa2 | ||
|
|
d4deb6c9e7 | ||
|
|
76e5cc839b | ||
|
|
fa6af338c0 | ||
|
|
974e3f1816 | ||
|
|
931346f9f0 | ||
|
|
2baf651277 | ||
|
|
01a0e4ea1a | ||
|
|
ffc51d63fc | ||
|
|
986efd3e2f | ||
|
|
16ad3d073b | ||
|
|
ed37bbed63 | ||
|
|
71d12cc165 | ||
|
|
f042a9d43c | ||
|
|
0edbfd9d3d | ||
|
|
2519621b02 | ||
|
|
b6bf404ec8 | ||
|
|
8c5308e1d8 | ||
|
|
e91dd3cb0d | ||
|
|
8b901d50f4 | ||
|
|
cf697531e8 | ||
|
|
991c8a703b | ||
|
|
c38091d27e | ||
|
|
ad1b912506 | ||
|
|
b09a01d59a | ||
|
|
60fd60cf34 | ||
|
|
3bc6837574 | ||
|
|
9ad1823560 | ||
|
|
812abfab33 | ||
|
|
2c7f4707d3 | ||
|
|
af6587ea98 | ||
|
|
10178d08fd | ||
|
|
bf2e12d8f9 | ||
|
|
e5ab3a091d | ||
|
|
e674b1ce25 | ||
|
|
ee58ae8c0b | ||
|
|
aa68910f50 | ||
|
|
bdbdcfbc03 | ||
|
|
3b7212732b | ||
|
|
e8ed639521 | ||
|
|
6100ac3258 | ||
|
|
14d3d61ef8 | ||
|
|
e27a602831 | ||
|
|
609150d31a | ||
|
|
b8216019f0 | ||
|
|
96a7939a6b | ||
|
|
d92a56e529 | ||
|
|
d90cba5508 | ||
|
|
4a49422398 | ||
|
|
04e40ee4b7 | ||
|
|
341f511fb1 | ||
|
|
b673393236 | ||
|
|
2f0c6718ce | ||
|
|
c6961c821f | ||
|
|
370b1ff3f1 | ||
|
|
36e142df74 | ||
|
|
183cb7a832 | ||
|
|
309d38202e | ||
|
|
b6cfef513c | ||
|
|
c56524219a | ||
|
|
d75d2ad5fc | ||
|
|
7aa0874e3a | ||
|
|
e00c02d2c0 | ||
|
|
a5dfc4f9ec | ||
|
|
0338c5fc06 | ||
|
|
ab2c4bae0a | ||
|
|
eff4b3de1f | ||
|
|
0d1cd1f8ac | ||
|
|
e8e8be86df | ||
|
|
95ec085f03 | ||
|
|
ae717c1770 | ||
|
|
caeeb20a22 |
No files matched your search
@@ -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
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
/*
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 *);
|
||||
|
||||
@@ -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*/
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"},
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
db
|
||||
entropy uname=operator gname=operator mode=0700
|
||||
..
|
||||
freebsd-update
|
||||
freebsd-update mode=0700
|
||||
..
|
||||
ipf mode=0700
|
||||
..
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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, ×) != 0) {
|
||||
archive_set_error(&a->archive, errno,
|
||||
"Can't update time for %s", a->name);
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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
|
||||
@@ -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");
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -44,4 +44,4 @@ SYSCALL(pipe)
|
||||
movl %edx,4(%ecx)
|
||||
movl $0,%eax
|
||||
ret
|
||||
END(pipe)
|
||||
END(__sys_pipe)
|
||||
@@ -40,4 +40,4 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
SYSCALL(reboot)
|
||||
iret
|
||||
END(reboot)
|
||||
END(__sys_reboot)
|
||||
@@ -52,4 +52,4 @@ SYSCALL(setlogin)
|
||||
movl $0,CNAME(_logname_valid)
|
||||
#endif
|
||||
ret /* setlogin(name) */
|
||||
END(setlogin)
|
||||
END(__sys_setlogin)
|
||||
@@ -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__
|
||||
|
||||
@@ -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
|
||||
@@ -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. */
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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 */
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -214,7 +214,7 @@ _thr_rtld_init(void)
|
||||
{
|
||||
struct RtldLockInfo li;
|
||||
struct pthread *curthread;
|
||||
long dummy;
|
||||
long dummy = -1;
|
||||
|
||||
curthread = _get_curthread();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
}
|
||||
@@ -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 */
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -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
@@ -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
@@ -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) {
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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ü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ält Informationen über den
|
||||
Status von &os; &release.current; für die Anwender, die
|
||||
bisher noch keine Erfahrung mit den &release.5x; Versionen
|
||||
oder &os; sammeln konnten. Er enthält einige
|
||||
Hintergrundinformationen über die vor und während
|
||||
einer Veröffentlichung ablaufende Prozesse, nennt die
|
||||
wichtigsten Neuerungen und die Stellen, an denen die ersten
|
||||
Anwender Probleme haben könnten. Weiterhin gibt es
|
||||
Informationen über die Pläne für weitere
|
||||
Veröffentlichungen im Entwicklungszweig 4-STABLE und
|
||||
ein paar Hinweise für die Aktualisierung bestehender
|
||||
Systeme.</para>
|
||||
</abstract>
|
||||
</articleinfo>
|
||||
|
||||
<sect1 id="intro">
|
||||
<title>Einführung</title>
|
||||
|
||||
<para>Nach über zwei Jahren steht mit &os; &release.5x;
|
||||
wieder eine komplett neue &os;-Version zur Verfügung. Sie
|
||||
bietet nicht nur diverse neue Möglichkeiten, auch und
|
||||
gerade <quote>unter der Haube</quote> hat sich einiges
|
||||
verbessert. Der Nachteil dieser Neuerungen ist, daß
|
||||
groß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ät, Leistung
|
||||
und teilweise auch Funktionalität führen.</para>
|
||||
|
||||
<para>Aus diesen Gründen warnen wir alle Anwender, ihre
|
||||
Systeme nicht von älteren &os;-Versionen auf 5.0 zu
|
||||
aktualisieren, wenn sie die "Problemzonen" nicht kennen
|
||||
oder nicht bereit sind, die Einschrä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ß diese Anwender
|
||||
erst zu &release.5x; wechseln sollten, nachdem der
|
||||
Entwicklungszweig 5-STABLE existiert; dies wird wahrscheinlich
|
||||
nach der Veröffentlichung von 5.2-RELEASE
|
||||
passieren.</para>
|
||||
|
||||
<para>Hier zeigt sich das <quote>Henne und Ei</quote> Problem bei
|
||||
der Veröffentlichung von &os; &release.5x;. Alle am &os;
|
||||
Project beteiligten Personen wollen ein &os;, das möglichst
|
||||
stabil und zuverlässig ist. Um dieses Ziel zu erreichen,
|
||||
müssen die neue Version und speziell die neuen Komponenten
|
||||
von möglichst vielen Anwendern getestet werden.
|
||||
Dummerweise gibt es bei realistischer Betrachtung nur eine
|
||||
Möglichkeit, eine größere Anzahl an Anwender
|
||||
für einen Test zu gewinnen: Die Verö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önnen. Zuerst wird beschrieben, wie eine neue FreeBSD
|
||||
Version veröffentlicht wird. Dann werden die
|
||||
interessanteren Neuerungen in FreeBSD &release.current; und die
|
||||
Bereiche, in denen (gerade für unvorsichtige Anwender)
|
||||
Probleme auftreten können, vorgestellt. Anwender, die erst
|
||||
einmal bei Systemen auf Basis von 4-STABLE bleiben möchten,
|
||||
erhalten einen kurzen Ausblick auf die kurz- und mittelfristigen
|
||||
Planungen für diesen Entwicklungszweig. Zuletzt wird
|
||||
besprochen, was bei einer Aktualisierung eines existierenden
|
||||
&release.4x; Systems auf 5.0 beachtet werden muß.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="release-overview">
|
||||
<title>Verö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ächst in diesen Zweig eingebracht. Das bedeutet zwar,
|
||||
daß neue Möglichkeiten zunächst einmal nur in
|
||||
CURRENT zur Verfügung stehen, es bedeutet allerdings auch,
|
||||
daß dieser Zweig von Zeit zu Zeit Kummer bereitet,
|
||||
während die Neuerungen getestet und ihre Fehler entfernt
|
||||
werden.</para>
|
||||
|
||||
<para>Wenn eine neue &os;-Version veröffentlicht wird,
|
||||
basiert diese in der Regel auf einem der <quote>STABLE</quote>
|
||||
(stabil) genannten Entwicklungszweige. Neuerungen werden nur in
|
||||
diese Entwicklungszweige ü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ü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ür &os; 5.0 und 5.1 ist der
|
||||
Entwicklungszweig CURRENT. Damit wird zum ersten Mal nach
|
||||
über zwei Jahren eine neue Version auf Basis dieses
|
||||
Entwicklungszweiges erscheinen (die letzte war &os; 4.0, im
|
||||
März 2000).</para>
|
||||
|
||||
<para>Einige Zeit nach der Verö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öffentlichung der
|
||||
jeweiligen <quote>Punkt Null</quote> Versionen (3.0 bzw. 4.0)
|
||||
erzeugt. Rückblickend müssen wir feststellen,
|
||||
daß dadurch in beiden Fällen nicht genug Zeit war, um
|
||||
CURRENT zu stabilisieren, bevor der neue Entwicklungszweig
|
||||
eingerichtet wurde. Dies führte zu unnötiger
|
||||
Mehrarbeit, da Fehlerkorrekturen von einem Zweig in den anderen
|
||||
Zweig übertragen werden mußten; außerdem kam
|
||||
es zu einigen Änderungen in der Architektur, die nicht in
|
||||
den jeweils anderen Zweig ü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ügung steht.
|
||||
Es ist sehr wahrscheinlich, daß vorher mehrere
|
||||
&release.5x; Versionen erscheinen werden; zur Zeit rechnen wir
|
||||
damit, daß 5-STABLE nach dem Erscheinen von 5.2-RELEASE
|
||||
erzeugt werden wird.</para>
|
||||
|
||||
<para>Weitere Informationen über den Ablauf bei der
|
||||
Verö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 ü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ät basieren zum
|
||||
größten Teil auf massiven Änderungen der
|
||||
Systemarchitektur, die nicht in den Entwicklungszweig 4-STABLE
|
||||
eingepflegt wurden. Viele in sich abgeschlossene
|
||||
Änderungen wie Treiber für neue Geräte oder neue
|
||||
Benutzerprogramme wurden dagegen schon nach 4-STABLE
|
||||
übernommen. Die folgende Liste enthält eine kurze
|
||||
Übersicht über die wichtigsten Neuerungen in &os;
|
||||
5.0:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>SMPng: Die <quote>nächste Generation</quote> der
|
||||
Unterstützung für Systeme mit mehreren Prozessoren
|
||||
(noch nicht abgeschlossen). Es ist jetzt möglich,
|
||||
daß 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ätzlich zu i386, pc98 und
|
||||
Alpha werden jetzt auch sparc64 und ia64 Systeme
|
||||
unterstützt.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>GCC: Der Compiler und die dazugehö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ützung für erweiterbare
|
||||
<quote>Mandatory Access Control</quote> Regelwerke.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>GEOM: Ein flexibles Gerüst zur Manipulation von
|
||||
Daten beim Transfer von und zu Festplatten. Auf dieser
|
||||
Basis wurde ein experimentelles Modul zur
|
||||
Verschlüsselung des Festplatteninhaltes
|
||||
entwickelt.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>FFS: Das Dateisystem unterstützt jetzt
|
||||
Hintergrund-&man.fsck.8; (um das System nach einem Absturz
|
||||
schneller verfügbar zu machen) sowie
|
||||
<quote>Schnappschüsse</quote>.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>UFS2: Dieses neue Dateisystem unterstützt
|
||||
größere Dateien und zusätzliche
|
||||
Dateiberechtigungen. &man.newfs.8; erzeugt jetzt
|
||||
standardmäßig UFS2 Dateisysteme und auf allen
|
||||
Plattformen außer PC98 gilt dies auch für
|
||||
Dateisysteme, die mit &man.sysinstall.8; erzeugt
|
||||
werden.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Cardbus: Cardbus wird jetzt unterstützt.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>Eine ausführlichere Übersicht über die
|
||||
Neuerungen finden Sie in den <quote>Release Notes</quote>
|
||||
für &os; &release.prev; und &release.current;.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="drawbacks">
|
||||
<title>Nachteile für frühe Anwender</title>
|
||||
|
||||
<para>Ein Nachteil der Neuerungen in &os; &release.5x; ist,
|
||||
daß 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ßt:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Die Arbeit an diversen Neuerungen ist noch nicht
|
||||
abgeschlossen, dazu gehören unter anderem SMPng und
|
||||
KSE. Diese Erweiterungen sind zwar für Test- und
|
||||
Experimentalzwecke ausreichend stabil, aber unter
|
||||
Umständen nicht stabil genug für den
|
||||
Produktionsbetrieb.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Durch die Änderungen in den Datenstrukturen des
|
||||
Kernels und der Schnittstellen für Anwendungen und
|
||||
Programmierer (ABI/API), müssen Treiber anderer
|
||||
Hersteller angepaßt werden, damit sie korrekt mit &os;
|
||||
5.0 zusammenarbeiten. Es ist nicht ausgeschlossen,
|
||||
daß es bis zum Erscheinen des Entwicklungszweiges
|
||||
5-STABLE weitere kleinere Änderungen am ABI/API geben
|
||||
wird.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Einige Teile des &os; Basissystems wurden in die Ports
|
||||
Collection verschoben. Dazu gehören insbesondere
|
||||
<application>Perl</application>,
|
||||
<application>UUCP</application> und die meisten (nicht alle)
|
||||
Spiele. Diese Programme werden zwar weiterhin entwickelt
|
||||
und unterstützt, es kann aber verwirren, daß sie
|
||||
nicht mehr Teil des Basissystems sind.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Einige Teile des &os;-Basissystems wurden nicht mehr
|
||||
gepflegt, weil es nicht genügend Anwender und/oder
|
||||
Entwickler gab. Diese Teile mußten entfernt werden,
|
||||
dazu zählen unter anderem die Erzeugung von Programmen
|
||||
im Format a.out;, die XNS-Netzwerkprotokolle und der Treiber
|
||||
für den X-10 Controller.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Viele Ports und Packages, die mit &os; 4-STABLE noch
|
||||
korrekt liefen, können mit &os; 5.0 nicht genutzt oder
|
||||
nicht kompiliert werden. Der Grund ist in der Regel der
|
||||
neue Compiler oder die Aufrä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ße
|
||||
Bereiche des Kernels.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Die Neuerungen in &os; 5.0 enthalten noch Routinen
|
||||
zur Unterstützung bei der Fehlersuche und Diagnose.
|
||||
Dadurch kann es dazu kommen, daß ein System mit
|
||||
&os; 5.0 langsamer ist als mit 4-STABLE.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Neuerungen werden erst in den Entwicklungszweig 4-STABLE
|
||||
ü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ö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ät des Systems haben, rät das Release
|
||||
Engineering Team konservativen Anwendern und Firmen, Versionen
|
||||
aus dem Entwicklungszweig 4-STABLE zu verwenden, bis die
|
||||
&release.5x; Versionen zuverlässiger
|
||||
geworden sind.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="plans-stable">
|
||||
<title>Die Zukunft des Entwicklungszweiges 4-STABLE</title>
|
||||
|
||||
<para>Die Verö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öffentlichung von &os;
|
||||
5.0. Es wird wahrscheinlich noch eine weitere Version auf der
|
||||
Basis dieses Entwicklungszweiges geben: Das für den Sommer
|
||||
2003 geplante 4.9-RELEASE. Auch eine Version 4.10 liegt im
|
||||
Bereich des Möglichen. Dies hängt von mehreren
|
||||
Faktoren ab, der wichtigste davon ist die Existenz und
|
||||
Stabilitä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öglich und notwendig sein.
|
||||
Bis zum Erscheinen der offiziell letzten Version auf Basis von
|
||||
4-STABLE bleibt es den Entwicklern ü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ünsche der Benutzer nach
|
||||
weiteren Versionen auf Basis von 4-STABLE beachten. Allerdings
|
||||
nur, so weit dies im Rahmen der beschränkten Ressourcen
|
||||
möglich ist.</para>
|
||||
|
||||
<para>Neue Versionen auf Basis des Entwicklungszweiges 4-STABLE
|
||||
werden vom &a.security-officer; im üblichen Rahmen
|
||||
unterstü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öffentlichung von Sicherheitshinweisen und Patches
|
||||
unterstützt; dem Team ist es allerdings freigestellt, diese
|
||||
Unterstützung auf weitere Versionen oder spezielle Probleme
|
||||
auszudehnen.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="upgrade">
|
||||
<title>Hinweise für die Aktualisierung von &os; &release.4x;</title>
|
||||
|
||||
<para>Dieses Kapitel enthält Hinweise fü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 über den
|
||||
Quellcode ist <filename>src/UPDATING</filename>
|
||||
Pflichtlektü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önnen maximalen Nutzen aus den diversen
|
||||
Neuerungen (speziell UFS2) ziehen.</para>
|
||||
|
||||
<para>Zum gegenwärtigen Zeitpunkt hat noch niemand
|
||||
ausfü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ß bei dieser Variante diverse
|
||||
Dateien nicht gelöscht werden, die zwar von &release.4x;
|
||||
genutzt wurden, aber in &release.5x; nicht mehr vorhanden
|
||||
sind. Diese Altlasten können zu Problemen
|
||||
führen.</para>
|
||||
|
||||
<para>Auf i386 und pc98 Systemen kann die Konfiguration von ISA
|
||||
Gerä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ät bereit, ist aber von der Bedienung her
|
||||
vö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 überall dort verfügbar sein, wo auch
|
||||
schon die bekannten <filename>kern.flp</filename> und
|
||||
<filename>mfsroot.flp</filename> verfü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ö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ü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ält eine Schritt-für-Schritt Anleitung, der Sie
|
||||
unbedingt folgen müssen, die Nutzung der üblichen
|
||||
<quote>Abkürzungen</quote> ist nicht
|
||||
möglich.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Allgemeine Hinweise</title>
|
||||
|
||||
<para><application>Perl</application> wurde aus dem Basissystem
|
||||
entfernt und sollte entweder als Package oder über die
|
||||
Ports Collection installiert werden. Die bisher übliche
|
||||
Praxis, Perl als Teil des Basissystems zu behandeln und mit ihm
|
||||
zusammen zu kompilieren, führte zu diversen Problemen,
|
||||
die eine Aktualisierung von Perl erschwerten. Die im
|
||||
Standardsystem vorhandenen Programme, die Perl
|
||||
benötigten, wurden entweder in einer anderen Sprache neu
|
||||
geschrieben (wenn sie noch benötigt wurden) oder
|
||||
ersatzlos entfernt (wenn sie überflüssig waren). Da
|
||||
&man.sysinstall.8; das Perl Package bei den meisten
|
||||
Distributionen automatisch mit installiert, sollte diese
|
||||
Änderung kaum Auswirkungen auf die Anwender
|
||||
haben.</para>
|
||||
|
||||
<para>Einige Scripte verlassen sich darauf, daß der
|
||||
Perl-Interpreter als <filename>/usr/bin/perl</filename>
|
||||
verfügbar ist. Der Perl Port enthält das Programm
|
||||
<filename>use.perl</filename>, mit dem ein passender Satz
|
||||
symbolischer Links fü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öglich, für &release.4x;
|
||||
geschriebene Programme unter &release.5x; zu nutzen,
|
||||
allerdings muß dazu die Distribution
|
||||
<filename>compat4x</filename> installiert sein. Damit
|
||||
<emphasis>könnte</emphasis> es auch mö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ö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ötigt wird. &os; &release.5x; benutzt ein
|
||||
spezielles Dateisystem für Gerä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äßig im Format UFS2 angelegt. Diese gilt
|
||||
auf allen Plattformen außer PC98 auch für
|
||||
Dateisysteme, die mit &man.sysinstall.8; erzeugt werden. Da
|
||||
&os; &release.4x; nur UFS1 lesen kann, mü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ügung, auch
|
||||
&man.sysinstall.8; enthält eine entsprechende Option.
|
||||
Bitte beachten Sie, daß 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ält zwar viele interessante
|
||||
Neuerungen, aber es ist noch nicht für alle Anwender
|
||||
geeignet. Aus diesem Grund haben wir in diesem Dokument
|
||||
Informationen über die Abläufe bei der
|
||||
Verö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ü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ält die Errata fü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öffentlichung bekannt wurden. Dazu gehören
|
||||
Ratschläge zur Sicherheit sowie Änderungen in der
|
||||
Software oder Dokumentation, welche die Stabilität und die
|
||||
Nutzung beeinträchtigen könnten. Sie sollten immer
|
||||
die aktuelle Version dieses Dokumentes lesen, bevor sie diese
|
||||
Version von &os; installieren.</para>
|
||||
|
||||
<para>Diese Errata fü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ße</quote>
|
||||
Informationen ü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 über Probleme informiert zu werden, die erst nach
|
||||
der Veröffentlichung entdeckt (und vielleicht auch schon
|
||||
behoben) wurden.</para>
|
||||
|
||||
<para>Die zusammen mit der Veröffentlichung erschienene
|
||||
Version dieses Dokumentes (zum Beispiel die Version auf der
|
||||
CDROM) ist per Definition veraltet. Allerdings sind im Internet
|
||||
aktualisierte Versionen verfügbar, die die <quote>aktuellen
|
||||
Errata</quote> für diese Version sind. Diese Versionen
|
||||
sind bei <ulink url="http://www.FreeBSD.org/releases/"></ulink>
|
||||
und allen aktuellen Mirrors dieser Webseite
|
||||
verfügbar.</para>
|
||||
|
||||
<para>Die Snapshots von &os; &release.branch; (sowohl die der
|
||||
Quelltexte als auch die der ausführbaren Programme)
|
||||
enthalten ebenfalls die zum Zeitpunkt ihrer
|
||||
Verö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 über das Netzwerk nutzbarer Fehler in
|
||||
<application>CVS</application> könnte dazu führen,
|
||||
daß ein Angreifer beliebige Programme auf dem CVS Server
|
||||
ausfü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äre es einem Angreifer
|
||||
mit sehr viel Rechenleistung möglich gewesen, unter
|
||||
bestimmten Umständen den Klartext der ü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ür Sicherheitsprobleme unterstü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öglich, daß ein Angreifer den
|
||||
geheimen Schlüssel ermittelt, der von der Erweiterung
|
||||
<quote>syncookies</quote> genutzt wird. Dadurch sinkt deren
|
||||
Effektivität beim Schutz vor TCP SYN Flood
|
||||
Denial-of-Service Angriffen. Hinweise, wie sie das Problem
|
||||
umgehen kö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-Überläufe in den von
|
||||
<application>sendmail</application> genutzten Routinen zum
|
||||
Parsen des Headers war es einen Angreifer möglich, eine
|
||||
speziell konstruierte Nachricht an &man.sendmail.8; zu senden
|
||||
und so beliebige Programme ausführen zu lassen. Diese
|
||||
Programme verfügten ü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-Überlauf im XDR Kodierer/Dekodierer
|
||||
war es einem Angreifer mö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ält zwei
|
||||
Schwachstellen, die erst vor kurzer Zeit bekannt gemacht wurden.
|
||||
Informationen, wie Sie die Probleme umgehen kö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
|
||||
überschreiben. Mit anderen Worten, es ist in der Regel
|
||||
nicht möglich, den Bootsektor einer Festplatte mit
|
||||
<command>disklabel -B</command> zu aktualisieren, da die
|
||||
Partition <literal>a</literal> auch den Bereich enthä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 ähnliche Medien mit einer
|
||||
Blockgröße von mehr als 512 Byte benutzt (zum
|
||||
Beispiel mit &man.geom.4; verschlüsselte Partitionen),
|
||||
behandelt &man.dump.8; die größeren Sektoren nicht
|
||||
korrekt und kann daher das Dateisystem nicht dumpen. Eine
|
||||
Möglichkeit, das Problem zu umgehen, ist die Erzeugung einer
|
||||
<quote>rohen</quote> Kopie des gesamten Dateisystems, die dann
|
||||
als Eingabedatei für &man.dump.8; dient. Es ist
|
||||
mö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ö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ß sich Systeme bei der
|
||||
Installation von &os; 5.0 Snapshots auf RAIDs an
|
||||
&man.mly.4;-kompatiblen Controller aufgehä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ützung des
|
||||
Dateisystems</bridgehead>
|
||||
|
||||
<para>NETNCP und nwfs sind offenbar noch nicht an KSE
|
||||
angepaß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ß
|
||||
aufzubauen, bevor er gestartet wird. In diesem Fall meldet
|
||||
&man.truss.1;, daß es die &man.procfs.5; Node für den
|
||||
zu debuggenden Prozeß nicht öffnen kann. Es scheint
|
||||
einen weiteren Fehler zu geben, durch den &man.truss.1; sich
|
||||
aufhängt, wenn &man.execve.2; den Wert
|
||||
<literal>ENOENT</literal> zurückgibt. Ein weiteres
|
||||
Timing-Problem führt dazu, daß &man.truss.1; beim
|
||||
Start manchmal <errorname>PIOCWAIT: Input/output
|
||||
error</errorname> meldet. Es existieren zwar Korrekturen
|
||||
für diese Probleme, da diese aber zu sehr in die Routinen
|
||||
zur Ausfü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 über Fehler bei der
|
||||
Partitionierung von Festplatten mit &man.sysinstall.8;. Eines
|
||||
der Probleme ist, daß &man.sysinstall.8; den freien Platz
|
||||
auf einer Festplatten nicht neu berechnen kann, nachdem der Typ
|
||||
einer FDISK-Partition geändert wurde.</para>
|
||||
|
||||
<bridgehead renderas="sect3">Veraltete Dokumentation</bridgehead>
|
||||
|
||||
<para>In einigen Fä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ösung fü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ü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ür den
|
||||
bereits eine Verbindung besteht, sollte es die Anzahl der zum
|
||||
Lesen verfügbaren Zeichen in dem Feld
|
||||
<varname>st_size</varname> der Struktur <varname>struct
|
||||
stat</varname> zurü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örende Filter
|
||||
<literal>EVFILT_READ</literal> meldet fälschlicherweise
|
||||
immer, daß an einem TCP Socket <literal>0</literal>
|
||||
Zeichen zum Lesen bereitstehen, auch wenn in Wirklichkeit
|
||||
Zeichen zum Lesen verfügbar sind. Die bei
|
||||
<literal>EVFILT_READ</literal> verfü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ützung fü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ß mehrfach geöffnet wird und durch den
|
||||
&man.sem.close.3; zum Absturz des Programms führen kann.
|
||||
Dieser Fehler wurde in &release.current; bereits behoben.</para>
|
||||
|
||||
<bridgehead renderas="sect3">Zugriffsrechte für
|
||||
<filename>/dev/tty</filename></bridgehead>
|
||||
|
||||
<para>&os; &release.prev; enthä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 ö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ü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ü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ßwörter</bridgehead>
|
||||
|
||||
<para>&man.adduser.8; kann das Paßwort eines neu angelegten
|
||||
Benutzers nicht setzen, wenn dieses Sonderzeichen der Shell
|
||||
enthält. Dieser Fehler wurde in &release.current; bereits
|
||||
behoben.</para>
|
||||
|
||||
<bridgehead renderas="sect3">&man.xl.4;</bridgehead>
|
||||
|
||||
<para>Der Treiber &man.xl.4; enthält einen Fehler, der zu
|
||||
einem Absturz des Systems mit der Meldung <errorname>kernel
|
||||
panic</errorname> und anderen Problemen fü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ügung. Diese Aktualisierung
|
||||
erfolgte bereits in &os; &release.prev;, wurde aber nicht in
|
||||
den Release Notes dokumentiert.</para>
|
||||
|
||||
<bridgehead renderas="sect3">Kompatibilitätsprobleme bei
|
||||
&man.amd.8;</bridgehead>
|
||||
|
||||
<para>Der nicht-blockierende Teil der RPC-Routinen in
|
||||
&release.prev; ist fehlerhaft. Einer der auffälligsten
|
||||
Effekte dieser Fehler ist, daß 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ür <application>nsswitch</application> in
|
||||
den Release Notes wurde ein falscher Name fü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;
|
||||
§.intro;
|
||||
§.proc.alpha;
|
||||
§.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ührung</title>
|
||||
|
||||
<para>Dieses Dokument enthält die Liste der unterstützen
|
||||
Geräte für &os; &release.current; auf &arch.print;
|
||||
Systemen (meistens einfach &os;/&arch; &release.current; genannt).
|
||||
Hier finden Sie zum einen alle die Geräte, von denen wir
|
||||
wissen, daß Sie funktionieren; zum anderen finden Sie hier
|
||||
Hinweise, wie Sie den Kernel anpassen können, wenn Sie ein
|
||||
bisher noch nicht unterstütztes Gerät verwenden
|
||||
wollen.</para>
|
||||
|
||||
<note>
|
||||
<para>Dieses Dokument enthält Informationen für
|
||||
&arch.print; Systeme. Andere Versionen dieses Dokumentes, die
|
||||
für andere Plattformen gedacht sind, werden in vielen
|
||||
Punkten von diesem Dokument abweichen.</para>
|
||||
</note>
|
||||
|
||||
<para arch="ia64">Weitergehende Informationen ü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;
|
||||
§.intro;
|
||||
§.proc.i386;
|
||||
§.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ützte Prozessoren und Mainboards</title>
|
||||
|
||||
<para>&os;/i386 kann auf vielen <quote>IBM PC kompatiblen</quote>
|
||||
Maschinen benutzt werden. Es ist nicht möglich, hier alle
|
||||
unterstützten Kombinationen aufzuführen, die von &os;
|
||||
unterstützt werden, da es viel zu viele Möglichkeiten
|
||||
gibt. Dennoch ist es möglich, einige allgemeine Hinweise zu
|
||||
geben.</para>
|
||||
|
||||
<para>Fast alle i386-kompatiblen Prozessoren werden
|
||||
unterstützt. Alle Prozessoren von Intel ab dem 80386 werden
|
||||
unterstü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ützt, wir raten aber dringend von der Verwendung
|
||||
dieser CPU ab). Alle i386-kompatiblen Prozessoren von AMD werden
|
||||
unterstützt, dazu gehören Am486, Am5x86, K5, K6 (alle
|
||||
Varianten), Athlon (einschließlich Athlon-MP, Athlon-XP,
|
||||
Athlon-4 und Athlon Thunderbird) und Duron. Der integrierte
|
||||
Prozessor AMD Élan SC520 wird unterstützt. Der
|
||||
Transmeta Crusoe wird erkannt und unterstützt, das gleiche
|
||||
gilt für die i386-kompatiblen Prozessoren von Cyrix und
|
||||
NexGen.</para>
|
||||
|
||||
<para>Für diese Plattform gibt es ganz Reihe verschiedener
|
||||
Mainboards. Für Mainboards mit ISA, VLB, EISA, AGP, und PCI
|
||||
Steckplätzen ist die Unterstützung ausgezeichnet. Der
|
||||
MCA (<quote>MicroChannel</quote>) Bus, der in den IBM PS/2
|
||||
Computern zu finden ist, wird nur teilweise
|
||||
unterstützt.</para>
|
||||
|
||||
<para>Symmetrische Multi-Prozessor (SMP) Systeme werden im
|
||||
allgemeinen von &os; unterstützt. Allerdings kommt es in
|
||||
einigen Fä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ützt. Wenn in der Konfigurationsdatei für
|
||||
den angepaßten Kernel die Zeile
|
||||
<literal>options SMP</literal> angegeben ist, erkennt und
|
||||
aktiviert der Kernel die zusätzlichen logischen Prozessoren.
|
||||
Der Standard-Scheduler in &os; behandelt diese logischen
|
||||
Prozessoren genau so wie zusätzliche physikalische
|
||||
Prozessoren. Mit anderen Worten, der Scheduler
|
||||
berücksichtigt bei seinen Entscheidungen nicht, daß
|
||||
sich die logischen Prozessoren auf einer CPU bestimmte Ressourcen
|
||||
teilen. Da dieses sehr einfache Vorgehen zu schlechter
|
||||
Performance führen kann, werden die logischen CPUs beim
|
||||
Systemstart standardmäßig deaktiviert. Sie können
|
||||
mit der sysctl-Variable
|
||||
<varname>machdep.hlt_logical_cpus</varname> aktiviert werden. Es
|
||||
ist außerdem mö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ützt die CPU die Physical Address Extension (PAE),
|
||||
kann &os; diese Erweiterung nutzen, wenn in der
|
||||
Konfigurationsdatei für den angepaßten Kernel die
|
||||
Option <literal>PAE</literal> angegeben wird. In diesem Fall
|
||||
wird der Speicher oberhalb von 4 GByte erkannt und steht für
|
||||
die Nutzung durch das System zur Verfü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äuft normalerweise auf Laptops mit i386-Prozessoren,
|
||||
allerdings gibt es keinen einheitlichen Standard für die
|
||||
Unterstützung bestimmter Ausstattungsmerkmale wie Audio,
|
||||
Grafik, Power Management und PCCARD Steckplätzen. Diese
|
||||
Merkmale sind von Maschine zu Maschine verschiedenen. In vielen
|
||||
Fällen ist es sogar notwendig, &os; speziell anzupassen, um
|
||||
Fehlern in der Hardware und anderen Merkwürdigkeiten
|
||||
auszuweichen. Im Zweifelsfalle kann ein Blick in der Archive der
|
||||
Mailingliste &a.mobile; weiterhelfen.</para>
|
||||
|
||||
<para>Die meisten aktuellen Laptops (und auch für den
|
||||
Schreibtisch vorgesehene Geräte) unterstützen den
|
||||
Advanced Configuration and Power Management (ACPI) Standard. Wie
|
||||
in &man.acpi.4; beschrieben, nutzt &os; die von Intel
|
||||
veröffentlichte Referenz-Implementierung "ACPI Component
|
||||
Architecture", um ACPI unterstützen zu können.
|
||||
Leider kann es durch die Benutzung von ACPI auf einigen Systemen
|
||||
zu Stabilitätsproblemen kommen, die es notwendig machen, den
|
||||
ACPI-Treiber abzuschalten. Dieser wird normalerweise beim
|
||||
Systemstart als Kernel-Modul geladen. Um ihn abzuschalten,
|
||||
mü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ösen
|
||||
wollen, kann es helfen, Teile der ACPI-Funktionen abzuschalten.
|
||||
Informationen, welche der Einstellungen im Bootloader dafü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ändige DSDTs, daher
|
||||
kann ACPI auf diesen Maschinen nicht korrekt funktionieren.
|
||||
Korrigierte DSDTs fü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ü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ühen
|
||||
Stadium. Die Angaben sind unvollständig und müssen
|
||||
dringend erweitert werden. Wenn Sie Informationen über
|
||||
&os; &arch.print; Prozessoren, Mainboards und andere Geräte
|
||||
haben, die mit &os; funktionieren, senden Sie sie bitte an die
|
||||
&a.ia64; Mailingliste.</para>
|
||||
</abstract>
|
||||
|
||||
§.intro;
|
||||
§.proc.ia64;
|
||||
§.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ü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ützt. Die folgenden
|
||||
Mainboard-Chipsätze werden unterstü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ür UP-Systeme, um deren Stabilität zu
|
||||
erhöhen.</para>
|
||||
|
||||
<sect2>
|
||||
<title>Übersicht über die unterstützten
|
||||
Systeme</title>
|
||||
|
||||
<para>Dieser Abschnitt enthält zusätzliche Informationen
|
||||
darüber, welche Geräte von &os;/&arch;
|
||||
unterstützt werden und welche nicht.</para>
|
||||
|
||||
<para>Mit Ausnahme der in die PC-Chipsätze integrierten
|
||||
Varianten sollten alle &man.ata.4; Kontroller sofort
|
||||
funktionieren. Wir gehen davon aus, daß früher oder
|
||||
später alle &arch;-kompatiblen Kontroller vollständig
|
||||
unterstützt werden. In den folgenden Abschnitten finden
|
||||
Sie genauere Informationen ü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ährend sie auf PA-Hardware nicht funktionieren werden.
|
||||
Der Grund ist, daß auf HP-Maschinen alle Geräte in
|
||||
den Speicher eingeblendet werden. Mit Ausnahme der von PCI
|
||||
verlangten VGA-Unterstützung gibt es
|
||||
<emphasis>keinerlei</emphasis> Unterstützung für
|
||||
ISA-Geräte.</para>
|
||||
|
||||
<para>Außer den schon genannten seriellen Schnittstellen mit
|
||||
&man.sio.4;-Treiber gibt es eine Reihe weiterer Geräten,
|
||||
von denen wir wissen, daß sie auf Nicht-Intel Systemen
|
||||
nicht funktionieren können, weil sie sich auf
|
||||
ISA-spezifische Begebenheiten verlassen, die nicht mehr
|
||||
zutreffen. Diese Geräte sollten jedoch auf Intel-Hardware
|
||||
funktionieren.</para>
|
||||
|
||||
<informaltable frame="none">
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>&man.sio.4;</entry>
|
||||
|
||||
<entry>Keine Unterstützung fü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ü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;
|
||||
§.intro;
|
||||
§.proc.pc98;
|
||||
§.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ützte Systeme</title>
|
||||
|
||||
<para>NEC PC-9801/9821 Systeme mit fast allen i386-kompatiblen
|
||||
Prozessoren, dazu gehö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ützt.</para>
|
||||
|
||||
<para>NEC FC-9801/9821 und NEC SV-98 (beide sind mit der
|
||||
PC-9801/9821 Familie kompatibel) sollten auch unterstützt
|
||||
werden.</para>
|
||||
|
||||
<para>Die EPSON PC-386/486/586 Familien sind kompatibel zur NEC
|
||||
PC-9801 Familie und sollten auch unterstützt werden.</para>
|
||||
|
||||
<para>Der hochauflösende Modus wird nicht unterstützt.
|
||||
Die Familien NEC PC-98XA/XL/RL/XL^2 und NEC PC-H98 werden nur im
|
||||
normalen (PC-9801 kompatiblen) Modus unterstützt.</para>
|
||||
|
||||
<para>Es gibt zwar einige Mehrprozessorsysteme (wie Rs20/B20), die
|
||||
SMP-Fähigkeiten in &os; werden allerdings noch nicht
|
||||
unterstü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ützt. Der New Extended Standard Architecture (NESA)
|
||||
Bus (wird in den Familien PC-H98, SV-H98 und FC-H98 genutzt) wird
|
||||
noch nicht unterstützt.</para>
|
||||
</sect1>
|
||||
Loaded 100 of 463 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user