mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-15 21:43:00 +02:00
remove more enused patches.
This commit is contained in:
@@ -79,7 +79,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/cyrus-imapd-2.2.12-autocreate-0.9.4.diff
|
||||
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/cyrus-imapd-2.2.12-gcc4.patch
|
||||
# cp -f /usr/include/et/com_err.h /usr/include/com_err.h
|
||||
cd $(DIR_APP) && ./configure --prefix=/usr --with-service-path=/usr/lib/cyrus \
|
||||
--with-cyrus-prefix=/usr/lib/cyrus --sysconfdir=/var/ipfire/cyrusimap \
|
||||
--with-auth=unix --with-perl --with-sasl --with-idle=idled \
|
||||
|
||||
1
lfs/udev
1
lfs/udev
@@ -76,7 +76,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
cd $(DIR_APP) && tar axf $(DIR_DL)/udev-lfs-$(VER)-1.tar.bz2
|
||||
|
||||
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/udev-208_remove_systemd_log.patch
|
||||
# cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/udev-141_no_netif_rename.patch
|
||||
|
||||
cd $(DIR_APP)/udev-lfs-$(VER)-1 && sed -i "s/HANDLE_AT 1/HANDLE_AT 0/g" cfg.h
|
||||
|
||||
|
||||
@@ -1,452 +0,0 @@
|
||||
diff -Naur Pound-2.6.orig/config.c Pound-2.6.reneg-ciphers-altnames-nosslv2/config.c
|
||||
--- Pound-2.6.orig/config.c 2011-12-28 14:57:45.000000000 +0100
|
||||
+++ Pound-2.6.reneg-ciphers-altnames-nosslv2/config.c 2012-02-15 21:49:39.000000000 +0100
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
#include "pound.h"
|
||||
|
||||
+#include <openssl/x509v3.h>
|
||||
+
|
||||
#ifdef MISS_FACILITYNAMES
|
||||
|
||||
/* This is lifted verbatim from the Linux sys/syslog.h */
|
||||
@@ -76,7 +78,7 @@
|
||||
static regex_t Err414, Err500, Err501, Err503, MaxRequest, HeadRemove, RewriteLocation, RewriteDestination;
|
||||
static regex_t Service, ServiceName, URL, HeadRequire, HeadDeny, BackEnd, Emergency, Priority, HAport, HAportAddr;
|
||||
static regex_t Redirect, RedirectN, TimeOut, Session, Type, TTL, ID, DynScale;
|
||||
-static regex_t ClientCert, AddHeader, Ciphers, CAlist, VerifyList, CRLlist, NoHTTPS11;
|
||||
+static regex_t ClientCert, AddHeader, DisableSSLv2, SSLAllowClientRenegotiation, SSLHonorCipherOrder, Ciphers, CAlist, VerifyList, CRLlist, NoHTTPS11;
|
||||
static regex_t Grace, Include, ConnTO, IgnoreCase, HTTPS, HTTPSCert, Disabled, Threads, CNName;
|
||||
|
||||
static regmatch_t matches[5];
|
||||
@@ -167,6 +169,53 @@
|
||||
}
|
||||
}
|
||||
|
||||
+unsigned char **
|
||||
+get_subjectaltnames(X509 *x509, unsigned int *count)
|
||||
+{
|
||||
+ *count = 0;
|
||||
+ unsigned int local_count = 0;
|
||||
+ unsigned char **result = NULL;
|
||||
+
|
||||
+ STACK_OF(GENERAL_NAME) *san_stack = (STACK_OF(GENERAL_NAME)*)X509_get_ext_d2i(x509, NID_subject_alt_name, NULL, NULL);
|
||||
+
|
||||
+ unsigned char *temp[sk_GENERAL_NAME_num(san_stack)];
|
||||
+
|
||||
+ GENERAL_NAME *name = NULL;
|
||||
+ while(sk_GENERAL_NAME_num(san_stack) > 0)
|
||||
+ {
|
||||
+ name = sk_GENERAL_NAME_pop(san_stack);
|
||||
+
|
||||
+ switch(name->type)
|
||||
+ {
|
||||
+ case GEN_DNS:
|
||||
+ temp[local_count] = strndup(ASN1_STRING_data(name->d.dNSName), ASN1_STRING_length(name->d.dNSName)+1);
|
||||
+ if(temp[local_count] == NULL) { conf_err("out of memory"); }
|
||||
+ local_count++;
|
||||
+ break;
|
||||
+ default:
|
||||
+ logmsg(LOG_INFO, "unsupported subjectAltName type encountered: %i", name->type);
|
||||
+ }
|
||||
+
|
||||
+ GENERAL_NAME_free(name);
|
||||
+ }
|
||||
+
|
||||
+ result = (unsigned char**)malloc(sizeof(unsigned char*)*local_count);
|
||||
+ if(result == NULL) { conf_err("out of memory"); }
|
||||
+ int i;
|
||||
+ for(i = 0;i < local_count; i++)
|
||||
+ {
|
||||
+ result[i] = strndup(temp[i], strlen(temp[i])+1);
|
||||
+ if(result[i] == NULL) { conf_err("out of memory"); }
|
||||
+
|
||||
+ free(temp[i]);
|
||||
+ }
|
||||
+ *count = local_count;
|
||||
+
|
||||
+ sk_GENERAL_NAME_pop_free(san_stack, GENERAL_NAME_free);
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* parse a back-end
|
||||
*/
|
||||
@@ -289,9 +338,12 @@
|
||||
} else if(!regexec(&HTTPS, lin, 4, matches, 0)) {
|
||||
if((res->ctx = SSL_CTX_new(SSLv23_client_method())) == NULL)
|
||||
conf_err("SSL_CTX_new failed - aborted");
|
||||
+ SSL_CTX_set_app_data(res->ctx, res);
|
||||
SSL_CTX_set_verify(res->ctx, SSL_VERIFY_NONE, NULL);
|
||||
SSL_CTX_set_mode(res->ctx, SSL_MODE_AUTO_RETRY);
|
||||
SSL_CTX_set_options(res->ctx, SSL_OP_ALL);
|
||||
+ SSL_CTX_clear_options(res->ctx, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION);
|
||||
+ SSL_CTX_clear_options(res->ctx, SSL_OP_LEGACY_SERVER_CONNECT);
|
||||
sprintf(lin, "%d-Pound-%ld", getpid(), random());
|
||||
SSL_CTX_set_session_id_context(res->ctx, (unsigned char *)lin, strlen(lin));
|
||||
SSL_CTX_set_tmp_rsa_callback(res->ctx, RSA_tmp_callback);
|
||||
@@ -299,6 +351,7 @@
|
||||
} else if(!regexec(&HTTPSCert, lin, 4, matches, 0)) {
|
||||
if((res->ctx = SSL_CTX_new(SSLv23_client_method())) == NULL)
|
||||
conf_err("SSL_CTX_new failed - aborted");
|
||||
+ SSL_CTX_set_app_data(res->ctx, res);
|
||||
lin[matches[1].rm_eo] = '\0';
|
||||
if(SSL_CTX_use_certificate_chain_file(res->ctx, lin + matches[1].rm_so) != 1)
|
||||
conf_err("SSL_CTX_use_certificate_chain_file failed - aborted");
|
||||
@@ -309,6 +362,8 @@
|
||||
SSL_CTX_set_verify(res->ctx, SSL_VERIFY_NONE, NULL);
|
||||
SSL_CTX_set_mode(res->ctx, SSL_MODE_AUTO_RETRY);
|
||||
SSL_CTX_set_options(res->ctx, SSL_OP_ALL);
|
||||
+ SSL_CTX_clear_options(res->ctx, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION);
|
||||
+ SSL_CTX_clear_options(res->ctx, SSL_OP_LEGACY_SERVER_CONNECT);
|
||||
sprintf(lin, "%d-Pound-%ld", getpid(), random());
|
||||
SSL_CTX_set_session_id_context(res->ctx, (unsigned char *)lin, strlen(lin));
|
||||
SSL_CTX_set_tmp_rsa_callback(res->ctx, RSA_tmp_callback);
|
||||
@@ -805,13 +860,23 @@
|
||||
/* logmsg(LOG_DEBUG, "Received SSL SNI Header for servername %s", servername); */
|
||||
|
||||
SSL_set_SSL_CTX(ssl, NULL);
|
||||
- for(pc = ctx; pc; pc = pc->next)
|
||||
+ for(pc = ctx; pc; pc = pc->next) {
|
||||
if(fnmatch(pc->server_name, server_name, 0) == 0) {
|
||||
/* logmsg(LOG_DEBUG, "Found cert for %s", servername); */
|
||||
SSL_set_SSL_CTX(ssl, pc->ctx);
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
-
|
||||
+ else if(pc->subjectAltNameCount > 0 && pc->subjectAltNames != NULL) {
|
||||
+ int i;
|
||||
+ for(i = 0; i < pc->subjectAltNameCount; i++) {
|
||||
+ if(fnmatch(pc->subjectAltNames[i], server_name, 0) == 0) {
|
||||
+ SSL_set_SSL_CTX(ssl, pc->ctx);
|
||||
+ return SSL_TLSEXT_ERR_OK;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* logmsg(LOG_DEBUG, "No match for %s, default used", server_name); */
|
||||
SSL_set_SSL_CTX(ssl, ctx->ctx);
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
@@ -829,11 +894,15 @@
|
||||
SERVICE *svc;
|
||||
MATCHER *m;
|
||||
int has_addr, has_port, has_other;
|
||||
+ long ssl_op_enable, ssl_op_disable;
|
||||
struct hostent *host;
|
||||
struct sockaddr_in in;
|
||||
struct sockaddr_in6 in6;
|
||||
POUND_CTX *pc;
|
||||
|
||||
+ ssl_op_enable = SSL_OP_ALL;
|
||||
+ ssl_op_disable = SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION | SSL_OP_LEGACY_SERVER_CONNECT;
|
||||
+
|
||||
if((res = (LISTENER *)malloc(sizeof(LISTENER))) == NULL)
|
||||
conf_err("ListenHTTPS config: out of memory - aborted");
|
||||
memset(res, 0, sizeof(LISTENER));
|
||||
@@ -844,6 +913,8 @@
|
||||
res->err500 = "An internal server error occurred. Please try again later.";
|
||||
res->err501 = "This method may not be used.";
|
||||
res->err503 = "The service is not available. Please try again later.";
|
||||
+ res->allow_client_reneg = 0;
|
||||
+ res->disable_ssl_v2 = 0;
|
||||
res->log_level = log_level;
|
||||
if(regcomp(&res->verb, xhttp[0], REG_ICASE | REG_NEWLINE | REG_EXTENDED))
|
||||
conf_err("xHTTP bad default pattern - aborted");
|
||||
@@ -959,6 +1030,9 @@
|
||||
fclose(fcert);
|
||||
memset(server_name, '\0', MAXBUF);
|
||||
X509_NAME_oneline(X509_get_subject_name(x509), server_name, MAXBUF - 1);
|
||||
+ pc->subjectAltNameCount = 0;
|
||||
+ pc->subjectAltNames = NULL;
|
||||
+ pc->subjectAltNames = get_subjectaltnames(x509, &(pc->subjectAltNameCount));
|
||||
X509_free(x509);
|
||||
if(!regexec(&CNName, server_name, 4, matches, 0)) {
|
||||
server_name[matches[1].rm_eo] = '\0';
|
||||
@@ -1029,6 +1103,25 @@
|
||||
strcat(res->add_head, "\r\n");
|
||||
strcat(res->add_head, lin + matches[1].rm_so);
|
||||
}
|
||||
+ } else if(!regexec(&DisableSSLv2, lin, 4, matches, 0)) {
|
||||
+ res->disable_ssl_v2 = 1;
|
||||
+ } else if(!regexec(&SSLAllowClientRenegotiation, lin, 4, matches, 0)) {
|
||||
+ res->allow_client_reneg = atoi(lin + matches[1].rm_so);
|
||||
+ if (res->allow_client_reneg == 2) {
|
||||
+ ssl_op_enable |= SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION;
|
||||
+ ssl_op_disable &= ~SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION;
|
||||
+ } else {
|
||||
+ ssl_op_disable |= SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION;
|
||||
+ ssl_op_enable &= ~SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION;
|
||||
+ }
|
||||
+ } else if(!regexec(&SSLHonorCipherOrder, lin, 4, matches, 0)) {
|
||||
+ if (atoi(lin + matches[1].rm_so)) {
|
||||
+ ssl_op_enable |= SSL_OP_CIPHER_SERVER_PREFERENCE;
|
||||
+ ssl_op_disable &= ~SSL_OP_CIPHER_SERVER_PREFERENCE;
|
||||
+ } else {
|
||||
+ ssl_op_disable |= SSL_OP_CIPHER_SERVER_PREFERENCE;
|
||||
+ ssl_op_enable &= ~SSL_OP_CIPHER_SERVER_PREFERENCE;
|
||||
+ }
|
||||
} else if(!regexec(&Ciphers, lin, 4, matches, 0)) {
|
||||
has_other = 1;
|
||||
if(res->ctx == NULL)
|
||||
@@ -1105,12 +1198,19 @@
|
||||
conf_err("ListenHTTPS: can't set SNI callback");
|
||||
#endif
|
||||
for(pc = res->ctx; pc; pc = pc->next) {
|
||||
+ SSL_CTX_set_app_data(pc->ctx, res);
|
||||
SSL_CTX_set_mode(pc->ctx, SSL_MODE_AUTO_RETRY);
|
||||
- SSL_CTX_set_options(pc->ctx, SSL_OP_ALL);
|
||||
+ SSL_CTX_set_options(pc->ctx, ssl_op_enable);
|
||||
+ SSL_CTX_clear_options(pc->ctx, ssl_op_disable);
|
||||
+ if (res->disable_ssl_v2 == 1)
|
||||
+ {
|
||||
+ SSL_CTX_set_options(pc->ctx, SSL_OP_NO_SSLv2);
|
||||
+ }
|
||||
sprintf(lin, "%d-Pound-%ld", getpid(), random());
|
||||
SSL_CTX_set_session_id_context(pc->ctx, (unsigned char *)lin, strlen(lin));
|
||||
SSL_CTX_set_tmp_rsa_callback(pc->ctx, RSA_tmp_callback);
|
||||
SSL_CTX_set_tmp_dh_callback(pc->ctx, DH_tmp_callback);
|
||||
+ SSL_CTX_set_info_callback(pc->ctx, SSLINFO_callback);
|
||||
}
|
||||
return res;
|
||||
} else {
|
||||
@@ -1305,6 +1405,9 @@
|
||||
|| regcomp(&DynScale, "^[ \t]*DynScale[ \t]+([01])[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|
||||
|| regcomp(&ClientCert, "^[ \t]*ClientCert[ \t]+([0-3])[ \t]+([1-9])[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|
||||
|| regcomp(&AddHeader, "^[ \t]*AddHeader[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|
||||
+ || regcomp(&SSLAllowClientRenegotiation, "^[ \t]*SSLAllowClientRenegotiation[ \t]+([012])[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|
||||
+ || regcomp(&DisableSSLv2, "^[ \t]*DisableSSLv2[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|
||||
+ || regcomp(&SSLHonorCipherOrder, "^[ \t]*SSLHonorCipherOrder[ \t]+([01])[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|
||||
|| regcomp(&Ciphers, "^[ \t]*Ciphers[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|
||||
|| regcomp(&CAlist, "^[ \t]*CAlist[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|
||||
|| regcomp(&VerifyList, "^[ \t]*VerifyList[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|
||||
@@ -1463,6 +1566,9 @@
|
||||
regfree(&DynScale);
|
||||
regfree(&ClientCert);
|
||||
regfree(&AddHeader);
|
||||
+ regfree(&SSLAllowClientRenegotiation);
|
||||
+ regfree(&DisableSSLv2);
|
||||
+ regfree(&SSLHonorCipherOrder);
|
||||
regfree(&Ciphers);
|
||||
regfree(&CAlist);
|
||||
regfree(&VerifyList);
|
||||
diff -Naur Pound-2.6.orig/http.c Pound-2.6.reneg-ciphers-altnames-nosslv2/http.c
|
||||
--- Pound-2.6.orig/http.c 2011-12-28 14:57:45.000000000 +0100
|
||||
+++ Pound-2.6.reneg-ciphers-altnames-nosslv2/http.c 2012-02-15 21:44:46.000000000 +0100
|
||||
@@ -246,6 +246,11 @@
|
||||
|
||||
static int err_to = -1;
|
||||
|
||||
+typedef struct {
|
||||
+ int timeout;
|
||||
+ RENEG_STATE *reneg_state;
|
||||
+} BIO_ARG;
|
||||
+
|
||||
/*
|
||||
* Time-out for client read/gets
|
||||
* the SSL manual says not to do it, but it works well enough anyway...
|
||||
@@ -253,18 +258,32 @@
|
||||
static long
|
||||
bio_callback(BIO *const bio, const int cmd, const char *argp, int argi, long argl, long ret)
|
||||
{
|
||||
+ BIO_ARG *bio_arg;
|
||||
struct pollfd p;
|
||||
int to, p_res, p_err;
|
||||
|
||||
if(cmd != BIO_CB_READ && cmd != BIO_CB_WRITE)
|
||||
return ret;
|
||||
|
||||
+ //logmsg(LOG_NOTICE, "bio callback");
|
||||
/* a time-out already occured */
|
||||
- if((to = *((int *)BIO_get_callback_arg(bio)) * 1000) < 0) {
|
||||
+ if((bio_arg = (BIO_ARG*)BIO_get_callback_arg(bio))==NULL) return ret;
|
||||
+ if((to = bio_arg->timeout * 1000) < 0) {
|
||||
errno = ETIMEDOUT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ /* Renegotiations */
|
||||
+ //logmsg(LOG_NOTICE, "RENEG STATE %d", bio_arg->reneg_state==NULL?-1:*bio_arg->reneg_state);
|
||||
+ if (bio_arg->reneg_state != NULL && *bio_arg->reneg_state == RENEG_ABORT) {
|
||||
+ logmsg(LOG_NOTICE, "REJECTING renegotiated session");
|
||||
+ errno = ECONNABORTED;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ //logmsg(LOG_NOTICE, "TO %d", to);
|
||||
+ if (to == 0) return ret;
|
||||
+
|
||||
for(;;) {
|
||||
memset(&p, 0, sizeof(p));
|
||||
BIO_get_fd(bio, &p.fd);
|
||||
@@ -299,7 +318,7 @@
|
||||
return -1;
|
||||
case 0:
|
||||
/* timeout - mark the BIO as unusable for the future */
|
||||
- BIO_set_callback_arg(bio, (char *)&err_to);
|
||||
+ bio_arg->timeout = err_to;
|
||||
#ifdef EBUG
|
||||
logmsg(LOG_WARNING, "(%lx) CALLBACK timeout poll after %d secs: %s",
|
||||
pthread_self(), to / 1000, strerror(p_err));
|
||||
@@ -503,7 +522,14 @@
|
||||
regmatch_t matches[4];
|
||||
struct linger l;
|
||||
double start_req, end_req;
|
||||
+ RENEG_STATE reneg_state;
|
||||
+ BIO_ARG ba1, ba2;
|
||||
|
||||
+ reneg_state = RENEG_INIT;
|
||||
+ ba1.reneg_state = &reneg_state;
|
||||
+ ba2.reneg_state = &reneg_state;
|
||||
+ ba1.timeout = 0;
|
||||
+ ba2.timeout = 0;
|
||||
from_host = ((thr_arg *)arg)->from_host;
|
||||
memcpy(&from_host_addr, from_host.ai_addr, from_host.ai_addrlen);
|
||||
from_host.ai_addr = (struct sockaddr *)&from_host_addr;
|
||||
@@ -512,6 +538,8 @@
|
||||
free(((thr_arg *)arg)->from_host.ai_addr);
|
||||
free(arg);
|
||||
|
||||
+ if(lstn->allow_client_reneg) reneg_state = RENEG_ALLOW;
|
||||
+
|
||||
n = 1;
|
||||
setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&n, sizeof(n));
|
||||
l.l_onoff = 1;
|
||||
@@ -535,10 +563,11 @@
|
||||
close(sock);
|
||||
return;
|
||||
}
|
||||
- if(lstn->to > 0) {
|
||||
- BIO_set_callback_arg(cl, (char *)&lstn->to);
|
||||
+ //if(lstn->to > 0) {
|
||||
+ ba1.timeout = lstn->to;
|
||||
+ BIO_set_callback_arg(cl, (char *)&ba1);
|
||||
BIO_set_callback(cl, bio_callback);
|
||||
- }
|
||||
+ //}
|
||||
|
||||
if(lstn->ctx != NULL) {
|
||||
if((ssl = SSL_new(lstn->ctx->ctx)) == NULL) {
|
||||
@@ -547,6 +576,7 @@
|
||||
BIO_free_all(cl);
|
||||
return;
|
||||
}
|
||||
+ SSL_set_app_data(ssl, &reneg_state);
|
||||
SSL_set_bio(ssl, cl, cl);
|
||||
if((bb = BIO_new(BIO_f_ssl())) == NULL) {
|
||||
logmsg(LOG_WARNING, "(%lx) BIO_new(Bio_f_ssl()) failed", pthread_self());
|
||||
@@ -848,7 +878,8 @@
|
||||
}
|
||||
BIO_set_close(be, BIO_CLOSE);
|
||||
if(backend->to > 0) {
|
||||
- BIO_set_callback_arg(be, (char *)&backend->to);
|
||||
+ ba2.timeout = backend->to;
|
||||
+ BIO_set_callback_arg(be, (char *)&ba2);
|
||||
BIO_set_callback(be, bio_callback);
|
||||
}
|
||||
if(backend->ctx != NULL) {
|
||||
diff -Naur Pound-2.6.orig/pound.8 Pound-2.6.reneg-ciphers-altnames-nosslv2/pound.8
|
||||
--- Pound-2.6.orig/pound.8 2011-12-28 14:57:45.000000000 +0100
|
||||
+++ Pound-2.6.reneg-ciphers-altnames-nosslv2/pound.8 2012-02-15 21:44:46.000000000 +0100
|
||||
@@ -501,6 +501,19 @@
|
||||
and
|
||||
.I SSL_CTX_set_cipher_list(3).
|
||||
.TP
|
||||
+\fBSSLHonorCipherOrder\fR 0|1
|
||||
+If this value is 1, the server will broadcast a preference to use \fBCiphers\fR in the
|
||||
+order supplied in the \fBCiphers\fR directive. If the value is 0, the server will treat
|
||||
+the Ciphers list as the list of Ciphers it will accept, but no preference will be
|
||||
+indicated. Default value is 0.
|
||||
+.TP
|
||||
+\fBSSLAllowClientRenegotiation\fR 0|1|2
|
||||
+If this value is 0, client initiated renegotiation will be disabled. This will mitigate
|
||||
+DoS exploits based on client renegotiation, regardless of the patch status of clients and
|
||||
+servers related to "Secure renegotiation". If the value is 1, secure renegotiation is
|
||||
+supported. If the value is 2, insecure renegotiation is supported, with unpatched
|
||||
+clients. /fBThis can lead to a DoS and a Man in the Middle attack!/fR Default value is 0.
|
||||
+.TP
|
||||
\fBCAlist\fR "CAcert_file"
|
||||
Set the list of "trusted" CA's for this server. The CAcert_file is a file containing
|
||||
a sequence of CA certificates (PEM format). The names of the defined CA certificates
|
||||
diff -Naur Pound-2.6.orig/pound.h Pound-2.6.reneg-ciphers-altnames-nosslv2/pound.h
|
||||
--- Pound-2.6.orig/pound.h 2011-12-28 14:57:45.000000000 +0100
|
||||
+++ Pound-2.6.reneg-ciphers-altnames-nosslv2/pound.h 2012-02-15 21:49:39.000000000 +0100
|
||||
@@ -380,6 +380,8 @@
|
||||
SSL_CTX *ctx;
|
||||
char *server_name;
|
||||
struct _pound_ctx *next;
|
||||
+ unsigned int subjectAltNameCount;
|
||||
+ unsigned char **subjectAltNames;
|
||||
} POUND_CTX;
|
||||
|
||||
/* Listener definition */
|
||||
@@ -404,6 +406,8 @@
|
||||
int rewr_dest; /* rewrite destination header */
|
||||
int disabled; /* true if the listener is disabled */
|
||||
int log_level; /* log level for this listener */
|
||||
+ int allow_client_reneg; /* Allow Client SSL Renegotiation */
|
||||
+ int disable_ssl_v2; /* Disable SSL version 2 */
|
||||
SERVICE *services;
|
||||
struct _listener *next;
|
||||
} LISTENER;
|
||||
@@ -419,6 +423,9 @@
|
||||
struct _thr_arg *next;
|
||||
} thr_arg; /* argument to processing threads: socket, origin */
|
||||
|
||||
+/* Track SSL handshare/renegotiation so we can reject client-renegotiations. */
|
||||
+typedef enum { RENEG_INIT=0, RENEG_REJECT, RENEG_ALLOW, RENEG_ABORT } RENEG_STATE;
|
||||
+
|
||||
/* Header types */
|
||||
#define HEADER_ILLEGAL -1
|
||||
#define HEADER_OTHER 0
|
||||
@@ -591,6 +598,11 @@
|
||||
extern DH *DH_tmp_callback(SSL *, int, int);
|
||||
|
||||
/*
|
||||
+ * Renegotiation callback
|
||||
+ */
|
||||
+extern void SSLINFO_callback(const SSL *s, int where, int rc);
|
||||
+
|
||||
+/*
|
||||
* expiration stuff
|
||||
*/
|
||||
#ifndef EXPIRE_TO
|
||||
diff -Naur Pound-2.6.orig/svc.c Pound-2.6.reneg-ciphers-altnames-nosslv2/svc.c
|
||||
--- Pound-2.6.orig/svc.c 2011-12-28 14:57:45.000000000 +0100
|
||||
+++ Pound-2.6.reneg-ciphers-altnames-nosslv2/svc.c 2012-02-15 21:44:46.000000000 +0100
|
||||
@@ -1797,3 +1797,34 @@
|
||||
close(ctl);
|
||||
}
|
||||
}
|
||||
+
|
||||
+void
|
||||
+SSLINFO_callback(const SSL *ssl, int where, int rc)
|
||||
+{
|
||||
+ RENEG_STATE *reneg_state;
|
||||
+
|
||||
+ /* Get our thr_arg where we're tracking this connection info */
|
||||
+ if ((reneg_state = (RENEG_STATE *)SSL_get_app_data(ssl)) == NULL) return;
|
||||
+
|
||||
+ /* If we're rejecting renegotiations, move to ABORT if Client Hello is being read. */
|
||||
+ if ((where & SSL_CB_ACCEPT_LOOP) && *reneg_state == RENEG_REJECT) {
|
||||
+ int state = SSL_get_state(ssl);
|
||||
+
|
||||
+ if (state == SSL3_ST_SR_CLNT_HELLO_A || state == SSL23_ST_SR_CLNT_HELLO_A) {
|
||||
+ *reneg_state = RENEG_ABORT;
|
||||
+ logmsg(LOG_WARNING,"rejecting client initiated renegotiation");
|
||||
+ }
|
||||
+ }
|
||||
+ else if (where & SSL_CB_HANDSHAKE_DONE && *reneg_state == RENEG_INIT) {
|
||||
+ // Reject any followup renegotiations
|
||||
+ *reneg_state = RENEG_REJECT;
|
||||
+ }
|
||||
+
|
||||
+ //if (where & SSL_CB_HANDSHAKE_START) logmsg(LOG_DEBUG, "handshake start");
|
||||
+ //else if (where & SSL_CB_HANDSHAKE_DONE) logmsg(LOG_DEBUG, "handshake done");
|
||||
+ //else if (where & SSL_CB_LOOP) logmsg(LOG_DEBUG, "loop");
|
||||
+ //else if (where & SSL_CB_READ) logmsg(LOG_DEBUG, "read");
|
||||
+ //else if (where & SSL_CB_WRITE) logmsg(LOG_DEBUG, "write");
|
||||
+ //else if (where & SSL_CB_ALERT) logmsg(LOG_DEBUG, "alert");
|
||||
+}
|
||||
+
|
||||
@@ -1,38 +0,0 @@
|
||||
--- compat-drivers-3.8-1-u/include/linux/compat-3.8.h.orig 2013-05-16 20:35:27.046386772 +0200
|
||||
+++ compat-drivers-3.8-1-u/include/linux/compat-3.8.h 2013-05-16 20:35:39.219767618 +0200
|
||||
@@ -24,35 +24,6 @@
|
||||
|
||||
/* This backports:
|
||||
*
|
||||
- * commit 4b20db3de8dab005b07c74161cb041db8c5ff3a7
|
||||
- * Author: Thomas Hellstrom <thellstrom@vmware.com>
|
||||
- * Date: Tue Nov 6 11:31:49 2012 +0000
|
||||
- *
|
||||
- * kref: Implement kref_get_unless_zero v3
|
||||
- */
|
||||
-/**
|
||||
- * kref_get_unless_zero - Increment refcount for object unless it is zero.
|
||||
- * @kref: object.
|
||||
- *
|
||||
- * Return non-zero if the increment succeeded. Otherwise return 0.
|
||||
- *
|
||||
- * This function is intended to simplify locking around refcounting for
|
||||
- * objects that can be looked up from a lookup structure, and which are
|
||||
- * removed from that lookup structure in the object destructor.
|
||||
- * Operations on such objects require at least a read lock around
|
||||
- * lookup + kref_get, and a write lock around kref_put + remove from lookup
|
||||
- * structure. Furthermore, RCU implementations become extremely tricky.
|
||||
- * With a lookup followed by a kref_get_unless_zero *with return value check*
|
||||
- * locking in the kref_put path can be deferred to the actual removal from
|
||||
- * the lookup structure and RCU lookups become trivial.
|
||||
- */
|
||||
-static inline int __must_check kref_get_unless_zero(struct kref *kref)
|
||||
-{
|
||||
- return atomic_add_unless(&kref->refcount, 1, 0);
|
||||
-}
|
||||
-
|
||||
-/* This backports:
|
||||
- *
|
||||
* commit 83e68189745ad931c2afd45d8ee3303929233e7f
|
||||
* Author: Matt Fleming <matt.fleming@intel.com>
|
||||
* Date: Wed Nov 14 09:42:35 2012 +0000
|
||||
@@ -1,28 +0,0 @@
|
||||
diff -Naur compat-wireless-2.6.34.org/include/linux/usb/usbnet.h compat-wireless-2.6.34/include/linux/usb/usbnet.h
|
||||
--- compat-wireless-2.6.34.org/include/linux/usb/usbnet.h 2010-05-18 03:12:10.000000000 +0200
|
||||
+++ compat-wireless-2.6.34/include/linux/usb/usbnet.h 2010-05-22 22:18:34.000000000 +0200
|
||||
@@ -214,4 +214,24 @@
|
||||
extern void usbnet_get_drvinfo (struct net_device *, struct ethtool_drvinfo *);
|
||||
extern int usbnet_nway_reset(struct net_device *net);
|
||||
|
||||
+/* messaging support includes the interface name, so it must not be
|
||||
+ * used before it has one ... notably, in minidriver bind() calls.
|
||||
+ */
|
||||
+#ifdef DEBUG
|
||||
+#define devdbg(usbnet, fmt, arg...) \
|
||||
+ printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
|
||||
+#else
|
||||
+#define devdbg(usbnet, fmt, arg...) \
|
||||
+ ({ if (0) printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , \
|
||||
+ ## arg); 0; })
|
||||
+#endif
|
||||
+
|
||||
+#define deverr(usbnet, fmt, arg...) \
|
||||
+ printk(KERN_ERR "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
|
||||
+#define devwarn(usbnet, fmt, arg...) \
|
||||
+ printk(KERN_WARNING "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
|
||||
+
|
||||
+#define devinfo(usbnet, fmt, arg...) \
|
||||
+ printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \
|
||||
+
|
||||
#endif /* __LINUX_USB_USBNET_H */
|
||||
@@ -1,14 +0,0 @@
|
||||
diff -Naur compat-wireless-2.6.39-1-sn.org/compat/kfifo.c compat-wireless-2.6.39-1-sn/compat/kfifo.c
|
||||
--- compat-wireless-2.6.39-1-sn.org/compat/kfifo.c 2011-05-24 01:43:48.000000000 +0200
|
||||
+++ compat-wireless-2.6.39-1-sn/compat/kfifo.c 2011-05-24 17:20:06.956818313 +0200
|
||||
@@ -27,6 +27,10 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/kfifo.h>
|
||||
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_AUTHOR("Stefani Seibold <stefani@seibold.net>");
|
||||
+MODULE_DESCRIPTION("A generic kernel FIFO implementation");
|
||||
+
|
||||
/*
|
||||
* internal helper to calculate the unused elements in a fifo
|
||||
*/
|
||||
@@ -1,16 +0,0 @@
|
||||
diff -Naur compat-wireless-3.5-1-snpc.org/config.mk compat-wireless-3.5/config.mk
|
||||
--- compat-wireless-3.5-1-snpc.org/config.mk 2012-07-31 17:22:29.000000000 -0400
|
||||
+++ compat-wireless-3.5/config.mk 2012-08-13 13:09:55.913234600 -0400
|
||||
@@ -246,10 +246,12 @@
|
||||
# mac80211 test driver
|
||||
export CONFIG_MAC80211_HWSIM=m
|
||||
|
||||
+ifdef CONFIG_PCI
|
||||
export CONFIG_ATH5K=m
|
||||
# export CONFIG_ATH5K_DEBUG=y
|
||||
# export CONFIG_ATH5K_TRACER=y
|
||||
# export CONFIG_ATH5K_AHB=y
|
||||
+endif #CONFIG_PCI
|
||||
|
||||
export CONFIG_ATH9K=m
|
||||
export CONFIG_ATH9K_HW=m
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,68 +0,0 @@
|
||||
From patchwork Mon Jul 30 06:52:21 2012
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: codel: refine one condition to avoid a nul rec_inv_sqrt
|
||||
Date: Sun, 29 Jul 2012 20:52:21 -0000
|
||||
From: Eric Dumazet <eric.dumazet@gmail.com>
|
||||
X-Patchwork-Id: 173968
|
||||
Message-Id: <1343631141.2626.13293.camel@edumazet-glaptop>
|
||||
To: David Miller <davem@davemloft.net>
|
||||
Cc: netdev <netdev@vger.kernel.org>, Anton Mich <lp2s1h@gmail.com>
|
||||
|
||||
From: Eric Dumazet <edumazet@google.com>
|
||||
|
||||
One condition before codel_Newton_step() was not good if
|
||||
we never left the dropping state for a flow. As a result
|
||||
rec_inv_sqrt was 0, instead of the ~0 initial value.
|
||||
|
||||
codel control law was then set to a very aggressive mode, dropping
|
||||
many packets before reaching 'target' and recovering from this problem.
|
||||
|
||||
To keep codel_vars_init() as efficient as possible, refine
|
||||
the condition to make sure rec_inv_sqrt initial value is correct
|
||||
|
||||
Many thanks to Anton Mich for discovering the issue and suggesting
|
||||
a fix.
|
||||
|
||||
Reported-by: Anton Mich <lp2s1h@gmail.com>
|
||||
Signed-off-by: Eric Dumazet <edumazet@google.com>
|
||||
|
||||
---
|
||||
include/net/codel.h | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
|
||||
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe netdev" in
|
||||
the body of a message to majordomo@vger.kernel.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
||||
|
||||
diff --git a/include/net/codel.h b/include/net/codel.h
|
||||
index 550debf..389cf62 100644
|
||||
--- a/include/net/codel.h
|
||||
+++ b/include/net/codel.h
|
||||
@@ -305,6 +305,8 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch,
|
||||
}
|
||||
}
|
||||
} else if (drop) {
|
||||
+ u32 delta;
|
||||
+
|
||||
if (params->ecn && INET_ECN_set_ce(skb)) {
|
||||
stats->ecn_mark++;
|
||||
} else {
|
||||
@@ -320,9 +322,11 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch,
|
||||
* assume that the drop rate that controlled the queue on the
|
||||
* last cycle is a good starting point to control it now.
|
||||
*/
|
||||
- if (codel_time_before(now - vars->drop_next,
|
||||
+ delta = vars->count - vars->lastcount;
|
||||
+ if (delta > 1 &&
|
||||
+ codel_time_before(now - vars->drop_next,
|
||||
16 * params->interval)) {
|
||||
- vars->count = (vars->count - vars->lastcount) | 1;
|
||||
+ vars->count = delta;
|
||||
/* we dont care if rec_inv_sqrt approximation
|
||||
* is not very precise :
|
||||
* Next Newton steps will correct it quadratically.
|
||||
@@ -1,11 +0,0 @@
|
||||
diff -Naur dhcp-3.1-ESV-R3.org/configure dhcp-3.1-ESV-R3/configure
|
||||
--- dhcp-3.1-ESV-R3.org/configure 2005-03-17 21:14:55.000000000 +0100
|
||||
+++ dhcp-3.1-ESV-R3/configure 2012-06-17 12:19:29.000000000 +0200
|
||||
@@ -104,6 +104,7 @@
|
||||
2) sysname=linux-2.2 ;;
|
||||
*) sysname=linux-2.2 ;;
|
||||
esac;;
|
||||
+ 3) sysname=linux-2.2 ;;
|
||||
esac;;
|
||||
SunOS)
|
||||
release=`uname -r`
|
||||
@@ -1,305 +0,0 @@
|
||||
commit 1ba025a9a21eda65d8c36cc0dbb51d214a3ebb1a
|
||||
Author: Daniel Jacobowitz <dan@codesourcery.com>
|
||||
Date: Mon Jun 2 01:57:03 2008 +0000
|
||||
|
||||
2008-06-01 Paul Brook <paul@codesourcery.com>
|
||||
Zack Weinberg <zack@codesourcery.com>
|
||||
Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* sysdeps/arm/nptl/pthread_spin_lock.S,
|
||||
sysdeps/arm/nptl/pthread_spin_trylock.S: Delete.
|
||||
* sysdeps/arm/nptl/pthread_spin_lock.c,
|
||||
sysdeps/arm/nptl/pthread_spin_trylock.c: New files using
|
||||
atomic_compare_and_exchange_val_acq to take spinlocks.
|
||||
* sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (lll_trylock,
|
||||
lll_cond_trylock): Use atomic_compare_and_exchange_val_acq.
|
||||
(__lll_trylock, __lll_cond_trylock): Delete.
|
||||
* sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
|
||||
(atomic_exchange_acq): Delete.
|
||||
(atomic_full_barrier): Define.
|
||||
(__arch_compare_and_exchange_val_32_acq): Use named operands.
|
||||
* sysdeps/unix/sysv/linux/arm/eabi/configure.in: Update
|
||||
arch_minimum_kernel to 2.6.16.
|
||||
* sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated.
|
||||
|
||||
diff --git a/sysdeps/arm/nptl/pthread_spin_lock.S b/sysdeps/arm/nptl/pthread_spin_lock.S
|
||||
deleted file mode 100644
|
||||
index bd6adf7..0000000
|
||||
--- a/sysdeps/arm/nptl/pthread_spin_lock.S
|
||||
+++ /dev/null
|
||||
@@ -1,31 +0,0 @@
|
||||
-/* Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
- This file is part of the GNU C Library.
|
||||
-
|
||||
- The GNU C Library is free software; you can redistribute it and/or
|
||||
- modify it under the terms of the GNU Lesser General Public
|
||||
- License as published by the Free Software Foundation; either
|
||||
- version 2.1 of the License, or (at your option) any later version.
|
||||
-
|
||||
- The GNU C Library is distributed in the hope that it will be useful,
|
||||
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- Lesser General Public License for more details.
|
||||
-
|
||||
- You should have received a copy of the GNU Lesser General Public
|
||||
- License along with the GNU C Library; if not, write to the Free
|
||||
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
- 02111-1307 USA. */
|
||||
-
|
||||
-#include <sysdep.h>
|
||||
-
|
||||
- .text
|
||||
- .align 4
|
||||
-
|
||||
-ENTRY (pthread_spin_lock)
|
||||
- mov r1, #1
|
||||
-1: swp r2, r1, [r0]
|
||||
- teq r2, #0
|
||||
- bne 1b
|
||||
- mov r0, #0
|
||||
- PSEUDO_RET_NOERRNO
|
||||
-END (pthread_spin_lock)
|
||||
diff --git a/sysdeps/arm/nptl/pthread_spin_lock.c b/sysdeps/arm/nptl/pthread_spin_lock.c
|
||||
new file mode 100644
|
||||
index 0000000..1217b89
|
||||
--- /dev/null
|
||||
+++ b/sysdeps/arm/nptl/pthread_spin_lock.c
|
||||
@@ -0,0 +1,30 @@
|
||||
+/* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, write to the Free
|
||||
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
+ 02111-1307 USA. */
|
||||
+
|
||||
+#include <atomic.h>
|
||||
+#include "pthreadP.h"
|
||||
+
|
||||
+int
|
||||
+pthread_spin_lock (pthread_spinlock_t *lock)
|
||||
+{
|
||||
+ while (atomic_compare_and_exchange_val_acq (lock, 1, 0) != 0)
|
||||
+ while (*lock != 0)
|
||||
+ ;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/sysdeps/arm/nptl/pthread_spin_trylock.S b/sysdeps/arm/nptl/pthread_spin_trylock.S
|
||||
deleted file mode 100644
|
||||
index 8593150..0000000
|
||||
--- a/sysdeps/arm/nptl/pthread_spin_trylock.S
|
||||
+++ /dev/null
|
||||
@@ -1,34 +0,0 @@
|
||||
-/* Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
- This file is part of the GNU C Library.
|
||||
-
|
||||
- The GNU C Library is free software; you can redistribute it and/or
|
||||
- modify it under the terms of the GNU Lesser General Public
|
||||
- License as published by the Free Software Foundation; either
|
||||
- version 2.1 of the License, or (at your option) any later version.
|
||||
-
|
||||
- The GNU C Library is distributed in the hope that it will be useful,
|
||||
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- Lesser General Public License for more details.
|
||||
-
|
||||
- You should have received a copy of the GNU Lesser General Public
|
||||
- License along with the GNU C Library; if not, write to the Free
|
||||
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
- 02111-1307 USA. */
|
||||
-
|
||||
-#define _ERRNO_H 1
|
||||
-#include <bits/errno.h>
|
||||
-
|
||||
-#include <sysdep.h>
|
||||
-
|
||||
- .text
|
||||
- .align 4
|
||||
-
|
||||
-ENTRY (pthread_spin_trylock)
|
||||
- mov r1, #1
|
||||
- swp r2, r1, [r0]
|
||||
- teq r2, #0
|
||||
- moveq r0, #0
|
||||
- movne r0, #EBUSY
|
||||
- PSEUDO_RET_NOERRNO
|
||||
-END (pthread_spin_trylock)
|
||||
diff --git a/sysdeps/arm/nptl/pthread_spin_trylock.c b/sysdeps/arm/nptl/pthread_spin_trylock.c
|
||||
new file mode 100644
|
||||
index 0000000..fb998d2
|
||||
--- /dev/null
|
||||
+++ b/sysdeps/arm/nptl/pthread_spin_trylock.c
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, write to the Free
|
||||
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
+ 02111-1307 USA. */
|
||||
+
|
||||
+#include <errno.h>
|
||||
+#include <atomic.h>
|
||||
+#include "pthreadP.h"
|
||||
+
|
||||
+int
|
||||
+pthread_spin_trylock (pthread_spinlock_t *lock)
|
||||
+{
|
||||
+ return atomic_compare_and_exchange_val_acq (lock, 1, 0) ? EBUSY : 0;
|
||||
+}
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure b/sysdeps/unix/sysv/linux/arm/eabi/configure
|
||||
index ab83048..28fb9ef 100644
|
||||
--- a/sysdeps/unix/sysv/linux/arm/eabi/configure
|
||||
+++ b/sysdeps/unix/sysv/linux/arm/eabi/configure
|
||||
@@ -1,5 +1,5 @@
|
||||
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
|
||||
# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
|
||||
|
||||
-arch_minimum_kernel=2.6.14
|
||||
+arch_minimum_kernel=2.6.16
|
||||
libc_cv_gcc_unwind_find_fde=no
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/configure.in
|
||||
index 83aa8fc..d1fb7f4 100644
|
||||
--- a/sysdeps/unix/sysv/linux/arm/eabi/configure.in
|
||||
+++ b/sysdeps/unix/sysv/linux/arm/eabi/configure.in
|
||||
@@ -1,5 +1,5 @@
|
||||
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
||||
# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
|
||||
|
||||
-arch_minimum_kernel=2.6.14
|
||||
+arch_minimum_kernel=2.6.16
|
||||
libc_cv_gcc_unwind_find_fde=no
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
|
||||
index 71ed714..247ddd3 100644
|
||||
--- a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
|
||||
+++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
|
||||
@@ -37,22 +37,12 @@ typedef uintmax_t uatomic_max_t;
|
||||
|
||||
void __arm_link_error (void);
|
||||
|
||||
-#define atomic_exchange_acq(mem, newvalue) \
|
||||
- ({ __typeof (*mem) result; \
|
||||
- if (sizeof (*mem) == 1) \
|
||||
- __asm__ __volatile__ ("swpb %0, %1, [%2]" \
|
||||
- : "=&r,&r" (result) \
|
||||
- : "r,0" (newvalue), "r,r" (mem) : "memory"); \
|
||||
- else if (sizeof (*mem) == 4) \
|
||||
- __asm__ __volatile__ ("swp %0, %1, [%2]" \
|
||||
- : "=&r,&r" (result) \
|
||||
- : "r,0" (newvalue), "r,r" (mem) : "memory"); \
|
||||
- else \
|
||||
- { \
|
||||
- result = 0; \
|
||||
- abort (); \
|
||||
- } \
|
||||
- result; })
|
||||
+#define atomic_full_barrier() \
|
||||
+ __asm__ __volatile__ \
|
||||
+ ("mov\tip, #0xffff0fff\n\t" \
|
||||
+ "mov\tlr, pc\n\t" \
|
||||
+ "add\tpc, ip, #(0xffff0fa0 - 0xffff0fff)" \
|
||||
+ : : : "ip", "lr", "cc", "memory");
|
||||
|
||||
/* Atomic compare and exchange. This sequence relies on the kernel to
|
||||
provide a compare and exchange operation which is atomic on the
|
||||
@@ -76,18 +66,19 @@ void __arm_link_error (void);
|
||||
register __typeof (oldval) a_tmp asm ("r3"); \
|
||||
register __typeof (oldval) a_oldval2 asm ("r4") = (oldval); \
|
||||
__asm__ __volatile__ \
|
||||
- ("0:\tldr\t%1,[%3]\n\t" \
|
||||
- "cmp\t%1, %4\n\t" \
|
||||
+ ("0:\tldr\t%[tmp],[%[ptr]]\n\t" \
|
||||
+ "cmp\t%[tmp], %[old2]\n\t" \
|
||||
"bne\t1f\n\t" \
|
||||
- "mov\t%0, %4\n\t" \
|
||||
- "mov\t%1, #0xffff0fff\n\t" \
|
||||
+ "mov\t%[old], %[old2]\n\t" \
|
||||
+ "mov\t%[tmp], #0xffff0fff\n\t" \
|
||||
"mov\tlr, pc\n\t" \
|
||||
- "add\tpc, %1, #(0xffff0fc0 - 0xffff0fff)\n\t" \
|
||||
+ "add\tpc, %[tmp], #(0xffff0fc0 - 0xffff0fff)\n\t" \
|
||||
"bcc\t0b\n\t" \
|
||||
- "mov\t%1, %4\n\t" \
|
||||
+ "mov\t%[tmp], %[old2]\n\t" \
|
||||
"1:" \
|
||||
- : "=&r" (a_oldval), "=&r" (a_tmp) \
|
||||
- : "r" (a_newval), "r" (a_ptr), "r" (a_oldval2) \
|
||||
+ : [old] "=&r" (a_oldval), [tmp] "=&r" (a_tmp) \
|
||||
+ : [new] "r" (a_newval), [ptr] "r" (a_ptr), \
|
||||
+ [old2] "r" (a_oldval2) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
a_tmp; })
|
||||
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
|
||||
index f48e867..889f97c 100644
|
||||
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
|
||||
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
|
||||
@@ -126,43 +126,11 @@
|
||||
})
|
||||
|
||||
|
||||
-static inline int __attribute__((always_inline))
|
||||
-__lll_mutex_trylock (int *futex)
|
||||
-{
|
||||
- int flag = 1, old;
|
||||
- asm volatile (
|
||||
- "\tswp %[old], %[flag], [%[futex]] @ try to take the lock\n"
|
||||
- "\tcmp %[old], #1 @ check old lock value\n"
|
||||
- "\tmovlo %[flag], #0 @ if we got it, return 0\n"
|
||||
- "\tswphi %[flag], %[old], [%[futex]] @ if it was contested,\n"
|
||||
- " @ restore the contested flag,\n"
|
||||
- " @ and check whether that won."
|
||||
- : [futex] "+&r" (futex), [flag] "+&r" (flag), [old] "=&r" (old)
|
||||
- : : "memory" );
|
||||
-
|
||||
- return flag;
|
||||
-}
|
||||
-#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock))
|
||||
-
|
||||
-
|
||||
-static inline int __attribute__((always_inline))
|
||||
-__lll_mutex_cond_trylock (int *futex)
|
||||
-{
|
||||
- int flag = 2, old;
|
||||
- asm volatile (
|
||||
- "\tswp %[old], %[flag], [%[futex]] @ try to take the lock\n"
|
||||
- "\tcmp %[old], #1 @ check old lock value\n"
|
||||
- "\tmovlo %[flag], #0 @ if we got it, return 0\n"
|
||||
- "\tswphi %[flag], %[old], [%[futex]] @ if it was contested,\n"
|
||||
- " @ restore the contested flag,\n"
|
||||
- " @ and check whether that won."
|
||||
- : [futex] "+&r" (futex), [flag] "+&r" (flag), [old] "=&r" (old)
|
||||
- : : "memory" );
|
||||
-
|
||||
- return flag;
|
||||
-}
|
||||
-#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
|
||||
+#define lll_mutex_trylock(lock) \
|
||||
+ atomic_compare_and_exchange_val_acq(&(lock), 1, 0)
|
||||
|
||||
+#define lll_mutex_cond_trylock(lock) \
|
||||
+ atomic_compare_and_exchange_val_acq(&(lock), 2, 0)
|
||||
|
||||
#define __lll_robust_trylock(futex, id) \
|
||||
(atomic_compare_and_exchange_val_acq (futex, id, 0) != 0)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,59 +0,0 @@
|
||||
diff -rupN --exclude=.svn --exclude='*.log' --exclude=Makefile --exclude='*.m4' --exclude='*.in' --exclude=autom4te.cache --exclude='config*' --exclude='*.Po' --exclude='*.sh' lcd4linux/drv_dpf.c lcd4linux.1/drv_dpf.c
|
||||
--- lcd4linux/drv_dpf.c 2011-11-14 14:41:40.859787820 +0100
|
||||
+++ lcd4linux.1/drv_dpf.c 2011-11-13 14:42:58.650315817 +0100
|
||||
@@ -160,12 +160,26 @@ static int drv_dpf_start2(const char *se
|
||||
}
|
||||
|
||||
/* Fixme: provider other fonts someday... */
|
||||
- if (XRES != 6 && YRES != 8) {
|
||||
+ /* Overridden - we have scaled the textout drawing */
|
||||
+/* if (XRES != 6 && YRES != 8) {
|
||||
error("%s: bad Font '%s' from %s (only 6x8 at the moment)",
|
||||
Name, s, cfg_source());
|
||||
return -1;
|
||||
+ } */
|
||||
+
|
||||
+ /* we dont want fonts below 6 width */
|
||||
+ if (XRES <6) {
|
||||
+ error("%s: bad Font '%s' width '%d' using minimum of 6)",
|
||||
+ Name,s,XRES);
|
||||
+ XRES = 6;
|
||||
}
|
||||
|
||||
+ /* we dont want fonts below 8 height */
|
||||
+ if (YRES <8) {
|
||||
+ error("%s: bad Font '%s' height '%d' using minimum of 8)",
|
||||
+ Name,s,YRES);
|
||||
+ YRES = 8;
|
||||
+ }
|
||||
|
||||
/* open communication with the display */
|
||||
if (drv_dpf_open(section) < 0) {
|
||||
diff -rupN --exclude=.svn --exclude='*.log' --exclude=Makefile --exclude='*.m4' --exclude='*.in' --exclude=autom4te.cache --exclude='config*' --exclude='*.Po' --exclude='*.sh' lcd4linux/drv_generic_graphic.c lcd4linux.1/drv_generic_graphic.c
|
||||
--- lcd4linux/drv_generic_graphic.c 2011-11-14 14:41:40.614375417 +0100
|
||||
+++ lcd4linux.1/drv_generic_graphic.c 2011-11-14 14:58:29.303285793 +0100
|
||||
@@ -259,15 +259,18 @@ static void drv_generic_graphic_render(c
|
||||
}
|
||||
|
||||
for (y = 0; y < YRES; y++) {
|
||||
- int mask = 1 << XRES;
|
||||
+
|
||||
for (x = 0; x < XRES; x++) {
|
||||
- mask >>= 1;
|
||||
- if (chr[y] & mask)
|
||||
- drv_generic_graphic_FB[layer][(r + y) * LCOLS + c + x] = fg;
|
||||
- else
|
||||
- drv_generic_graphic_FB[layer][(r + y) * LCOLS + c + x] = bg;
|
||||
+ int mask = 1 << 6;
|
||||
+ mask >>= ((x*6)/(XRES))+1;
|
||||
+ if (chr[(y*8)/(YRES)] & mask)
|
||||
+ drv_generic_graphic_FB[layer][(r + y ) * LCOLS + c + x] = fg;
|
||||
+ else
|
||||
+ drv_generic_graphic_FB[layer][(r + y ) * LCOLS + c + x] = bg;
|
||||
+
|
||||
}
|
||||
}
|
||||
+
|
||||
c += XRES;
|
||||
txt++;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
diff -ruN libcap-1.10.old/libcap/Makefile libcap-1.10/libcap/Makefile
|
||||
--- libcap-1.10.old/libcap/Makefile 1999-04-18 00:16:31.000000000 +0200
|
||||
+++ libcap-1.10/libcap/Makefile 2004-01-14 10:47:20.000000000 +0100
|
||||
@@ -56,12 +56,12 @@
|
||||
# @sed -ne '/^#define[ \t]CAP[_A-Z]\+[ \t]\+[0-9]\+/{s/^#define CAP_\([^ \t]*\)[ \t]*\([^ \t]*\)/ \{ \2, \"\1\" \},/;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;p;}' < /usr/include/linux/capability.h | fgrep -v 0x > cap_names.sed
|
||||
|
||||
$(MINLIBNAME): $(OBJS)
|
||||
- $(LD) -soname $(MAJLIBNAME) -x -shared -o $@ $(OBJS)
|
||||
+ $(CC) -Wl,-soname,$(MAJLIBNAME) -Wl,-x -shared -o $@ $(OBJS)
|
||||
ln -sf $(MINLIBNAME) $(MAJLIBNAME)
|
||||
ln -sf $(MAJLIBNAME) $(LIBNAME)
|
||||
|
||||
%.o: %.c $(INCLS)
|
||||
- $(CC) $(CFLAGS) -c $< -o $@
|
||||
+ $(CC) $(CFLAGS) -fpic -c $< -o $@
|
||||
|
||||
install: all
|
||||
mkdir -p -m 0755 $(INCDIR)/sys
|
||||
@@ -1,43 +0,0 @@
|
||||
--- libcap-1.10.old/libcap/cap_sys.c 2003-08-24 19:03:35.524759616 -0700
|
||||
+++ libcap-1.10/libcap/cap_sys.c 2003-08-24 19:03:48.406801248 -0700
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "libcap.h"
|
||||
#define __LIBRARY__
|
||||
#include <linux/unistd.h>
|
||||
-
|
||||
+/*
|
||||
_syscall2(int, capget,
|
||||
cap_user_header_t, header,
|
||||
cap_user_data_t, data)
|
||||
@@ -18,7 +18,7 @@
|
||||
_syscall2(int, capset,
|
||||
cap_user_header_t, header,
|
||||
const cap_user_data_t, data)
|
||||
-
|
||||
+*/
|
||||
/*
|
||||
* $Log: libcap-1.10-syscall.patch,v $
|
||||
* Revision 1.1 2004/01/14 13:11:39 riddles
|
||||
* Build shared libcap
|
||||
*
|
||||
* Revision 1.2 2003/08/29 06:28:38 cretin
|
||||
* Only add -fPIC for libcap.so objects
|
||||
*
|
||||
* Revision 1.1 2003/08/27 06:10:53 cretin
|
||||
* Added -fPIC for prelink to work, and fixed compile error
|
||||
*
|
||||
* Revision 1.1.1.1 1999/04/17 22:16:31 morgan
|
||||
--- libcap-1.10.old/Make.Rules Mon May 21 16:22:08 2001
|
||||
+++ libcap-1.10/Make.Rules Mon May 21 16:22:32 2001
|
||||
@@ -44,10 +44,10 @@
|
||||
CC=gcc
|
||||
COPTFLAGS=-O2
|
||||
DEBUG=-g #-DDEBUG
|
||||
-WARNINGS=-ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
|
||||
+WARNINGS=-D_POSIX_SOURCE -Wall -Wwrite-strings \
|
||||
-Wpointer-arith -Wcast-qual -Wcast-align \
|
||||
-Wtraditional -Wstrict-prototypes -Wmissing-prototypes \
|
||||
- -Wnested-externs -Winline -Wshadow -pedantic
|
||||
+ -Wnested-externs -Winline -Wshadow
|
||||
LD=ld
|
||||
LDFLAGS=-s #-g
|
||||
@@ -1,11 +0,0 @@
|
||||
--- libnl-1.1/include/netlink-local.h.orig 2008-06-08 19:09:20.000000000 +0200
|
||||
+++ libnl-1.1/include/netlink-local.h 2008-06-08 19:09:33.000000000 +0200
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <inttypes.h>
|
||||
#include <assert.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
diff -urN libsigc++-2.0-2.0.17.old/sigc++/signal.h libsigc++-2.0-2.0.17/sigc++/signal.h
|
||||
--- libsigc++-2.0-2.0.17.old/sigc++/signal.h 2005-12-20 08:35:21.000000000 +0000
|
||||
+++ libsigc++-2.0-2.0.17/sigc++/signal.h 2008-02-22 00:22:44.000000000 +0000
|
||||
@@ -1661,7 +1661,7 @@
|
||||
typedef internal::signal_emit0<T_return, T_accumulator> emitter_type;
|
||||
typedef typename emitter_type::result_type result_type;
|
||||
typedef slot<T_return> slot_type;
|
||||
- typedef slot_list<slot_type> slot_list_type;
|
||||
+ typedef sigc::slot_list<slot_type> slot_list_type;
|
||||
typedef typename slot_list_type::iterator iterator;
|
||||
typedef typename slot_list_type::const_iterator const_iterator;
|
||||
typedef typename slot_list_type::reverse_iterator reverse_iterator;
|
||||
@@ -1770,7 +1770,7 @@
|
||||
typedef internal::signal_emit1<T_return, T_arg1, T_accumulator> emitter_type;
|
||||
typedef typename emitter_type::result_type result_type;
|
||||
typedef slot<T_return, T_arg1> slot_type;
|
||||
- typedef slot_list<slot_type> slot_list_type;
|
||||
+ typedef sigc::slot_list<slot_type> slot_list_type;
|
||||
typedef typename slot_list_type::iterator iterator;
|
||||
typedef typename slot_list_type::const_iterator const_iterator;
|
||||
typedef typename slot_list_type::reverse_iterator reverse_iterator;
|
||||
@@ -1881,7 +1881,7 @@
|
||||
typedef internal::signal_emit2<T_return, T_arg1,T_arg2, T_accumulator> emitter_type;
|
||||
typedef typename emitter_type::result_type result_type;
|
||||
typedef slot<T_return, T_arg1,T_arg2> slot_type;
|
||||
- typedef slot_list<slot_type> slot_list_type;
|
||||
+ typedef sigc::slot_list<slot_type> slot_list_type;
|
||||
typedef typename slot_list_type::iterator iterator;
|
||||
typedef typename slot_list_type::const_iterator const_iterator;
|
||||
typedef typename slot_list_type::reverse_iterator reverse_iterator;
|
||||
@@ -1994,7 +1994,7 @@
|
||||
typedef internal::signal_emit3<T_return, T_arg1,T_arg2,T_arg3, T_accumulator> emitter_type;
|
||||
typedef typename emitter_type::result_type result_type;
|
||||
typedef slot<T_return, T_arg1,T_arg2,T_arg3> slot_type;
|
||||
- typedef slot_list<slot_type> slot_list_type;
|
||||
+ typedef sigc::slot_list<slot_type> slot_list_type;
|
||||
typedef typename slot_list_type::iterator iterator;
|
||||
typedef typename slot_list_type::const_iterator const_iterator;
|
||||
typedef typename slot_list_type::reverse_iterator reverse_iterator;
|
||||
@@ -2109,7 +2109,7 @@
|
||||
typedef internal::signal_emit4<T_return, T_arg1,T_arg2,T_arg3,T_arg4, T_accumulator> emitter_type;
|
||||
typedef typename emitter_type::result_type result_type;
|
||||
typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4> slot_type;
|
||||
- typedef slot_list<slot_type> slot_list_type;
|
||||
+ typedef sigc::slot_list<slot_type> slot_list_type;
|
||||
typedef typename slot_list_type::iterator iterator;
|
||||
typedef typename slot_list_type::const_iterator const_iterator;
|
||||
typedef typename slot_list_type::reverse_iterator reverse_iterator;
|
||||
@@ -2226,7 +2226,7 @@
|
||||
typedef internal::signal_emit5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_accumulator> emitter_type;
|
||||
typedef typename emitter_type::result_type result_type;
|
||||
typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> slot_type;
|
||||
- typedef slot_list<slot_type> slot_list_type;
|
||||
+ typedef sigc::slot_list<slot_type> slot_list_type;
|
||||
typedef typename slot_list_type::iterator iterator;
|
||||
typedef typename slot_list_type::const_iterator const_iterator;
|
||||
typedef typename slot_list_type::reverse_iterator reverse_iterator;
|
||||
@@ -2345,7 +2345,7 @@
|
||||
typedef internal::signal_emit6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_accumulator> emitter_type;
|
||||
typedef typename emitter_type::result_type result_type;
|
||||
typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> slot_type;
|
||||
- typedef slot_list<slot_type> slot_list_type;
|
||||
+ typedef sigc::slot_list<slot_type> slot_list_type;
|
||||
typedef typename slot_list_type::iterator iterator;
|
||||
typedef typename slot_list_type::const_iterator const_iterator;
|
||||
typedef typename slot_list_type::reverse_iterator reverse_iterator;
|
||||
@@ -2466,7 +2466,7 @@
|
||||
typedef internal::signal_emit7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_accumulator> emitter_type;
|
||||
typedef typename emitter_type::result_type result_type;
|
||||
typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> slot_type;
|
||||
- typedef slot_list<slot_type> slot_list_type;
|
||||
+ typedef sigc::slot_list<slot_type> slot_list_type;
|
||||
typedef typename slot_list_type::iterator iterator;
|
||||
typedef typename slot_list_type::const_iterator const_iterator;
|
||||
typedef typename slot_list_type::reverse_iterator reverse_iterator;
|
||||
diff -urN libsigc++-2.0-2.0.17.old/tests/test_copy_invalid_slot.cc libsigc++-2.0-2.0.17/tests/test_copy_invalid_slot.cc
|
||||
--- libsigc++-2.0-2.0.17.old/tests/test_copy_invalid_slot.cc 2005-05-01 02:00:47.000000000 +0000
|
||||
+++ libsigc++-2.0-2.0.17/tests/test_copy_invalid_slot.cc 2008-02-22 00:24:08.000000000 +0000
|
||||
@@ -1,4 +1,6 @@
|
||||
#include <iostream>
|
||||
+#include <cstdlib>
|
||||
+#include <cstring>
|
||||
#include <sigc++/sigc++.h>
|
||||
|
||||
void Foo(sigc::trackable &t) {}
|
||||
0
src/patches/lzo-2.06-CVE-2014-4607.patch
Executable file → Normal file
0
src/patches/lzo-2.06-CVE-2014-4607.patch
Executable file → Normal file
@@ -1,21 +0,0 @@
|
||||
Submitted By: Ken Moffat <ken@kenmoffat.uklinux.net>
|
||||
Date: 2005-08-08
|
||||
Initial Package Version: 0.98.39
|
||||
Upstream Status: From upstream cvs
|
||||
Origin: Extracted by Ken Moffat
|
||||
Description: This is Jindrich Novy's patch to fix another buffer overrun
|
||||
in nasm, CAN-2005-1194 (users who can be persuaded to assemble and run a
|
||||
malicious source file can have arbitrary code executed via a buffer
|
||||
overflow).
|
||||
|
||||
--- nasm-0.98.39/output/outieee.c.orig 2005-01-15 22:16:08.000000000 +0000
|
||||
+++ nasm-0.98.39/output/outieee.c 2005-08-08 22:12:46.000000000 +0100
|
||||
@@ -1120,7 +1120,7 @@
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
- vsprintf(buffer, format, ap);
|
||||
+ vsnprintf(buffer, sizeof(buffer), format, ap);
|
||||
l = strlen(buffer);
|
||||
for (i = 0; i < l; i++)
|
||||
if ((buffer[i] & 0xff) > 31)
|
||||
@@ -1,51 +0,0 @@
|
||||
Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
|
||||
Date: 2004-06-24
|
||||
Initial Package Version: 2.6
|
||||
Origin: Gentoo and Self
|
||||
Upstream Status: N/A
|
||||
Description: Fixes Compile Issues with the 2.6 Kernel
|
||||
|
||||
|
||||
diff -Naur net-tools-1.60.orig/hostname.c net-tools-1.60/hostname.c
|
||||
--- net-tools-1.60.orig/hostname.c 2001-04-08 17:04:23.000000000 +0000
|
||||
+++ net-tools-1.60/hostname.c 2004-06-24 06:17:32.517305695 +0000
|
||||
@@ -42,10 +42,16 @@
|
||||
#include "config.h"
|
||||
#include "version.h"
|
||||
#include "../intl.h"
|
||||
+#include <linux/version.h>
|
||||
|
||||
#if HAVE_AFDECnet
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
|
||||
#include <netdnet/dn.h>
|
||||
#endif
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
|
||||
+#include <linux/dn.h>
|
||||
+#endif
|
||||
+#endif
|
||||
|
||||
char *Release = RELEASE, *Version = "hostname 1.100 (2001-04-14)";
|
||||
|
||||
diff -Naur net-tools-1.60.orig/lib/x25_sr.c net-tools-1.60/lib/x25_sr.c
|
||||
--- net-tools-1.60.orig/lib/x25_sr.c 2000-05-20 13:38:10.000000000 +0000
|
||||
+++ net-tools-1.60/lib/x25_sr.c 2004-06-24 06:15:45.163773724 +0000
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/x25.h>
|
||||
+#include <linux/version.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
@@ -77,7 +78,11 @@
|
||||
rt.sigdigits=sigdigits;
|
||||
|
||||
/* x25_route_struct.address isn't type struct sockaddr_x25, Why? */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
|
||||
memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address));
|
||||
+#else
|
||||
+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address));
|
||||
+#endif
|
||||
|
||||
while (*args) {
|
||||
if (!strcmp(*args,"device") || !strcmp(*args,"dev")) {
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,99 +0,0 @@
|
||||
diff -Naur openssl-0.9.8n.org/crypto/engine/eng_all.c openssl-0.9.8n/crypto/engine/eng_all.c
|
||||
--- openssl-0.9.8n.org/crypto/engine/eng_all.c 2010-03-01 01:30:11.000000000 +0100
|
||||
+++ openssl-0.9.8n/crypto/engine/eng_all.c 2010-03-30 08:11:26.000000000 +0200
|
||||
@@ -104,16 +104,13 @@
|
||||
#endif
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_HW
|
||||
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)
|
||||
ENGINE_load_cryptodev();
|
||||
-#endif
|
||||
#if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
|
||||
ENGINE_load_capi();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
|
||||
void ENGINE_setup_bsd_cryptodev(void) {
|
||||
static int bsd_cryptodev_default_loaded = 0;
|
||||
if (!bsd_cryptodev_default_loaded) {
|
||||
@@ -122,4 +119,3 @@
|
||||
}
|
||||
bsd_cryptodev_default_loaded=1;
|
||||
}
|
||||
-#endif
|
||||
diff -Naur openssl-0.9.8n.org/crypto/engine/eng_cryptodev.c openssl-0.9.8n/crypto/engine/eng_cryptodev.c
|
||||
--- openssl-0.9.8n.org/crypto/engine/eng_cryptodev.c 2010-03-03 16:30:05.000000000 +0100
|
||||
+++ openssl-0.9.8n/crypto/engine/eng_cryptodev.c 2010-03-30 08:01:11.000000000 +0200
|
||||
@@ -38,14 +38,15 @@
|
||||
#if (defined(__unix__) || defined(unix)) && !defined(USG) && \
|
||||
(defined(OpenBSD) || defined(__FreeBSD__))
|
||||
#include <sys/param.h>
|
||||
-# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041)
|
||||
-# define HAVE_CRYPTODEV
|
||||
-# endif
|
||||
# if (OpenBSD >= 200110)
|
||||
# define HAVE_SYSLOG_R
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+#if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041) || defined(__linux__)
|
||||
+# define HAVE_CRYPTODEV
|
||||
+#endif
|
||||
+
|
||||
#ifndef HAVE_CRYPTODEV
|
||||
|
||||
void
|
||||
@@ -58,7 +59,12 @@
|
||||
#else
|
||||
|
||||
#include <sys/types.h>
|
||||
-#include <crypto/cryptodev.h>
|
||||
+#if defined(__linux__)
|
||||
+# include <linux/cryptodev.h>
|
||||
+# define HAVE_CRYPTODEV_NAME
|
||||
+#else
|
||||
+# include <crypto/cryptodev.h>
|
||||
+#endif
|
||||
#include <sys/ioctl.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
@@ -81,7 +87,11 @@
|
||||
static int get_dev_crypto(void);
|
||||
static int cryptodev_max_iv(int cipher);
|
||||
static int cryptodev_key_length_valid(int cipher, int len);
|
||||
-static int cipher_nid_to_cryptodev(int nid);
|
||||
+#ifndef HAVE_CRYPTODEV_NAME
|
||||
+ static int cipher_nid_to_cryptodev(int nid);
|
||||
+#else
|
||||
+ static char *cipher_nid_to_cryptodev_name(int nid);
|
||||
+#endif
|
||||
static int get_cryptodev_ciphers(const int **cnids);
|
||||
/*static int get_cryptodev_digests(const int **cnids);*/
|
||||
static int cryptodev_usable_ciphers(const int **nids);
|
||||
diff -Naur openssl-0.9.8n.org/crypto/engine/engine.h openssl-0.9.8n/crypto/engine/engine.h
|
||||
--- openssl-0.9.8n.org/crypto/engine/engine.h 2010-02-09 15:18:15.000000000 +0100
|
||||
+++ openssl-0.9.8n/crypto/engine/engine.h 2010-03-30 08:01:11.000000000 +0200
|
||||
@@ -705,9 +705,7 @@
|
||||
* values. */
|
||||
void *ENGINE_get_static_state(void);
|
||||
|
||||
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
|
||||
void ENGINE_setup_bsd_cryptodev(void);
|
||||
-#endif
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
diff -Naur openssl-0.9.8n.org/crypto/evp/c_all.c openssl-0.9.8n/crypto/evp/c_all.c
|
||||
--- openssl-0.9.8n.org/crypto/evp/c_all.c 2004-08-29 18:36:04.000000000 +0200
|
||||
+++ openssl-0.9.8n/crypto/evp/c_all.c 2010-03-30 08:01:11.000000000 +0200
|
||||
@@ -83,8 +83,6 @@
|
||||
OpenSSL_add_all_ciphers();
|
||||
OpenSSL_add_all_digests();
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
-# if defined(__OpenBSD__) || defined(__FreeBSD__)
|
||||
ENGINE_setup_bsd_cryptodev();
|
||||
-# endif
|
||||
#endif
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
--- pciutils-2.1.10/lib/access.c.foo Wed Feb 12 15:44:05 2003
|
||||
+++ pciutils-2.1.10/lib/access.c Wed Feb 12 15:44:33 2003
|
||||
@@ -180,7 +180,8 @@
|
||||
void
|
||||
pci_scan_bus(struct pci_access *a)
|
||||
{
|
||||
- a->methods->scan(a);
|
||||
+ if (a->methods)
|
||||
+ a->methods->scan(a);
|
||||
}
|
||||
|
||||
struct pci_dev *
|
||||
@@ -1,17 +0,0 @@
|
||||
Patch by Robert Scheck <redhat@linuxnetz.de> for pciutils >= 2.1.99, which make pciutils
|
||||
rebuildable using gcc 4.
|
||||
|
||||
--- pciutils-2.1.99-test8/lib/i386-ports.c 2004-08-13 22:13:11.000000000 +0200
|
||||
+++ pciutils-2.1.99-test8/lib/i386-ports.c.gcc4 2005-03-14 09:30:06.000000000 +0100
|
||||
@@ -57,9 +57,9 @@
|
||||
for(d.dev = 0; d.dev < 32; d.dev++)
|
||||
{
|
||||
u16 class, vendor;
|
||||
- if (m->read(&d, PCI_CLASS_DEVICE, (byte *) &class, sizeof(class)) &&
|
||||
+ if ((m->read) (&d, PCI_CLASS_DEVICE, (byte *) &class, sizeof(class)) &&
|
||||
(class == cpu_to_le16(PCI_CLASS_BRIDGE_HOST) || class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA)) ||
|
||||
- m->read(&d, PCI_VENDOR_ID, (byte *) &vendor, sizeof(vendor)) &&
|
||||
+ (m->read) (&d, PCI_VENDOR_ID, (byte *) &vendor, sizeof(vendor)) &&
|
||||
(vendor == cpu_to_le16(PCI_VENDOR_ID_INTEL) || vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ)))
|
||||
{
|
||||
a->debug("...outside the Asylum at 0/%02x/0", d.dev);
|
||||
@@ -1,11 +0,0 @@
|
||||
--- pciutils-2.2.1/Makefile.idpath 2006-02-23 12:24:12.000000000 +0100
|
||||
+++ pciutils-2.2.1/Makefile 2006-02-23 12:24:18.000000000 +0100
|
||||
@@ -10,7 +10,7 @@
|
||||
PREFIX=/usr/local
|
||||
SBINDIR=$(PREFIX)/sbin
|
||||
SHAREDIR=$(PREFIX)/share
|
||||
-IDSDIR=$(SHAREDIR)
|
||||
+IDSDIR=$(SHAREDIR)/hwdata
|
||||
MANDIR:=$(shell if [ -d $(PREFIX)/share/man ] ; then echo $(PREFIX)/share/man ; else echo $(PREFIX)/man ; fi)
|
||||
INSTALL=install
|
||||
DIRINSTALL=install -d
|
||||
@@ -1,130 +0,0 @@
|
||||
--- pciutils-2.2.3/lib/configure.multilib 2006-05-05 14:25:07.000000000 +0200
|
||||
+++ pciutils-2.2.3/lib/configure 2006-05-23 15:50:16.000000000 +0200
|
||||
@@ -30,8 +30,37 @@
|
||||
echo " $host $rel"
|
||||
|
||||
c=config.h
|
||||
-echo >$c "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"
|
||||
-echo >>$c "#define PCI_OS_`echo $sys | tr 'a-z' 'A-Z'`"
|
||||
+cm=config.h.mk
|
||||
+cat >$c <<EOF
|
||||
+#if defined(__x86_64__)
|
||||
+#define PCI_ARCH_X86_64
|
||||
+#elif defined(__ia64__)
|
||||
+#define PCI_ARCH_IA64
|
||||
+#elif defined(__i386__)
|
||||
+#define PCI_ARCH_I386
|
||||
+#define PCI_HAVE_PM_INTEL_CONF
|
||||
+#elif defined(__ppc64__) || defined(__powerpc64__)
|
||||
+#define PCI_ARCH_PPC64
|
||||
+#elif defined(__ppc__) || defined(__powerpc__)
|
||||
+#define PCI_ARCH_PPC
|
||||
+#elif defined(__s390x__)
|
||||
+#define PCI_ARCH_S390X
|
||||
+#elif defined(__s390__)
|
||||
+#define PCI_ARCH_S390
|
||||
+#else
|
||||
+#error Unknown Arch
|
||||
+#endif
|
||||
+#define PCI_OS_LINUX
|
||||
+#define PCI_HAVE_PM_LINUX_SYSFS
|
||||
+#define PCI_HAVE_PM_LINUX_PROC
|
||||
+#define PCI_HAVE_LINUX_BYTEORDER_H
|
||||
+#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"
|
||||
+#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"
|
||||
+#define PCI_HAVE_64BIT_ADDRESS
|
||||
+EOF
|
||||
+
|
||||
+echo >$cm "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"
|
||||
+echo >>$cm "#define PCI_OS_`echo $sys | tr 'a-z' 'A-Z'`"
|
||||
|
||||
echo_n "Looking for access methods..."
|
||||
|
||||
@@ -39,63 +68,22 @@
|
||||
linux*)
|
||||
case $rel in
|
||||
2.[1-9]*|[3-9]*) echo_n " sysfs proc"
|
||||
- echo >>$c '#define PCI_HAVE_PM_LINUX_SYSFS'
|
||||
- echo >>$c '#define PCI_HAVE_PM_LINUX_PROC'
|
||||
- echo >>$c '#define PCI_HAVE_LINUX_BYTEORDER_H'
|
||||
- echo >>$c '#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"'
|
||||
- echo >>$c '#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"'
|
||||
- ok=1
|
||||
- ;;
|
||||
- esac
|
||||
- case $cpu in
|
||||
- i386) echo_n " i386-ports"
|
||||
- echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
|
||||
+ echo >>$cm '#define PCI_HAVE_PM_LINUX_SYSFS'
|
||||
+ echo >>$cm '#define PCI_HAVE_PM_LINUX_PROC'
|
||||
+ echo >>$cm '#define PCI_HAVE_LINUX_BYTEORDER_H'
|
||||
+ echo >>$cm '#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"'
|
||||
+ echo >>$cm '#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"'
|
||||
ok=1
|
||||
;;
|
||||
esac
|
||||
- echo >>$c '#define PCI_HAVE_64BIT_ADDRESS'
|
||||
- ;;
|
||||
- sunos)
|
||||
case $cpu in
|
||||
i386) echo_n " i386-ports"
|
||||
- echo >>$c "#define PCI_HAVE_PM_INTEL_CONF"
|
||||
+ echo >>$cm '#define PCI_HAVE_PM_INTEL_CONF'
|
||||
ok=1
|
||||
;;
|
||||
- *)
|
||||
- echo " The PCI library is does not support Solaris for this architecture: $cpu"
|
||||
- exit 1
|
||||
- ;;
|
||||
esac
|
||||
- ;;
|
||||
-
|
||||
- freebsd)
|
||||
- echo_n " fbsd-device"
|
||||
- echo >>$c '#define PCI_HAVE_PM_FBSD_DEVICE'
|
||||
- echo >>$c '#define PCI_PATH_FBSD_DEVICE "/dev/pci"'
|
||||
- ok=1
|
||||
- ;;
|
||||
- openbsd)
|
||||
- echo_n " obsd-device"
|
||||
- echo >>$c '#define PCI_HAVE_PM_OBSD_DEVICE'
|
||||
- echo >>$c '#define PCI_PATH_OBSD_DEVICE "/dev/pci"'
|
||||
- ok=1
|
||||
- ;;
|
||||
- aix)
|
||||
- echo_n " aix-device"
|
||||
- echo >>$c '#define PCI_HAVE_PM_AIX_DEVICE'
|
||||
- ok=1
|
||||
- ;;
|
||||
- netbsd)
|
||||
- echo_n " nbsd-libpci"
|
||||
- echo >>$c '#define PCI_HAVE_PM_NBSD_LIBPCI'
|
||||
- echo >>$c '#define PCI_PATH_NBSD_DEVICE "/dev/pci0"'
|
||||
- ok=1
|
||||
- ;;
|
||||
- gnu)
|
||||
- echo_n " i386-ports"
|
||||
- echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
|
||||
- ok=1
|
||||
- ;;
|
||||
+ echo >>$cm '#define PCI_HAVE_64BIT_ADDRESS'
|
||||
+ ;;
|
||||
*)
|
||||
echo " Unfortunately, your OS is not supported by the PCI Library"
|
||||
exit 1
|
||||
@@ -103,10 +91,14 @@
|
||||
esac
|
||||
|
||||
echo >>$c '#define PCI_HAVE_PM_DUMP'
|
||||
+echo >>$cm '#define PCI_HAVE_PM_DUMP'
|
||||
echo " dump"
|
||||
if [ -z "$ok" ] ; then
|
||||
echo "WARNING: No real configuration access method is available."
|
||||
fi
|
||||
echo >>$c "#define PCI_PATH_IDS \"$idsdir/pci.ids\""
|
||||
echo >>$c "#define PCILIB_VERSION \"$version\""
|
||||
-sed '/^#define [^ ]*$/!d;s/^#define \(.*\)/\1=1/' <$c >config.mk
|
||||
+
|
||||
+echo >>$cm "#define PCI_PATH_IDS \"$idsdir/pci.ids\""
|
||||
+echo >>$cm "#define PCILIB_VERSION \"$version\""
|
||||
+sed '/^#define [^ ]*$/!d;s/^#define \(.*\)/\1=1/' <$cm >config.mk
|
||||
@@ -1,11 +0,0 @@
|
||||
--- pciutils-2.2.3/lib/header.h.sata 2006-08-09 13:16:07.000000000 -0400
|
||||
+++ pciutils-2.2.3/lib/header.h 2006-08-09 13:17:45.000000000 -0400
|
||||
@@ -855,6 +855,8 @@
|
||||
#define PCI_CLASS_STORAGE_FLOPPY 0x0102
|
||||
#define PCI_CLASS_STORAGE_IPI 0x0103
|
||||
#define PCI_CLASS_STORAGE_RAID 0x0104
|
||||
+#define PCI_CLASS_STORAGE_ATA 0x0105
|
||||
+#define PCI_CLASS_STORAGE_SATA 0x0106
|
||||
#define PCI_CLASS_STORAGE_OTHER 0x0180
|
||||
|
||||
#define PCI_BASE_CLASS_NETWORK 0x02
|
||||
@@ -1,136 +0,0 @@
|
||||
--- pciutils-2.2.1/lib/sysfs.c.devicetype 2005-09-21 07:51:00.000000000 -0400
|
||||
+++ pciutils-2.2.1/lib/sysfs.c 2005-12-13 17:02:12.000000000 -0500
|
||||
@@ -164,7 +164,6 @@
|
||||
sysfs_get_resources(d);
|
||||
d->irq = sysfs_get_value(d, "irq");
|
||||
d->known_fields = PCI_FILL_IRQ | PCI_FILL_BASES | PCI_FILL_ROM_BASE | PCI_FILL_SIZES;
|
||||
-#if 0
|
||||
/*
|
||||
* We prefer reading these from the config registers, it's faster.
|
||||
* However, it would be possible and maybe even useful to hack the kernel
|
||||
@@ -173,8 +172,8 @@
|
||||
*/
|
||||
d->vendor_id = sysfs_get_value(d, "vendor");
|
||||
d->device_id = sysfs_get_value(d, "device");
|
||||
- d->known_fields |= PCI_FILL_IDENT;
|
||||
-#endif
|
||||
+ d->device_class = sysfs_get_value(d, "class") >> 8;
|
||||
+ d->known_fields |= PCI_FILL_IDENT | PCI_FILL_CLASS;
|
||||
}
|
||||
pci_link_dev(a, d);
|
||||
}
|
||||
--- pciutils-2.2.1/lib/pci.h.devicetype 2005-09-10 08:10:54.000000000 -0400
|
||||
+++ pciutils-2.2.1/lib/pci.h 2005-12-13 17:02:12.000000000 -0500
|
||||
@@ -84,6 +84,7 @@
|
||||
/* These fields are set by pci_fill_info() */
|
||||
int known_fields; /* Set of info fields already known */
|
||||
u16 vendor_id, device_id; /* Identity of the device */
|
||||
+ u16 device_class; /* PCI device class */
|
||||
int irq; /* IRQ number */
|
||||
pciaddr_t base_addr[6]; /* Base addresses */
|
||||
pciaddr_t size[6]; /* Region sizes */
|
||||
@@ -118,6 +119,7 @@
|
||||
#define PCI_FILL_BASES 4
|
||||
#define PCI_FILL_ROM_BASE 8
|
||||
#define PCI_FILL_SIZES 16
|
||||
+#define PCI_FILL_CLASS 32
|
||||
#define PCI_FILL_RESCAN 0x10000
|
||||
|
||||
void pci_setup_cache(struct pci_dev *, u8 *cache, int len);
|
||||
--- pciutils-2.2.1/lib/generic.c.devicetype 2004-08-13 16:15:23.000000000 -0400
|
||||
+++ pciutils-2.2.1/lib/generic.c 2005-12-13 17:02:12.000000000 -0500
|
||||
@@ -46,7 +46,8 @@
|
||||
d->func = t->func;
|
||||
d->vendor_id = vd & 0xffff;
|
||||
d->device_id = vd >> 16U;
|
||||
- d->known_fields = PCI_FILL_IDENT;
|
||||
+ d->device_class = pci_read_byte(t,PCI_CLASS_DEVICE+1) << 8 | pci_read_byte(t, PCI_CLASS_DEVICE);
|
||||
+ d->known_fields = PCI_FILL_IDENT | PCI_FILL_CLASS;
|
||||
d->hdrtype = ht;
|
||||
pci_link_dev(a, d);
|
||||
switch (ht)
|
||||
@@ -86,6 +87,8 @@
|
||||
d->vendor_id = pci_read_word(d, PCI_VENDOR_ID);
|
||||
d->device_id = pci_read_word(d, PCI_DEVICE_ID);
|
||||
}
|
||||
+ if (flags & PCI_FILL_CLASS)
|
||||
+ d->device_class = pci_read_byte(d, PCI_CLASS_DEVICE+1) << 8 | pci_read_byte(d, PCI_CLASS_DEVICE);
|
||||
if (flags & PCI_FILL_IRQ)
|
||||
d->irq = pci_read_byte(d, PCI_INTERRUPT_LINE);
|
||||
if (flags & PCI_FILL_BASES)
|
||||
--- pciutils-2.2.1/lib/example.c.devicetype 2000-03-09 03:38:33.000000000 -0500
|
||||
+++ pciutils-2.2.1/lib/example.c 2005-12-13 17:02:12.000000000 -0500
|
||||
@@ -21,7 +21,7 @@
|
||||
pci_scan_bus(pacc); /* We want to get the list of devices */
|
||||
for(dev=pacc->devices; dev; dev=dev->next) /* Iterate over all devices */
|
||||
{
|
||||
- pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES); /* Fill in header info we need */
|
||||
+ pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_CLASS); /* Fill in header info we need */
|
||||
c = pci_read_word(dev, PCI_CLASS_DEVICE); /* Read config register directly */
|
||||
printf("%02x:%02x.%d vendor=%04x device=%04x class=%04x irq=%d base0=%lx\n",
|
||||
dev->bus, dev->dev, dev->func, dev->vendor_id, dev->device_id,
|
||||
--- pciutils-2.2.1/lspci.c.devicetype 2005-11-26 06:48:29.000000000 -0500
|
||||
+++ pciutils-2.2.1/lspci.c 2005-12-13 17:04:39.000000000 -0500
|
||||
@@ -123,7 +123,7 @@
|
||||
d->config_cached += 64;
|
||||
}
|
||||
pci_setup_cache(p, d->config, d->config_cached);
|
||||
- pci_fill_info(p, PCI_FILL_IDENT | PCI_FILL_IRQ | PCI_FILL_BASES | PCI_FILL_ROM_BASE | PCI_FILL_SIZES);
|
||||
+ pci_fill_info(p, PCI_FILL_IDENT | PCI_FILL_CLASS | PCI_FILL_IRQ | PCI_FILL_BASES | PCI_FILL_ROM_BASE | PCI_FILL_SIZES);
|
||||
return d;
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
printf(" %s: %s",
|
||||
pci_lookup_name(pacc, classbuf, sizeof(classbuf),
|
||||
PCI_LOOKUP_CLASS,
|
||||
- get_conf_word(d, PCI_CLASS_DEVICE)),
|
||||
+ p->device_class),
|
||||
pci_lookup_name(pacc, devbuf, sizeof(devbuf),
|
||||
PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE,
|
||||
p->vendor_id, p->device_id));
|
||||
@@ -267,7 +267,7 @@
|
||||
c = get_conf_byte(d, PCI_CLASS_PROG);
|
||||
x = pci_lookup_name(pacc, devbuf, sizeof(devbuf),
|
||||
PCI_LOOKUP_PROGIF | PCI_LOOKUP_NO_NUMBERS,
|
||||
- get_conf_word(d, PCI_CLASS_DEVICE), c);
|
||||
+ p->device_class, c);
|
||||
if (c || x)
|
||||
{
|
||||
printf(" (prog-if %02x", c);
|
||||
@@ -1585,7 +1585,7 @@
|
||||
struct pci_dev *p = d->dev;
|
||||
word status = get_conf_word(d, PCI_STATUS);
|
||||
word cmd = get_conf_word(d, PCI_COMMAND);
|
||||
- word class = get_conf_word(d, PCI_CLASS_DEVICE);
|
||||
+ word class = p->device_class;
|
||||
byte bist = get_conf_byte(d, PCI_BIST);
|
||||
byte htype = get_conf_byte(d, PCI_HEADER_TYPE) & 0x7f;
|
||||
byte latency = get_conf_byte(d, PCI_LATENCY_TIMER);
|
||||
@@ -1783,7 +1783,7 @@
|
||||
show_slot_name(d);
|
||||
putchar('\n');
|
||||
printf("Class:\t%s\n",
|
||||
- pci_lookup_name(pacc, classbuf, sizeof(classbuf), PCI_LOOKUP_CLASS, get_conf_word(d, PCI_CLASS_DEVICE)));
|
||||
+ pci_lookup_name(pacc, classbuf, sizeof(classbuf), PCI_LOOKUP_CLASS, p->device_class));
|
||||
printf("Vendor:\t%s\n",
|
||||
pci_lookup_name(pacc, vendbuf, sizeof(vendbuf), PCI_LOOKUP_VENDOR, p->vendor_id, p->device_id));
|
||||
printf("Device:\t%s\n",
|
||||
@@ -1805,7 +1805,7 @@
|
||||
show_slot_name(d);
|
||||
printf(" \"%s\" \"%s\" \"%s\"",
|
||||
pci_lookup_name(pacc, classbuf, sizeof(classbuf), PCI_LOOKUP_CLASS,
|
||||
- get_conf_word(d, PCI_CLASS_DEVICE)),
|
||||
+ p->device_class),
|
||||
pci_lookup_name(pacc, vendbuf, sizeof(vendbuf), PCI_LOOKUP_VENDOR,
|
||||
p->vendor_id, p->device_id),
|
||||
pci_lookup_name(pacc, devbuf, sizeof(devbuf), PCI_LOOKUP_DEVICE,
|
||||
@@ -1929,7 +1929,7 @@
|
||||
last_br = &host_bridge.chain;
|
||||
for(d=first_dev; d; d=d->next)
|
||||
{
|
||||
- word class = get_conf_word(d, PCI_CLASS_DEVICE);
|
||||
+ word class = d->dev->device_class;
|
||||
byte ht = get_conf_byte(d, PCI_HEADER_TYPE) & 0x7f;
|
||||
if (class == PCI_CLASS_BRIDGE_PCI &&
|
||||
(ht == PCI_HEADER_TYPE_BRIDGE || ht == PCI_HEADER_TYPE_CARDBUS))
|
||||
@@ -1,57 +0,0 @@
|
||||
--- pciutils-2.1.99-test8/lib/pread.h.pread 2004-08-13 16:15:46.000000000 -0400
|
||||
+++ pciutils-2.1.99-test8/lib/pread.h 2004-08-31 00:30:03.168157294 -0400
|
||||
@@ -12,54 +12,6 @@
|
||||
* don't define it.
|
||||
*/
|
||||
|
||||
-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ > 0
|
||||
-/* glibc 2.1 or newer -> pread/pwrite supported automatically */
|
||||
-
|
||||
-#elif defined(i386) && defined(__GLIBC__)
|
||||
-/* glibc 2.0 on i386 -> call syscalls directly */
|
||||
-#include <asm/unistd.h>
|
||||
-#include <syscall-list.h>
|
||||
-#ifndef SYS_pread
|
||||
-#define SYS_pread 180
|
||||
-#endif
|
||||
-static int pread(unsigned int fd, void *buf, size_t size, loff_t where)
|
||||
-{ return syscall(SYS_pread, fd, buf, size, where); }
|
||||
-#ifndef SYS_pwrite
|
||||
-#define SYS_pwrite 181
|
||||
-#endif
|
||||
-static int pwrite(unsigned int fd, void *buf, size_t size, loff_t where)
|
||||
-{ return syscall(SYS_pwrite, fd, buf, size, where); }
|
||||
-
|
||||
-#elif defined(i386)
|
||||
-/* old libc on i386 -> call syscalls directly the old way */
|
||||
-#include <asm/unistd.h>
|
||||
-static _syscall5(int, pread, unsigned int, fd, void *, buf, size_t, size, u32, where_lo, u32, where_hi);
|
||||
-static _syscall5(int, pwrite, unsigned int, fd, void *, buf, size_t, size, u32, where_lo, u32, where_hi);
|
||||
-static int do_read(struct pci_dev *d UNUSED, int fd, void *buf, size_t size, int where) { return pread(fd, buf, size, where, 0); }
|
||||
-static int do_write(struct pci_dev *d UNUSED, int fd, void *buf, size_t size, int where) { return pwrite(fd, buf, size, where, 0); }
|
||||
-#define PCI_HAVE_DO_READ
|
||||
-
|
||||
-#else
|
||||
-/* In all other cases we use lseek/read/write instead to be safe */
|
||||
-#define make_rw_glue(op) \
|
||||
- static int do_##op(struct pci_dev *d, int fd, void *buf, size_t size, int where) \
|
||||
- { \
|
||||
- struct pci_access *a = d->access; \
|
||||
- int r; \
|
||||
- if (a->fd_pos != where && lseek(fd, where, SEEK_SET) < 0) \
|
||||
- return -1; \
|
||||
- r = op(fd, buf, size); \
|
||||
- if (r < 0) \
|
||||
- a->fd_pos = -1; \
|
||||
- else \
|
||||
- a->fd_pos = where + r; \
|
||||
- return r; \
|
||||
- }
|
||||
-make_rw_glue(read)
|
||||
-make_rw_glue(write)
|
||||
-#define PCI_HAVE_DO_READ
|
||||
-#endif
|
||||
-
|
||||
#ifndef PCI_HAVE_DO_READ
|
||||
#define do_read(d,f,b,l,p) pread(f,b,l,p)
|
||||
#define do_write(d,f,b,l,p) pwrite(f,b,l,p)
|
||||
@@ -1,22 +0,0 @@
|
||||
--- pciutils-2.1.99-test3/Makefile.strip 2004-02-25 01:46:14.315787866 -0500
|
||||
+++ pciutils-2.1.99-test3/Makefile 2004-02-25 01:47:45.478046260 -0500
|
||||
@@ -32,7 +32,7 @@
|
||||
all: $(PCILIB) lspci setpci lspci.8 setpci.8 update-pciids update-pciids.8 pci.ids
|
||||
|
||||
$(PCILIB): $(PCIINC) force
|
||||
- $(MAKE) -C lib all
|
||||
+ CFLAGS="$(CFLAGS) -fPIC" $(MAKE) -C lib all
|
||||
|
||||
force:
|
||||
|
||||
--- pciutils-2.1.99-test8/Makefile.foo 2005-05-10 15:24:45.000000000 -0400
|
||||
+++ pciutils-2.1.99-test8/Makefile 2005-05-10 15:24:50.000000000 -0400
|
||||
@@ -65,7 +65,7 @@
|
||||
install: all
|
||||
# -c is ignored on Linux, but required on FreeBSD
|
||||
$(DIRINSTALL) -m 755 $(SBINDIR) $(IDSDIR) $(MANDIR)/man8
|
||||
- $(INSTALL) -c -m 755 -s lspci setpci $(SBINDIR)
|
||||
+ $(INSTALL) -c -m 755 lspci setpci $(SBINDIR)
|
||||
$(INSTALL) -c -m 755 update-pciids $(SBINDIR)
|
||||
$(INSTALL) -c -m 644 pci.ids $(IDSDIR)
|
||||
$(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(MANDIR)/man8
|
||||
@@ -1,11 +0,0 @@
|
||||
--- build/usr/src/Pound-2.6/configure_orig 2011-12-28 14:57:45.000000000 +0100
|
||||
+++ build/usr/src/Pound-2.6/configure 2012-02-10 21:09:50.000000000 +0100
|
||||
@@ -3232,7 +3232,7 @@
|
||||
|
||||
if test "${CC}" = "gcc"
|
||||
then
|
||||
- CPPFLAGS="${CPPFLAGS} -Wstrict-prototypes -Wno-unused-result -pipe"
|
||||
+ CPPFLAGS="${CPPFLAGS} -Wstrict-prototypes -pipe"
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: *** Checking for threads library and/or flags ***" >&5
|
||||
@@ -1,27 +0,0 @@
|
||||
diff -Nur old/bindings/CMakeLists.txt new/bindings/CMakeLists.txt
|
||||
--- old/bindings/CMakeLists.txt 2011-04-11 22:51:37.891109001 +0200
|
||||
+++ new/bindings/CMakeLists.txt 2011-04-11 22:55:52.859108992 +0200
|
||||
@@ -21,17 +21,17 @@
|
||||
#FIND_PACKAGE(PerlLibs)
|
||||
FIND_PACKAGE(Perl)
|
||||
|
||||
-IF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
|
||||
- ADD_SUBDIRECTORY(ruby)
|
||||
-ENDIF(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
|
||||
+#IF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
|
||||
+# ADD_SUBDIRECTORY(ruby)
|
||||
+#ENDIF(RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
|
||||
|
||||
IF (PYTHON_LIBRARY)
|
||||
ADD_SUBDIRECTORY(python)
|
||||
ENDIF(PYTHON_LIBRARY)
|
||||
|
||||
-IF (PERL_EXECUTABLE)
|
||||
- ADD_SUBDIRECTORY(perl)
|
||||
-ENDIF (PERL_EXECUTABLE)
|
||||
+#IF (PERL_EXECUTABLE)
|
||||
+# ADD_SUBDIRECTORY(perl)
|
||||
+#ENDIF (PERL_EXECUTABLE)
|
||||
|
||||
SET(bindings_devel_dir "${CMAKE_CURRENT_BINARY_DIR}/satsolver-bindings")
|
||||
ADD_CUSTOM_COMMAND (
|
||||
@@ -1,37 +0,0 @@
|
||||
diff -Nur src/bindings/pool.i sat-solver-bindings/bindings/pool.i
|
||||
--- src/bindings/pool.i 2011-04-25 12:03:31.000000000 +0000
|
||||
+++ sat-solver-bindings/bindings/pool.i 2011-04-29 18:40:59.645929695 +0000
|
||||
@@ -474,6 +474,7 @@
|
||||
return repo;
|
||||
}
|
||||
|
||||
+#if defined(FEDORA)
|
||||
/*
|
||||
* Add RPM database to Pool.
|
||||
*
|
||||
@@ -493,6 +494,7 @@
|
||||
repo_add_rpmdb( repo, NULL, rootdir, 0 );
|
||||
return repo;
|
||||
}
|
||||
+#endif
|
||||
|
||||
%newobject create_repo;
|
||||
/*
|
||||
diff -Nur src/bindings/repo.i sat-solver-bindings/bindings/repo.i
|
||||
--- src/bindings/repo.i 2011-04-25 12:03:31.000000000 +0000
|
||||
+++ sat-solver-bindings/bindings/repo.i 2011-04-29 18:37:13.856570319 +0000
|
||||
@@ -139,11 +139,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
+#if defined(FEDORA)
|
||||
/*
|
||||
* Add RPM database, optionally passing a _root_ directory
|
||||
*/
|
||||
void add_rpmdb( const char *rootdir )
|
||||
{ repo_add_rpmdb( $self, NULL, rootdir, 0); }
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Create solvable with +name+ and +evr+ in the Repo
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
diff -Naur qemu-0.14.1.org/hw/virtio-9p-local.c qemu-0.14.1/hw/virtio-9p-local.c
|
||||
--- qemu-0.14.1.org/hw/virtio-9p-local.c 2011-05-06 21:01:43.000000000 +0200
|
||||
+++ qemu-0.14.1/hw/virtio-9p-local.c 2011-05-18 14:04:32.432444320 +0200
|
||||
@@ -10,6 +10,7 @@
|
||||
* the COPYING file in the top-level directory.
|
||||
*
|
||||
*/
|
||||
+
|
||||
#include "virtio.h"
|
||||
#include "virtio-9p.h"
|
||||
#include "virtio-9p-xattr.h"
|
||||
@@ -20,6 +21,16 @@
|
||||
#include <sys/un.h>
|
||||
#include <attr/xattr.h>
|
||||
|
||||
+#ifndef AT_FDCWD
|
||||
+/* Copied from linux/include/linux/fcntl.h * because direct include fails */
|
||||
+#define AT_FDCWD -100 /* Special value used to indicate
|
||||
+ openat should use the current
|
||||
+ working directory. */
|
||||
+#define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
|
||||
+#define AT_REMOVEDIR 0x200 /* Remove directory instead of
|
||||
+ unlinking file. */
|
||||
+#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
|
||||
+#endif
|
||||
|
||||
static int local_lstat(FsContext *fs_ctx, const char *path, struct stat *stbuf)
|
||||
{
|
||||
@@ -1,11 +0,0 @@
|
||||
diff -Naur r8101-1.013.00.org/src/r8101_n.c r8101-1.013.00/src/r8101_n.c
|
||||
--- r8101-1.013.00.org/src/r8101_n.c 2009-07-14 09:10:53.000000000 +0200
|
||||
+++ r8101-1.013.00/src/r8101_n.c 2009-10-22 18:19:07.000000000 +0200
|
||||
@@ -103,6 +103,7 @@
|
||||
|
||||
static struct pci_device_id rtl8101_pci_tbl[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8136), },
|
||||
+ { 0x0001, 0x8168, PCI_ANY_ID, 0x2410, },
|
||||
{0,},
|
||||
};
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
diff -Naur r8169-6.017.00.org/src/r8169_n.c r8169-6.017.00/src/r8169_n.c
|
||||
--- r8169-6.017.00.org/src/r8169_n.c 2012-05-03 14:23:12.000000000 +0200
|
||||
+++ r8169-6.017.00/src/r8169_n.c 2012-10-14 12:43:52.478555777 +0200
|
||||
@@ -115,7 +115,12 @@
|
||||
static struct pci_device_id rtl8169_pci_tbl[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8167), 0, 0, RTL_CFG_0 },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), 0, 0, RTL_CFG_0 },
|
||||
- { PCI_VENDOR_ID_DLINK, 0x4300, PCI_VENDOR_ID_DLINK, 0x4c00, 0, 0, RTL_CFG_0 },
|
||||
+ { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8129), 0, 0, RTL_CFG_0 },
|
||||
+ { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4300), 0, 0, RTL_CFG_0 },
|
||||
+ { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4302), 0, 0, RTL_CFG_0 },
|
||||
+ { PCI_DEVICE(PCI_VENDOR_ID_AT, 0xC107), 0, 0, RTL_CFG_0 },
|
||||
+ { PCI_DEVICE(0x16EC, 0x0116), 0, 0, RTL_CFG_0 },
|
||||
+ { PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 },
|
||||
{0,},
|
||||
};
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
Submitted By: Archaic (archaic -aT- linuxfromscratch -DoT- org)
|
||||
Date: 2005-01-17
|
||||
Initial Package Version: 1.6.8p12
|
||||
Origin: Upstream CVS
|
||||
Upstream Status: In CVS
|
||||
Description: (CVE-2005-4158) Sudo before 1.6.8 p12, when the Perl taint flag is
|
||||
off, does not clear the PERLLIB, PERL5LIB, and PERL5OPT environment
|
||||
variables, which allows limited local users to cause a Perl script
|
||||
to include and execute arbitrary library files that have the same
|
||||
name as library files that are included by the script.
|
||||
Additionally, more variables beyond perl were added to the
|
||||
blacklist and comments were added to the variables.
|
||||
|
||||
diff -Naur sudo-1.6.8p12.orig/env.c sudo-1.6.8p12/env.c
|
||||
--- sudo-1.6.8p12.orig/env.c 2005-11-08 18:21:33.000000000 +0000
|
||||
+++ sudo-1.6.8p12/env.c 2006-01-18 00:35:17.000000000 +0000
|
||||
@@ -118,18 +118,31 @@
|
||||
"USR_ACE",
|
||||
"DLC_ACE",
|
||||
#endif /* HAVE_SECURID */
|
||||
- "TERMINFO",
|
||||
- "TERMINFO_DIRS",
|
||||
- "TERMPATH",
|
||||
+ "TERMINFO", /* terminfo, exclusive path to terminfo files */
|
||||
+ "TERMINFO_DIRS", /* terminfo, path(s) to terminfo files */
|
||||
+ "TERMPATH", /* termcap, path(s) to termcap files */
|
||||
"TERMCAP", /* XXX - only if it starts with '/' */
|
||||
- "ENV",
|
||||
- "BASH_ENV",
|
||||
- "PS4",
|
||||
- "SHELLOPTS",
|
||||
- "JAVA_TOOL_OPTIONS",
|
||||
- "PERLLIB",
|
||||
- "PERL5LIB",
|
||||
- "PERL5OPT",
|
||||
+ "ENV", /* ksh, file to source before script runs */
|
||||
+ "BASH_ENV", /* bash, file to source before script runs */
|
||||
+ "PS4", /* bash, prefix for lines in xtrace mode */
|
||||
+ "GLOBIGNORE", /* bash, globbing patterns to ignore */
|
||||
+ "SHELLOPTS", /* bash, extra command line options */
|
||||
+ "JAVA_TOOL_OPTIONS", /* java, extra command line options */
|
||||
+ "PERLIO_DEBUG ", /* perl, debugging output file */
|
||||
+ "PERLLIB", /* perl, search path for modules/includes */
|
||||
+ "PERL5LIB", /* perl 5, search path for modules/includes */
|
||||
+ "PERL5OPT", /* perl 5, extra command line options */
|
||||
+ "PERL5DB", /* perl 5, command used to load debugger */
|
||||
+ "FPATH", /* ksh, search path for functions */
|
||||
+ "NULLCMD", /* zsh, command for null file redirection */
|
||||
+ "READNULLCMD", /* zsh, command for null file redirection */
|
||||
+ "ZDOTDIR", /* zsh, search path for dot files */
|
||||
+ "TMPPREFIX", /* zsh, prefix for temporary files */
|
||||
+ "PYTHONHOME", /* python, module search path */
|
||||
+ "PYTHONPATH", /* python, search path */
|
||||
+ "PYTHONINSPEC", /* python, allow inspection */
|
||||
+ "RUBYLIB", /* ruby, library load path */
|
||||
+ "RUBYOPT", /* ruby, extra command line options */
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
diff -Naur udev-125.org/extras/volume_id/lib/ext.c udev-125/extras/volume_id/lib/ext.c
|
||||
--- udev-125.org/extras/volume_id/lib/ext.c 2008-07-18 16:26:55.000000000 +0200
|
||||
+++ udev-125/extras/volume_id/lib/ext.c 2012-06-25 00:52:40.976563010 +0200
|
||||
@@ -160,32 +160,31 @@
|
||||
goto found;
|
||||
}
|
||||
|
||||
- /* has journal */
|
||||
- if ((feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) != 0) {
|
||||
- /* "use on development code" is ext4dev */
|
||||
- if ((flags & EXT2_FLAGS_TEST_FILESYS) != 0) {
|
||||
- id->type = "ext4dev";
|
||||
- goto found;
|
||||
- }
|
||||
+ /* "use on development code" is ext4dev */
|
||||
+ if ((flags & EXT2_FLAGS_TEST_FILESYS) != 0) {
|
||||
+ id->type = "ext4dev";
|
||||
+ goto found;
|
||||
+ }
|
||||
|
||||
- /* incompatible ext3 features is ext4 */
|
||||
- if ((feature_ro_compat & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) != 0 ||
|
||||
- (feature_incompat & EXT3_FEATURE_INCOMPAT_UNSUPPORTED) != 0) {
|
||||
- id->type = "ext4";
|
||||
- goto found;
|
||||
- }
|
||||
+ /* incompatible ext3 features is ext4 */
|
||||
+ if ((feature_ro_compat & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) != 0 ||
|
||||
+ (feature_incompat & EXT3_FEATURE_INCOMPAT_UNSUPPORTED) != 0) {
|
||||
+ id->type = "ext4";
|
||||
+ goto found;
|
||||
+ }
|
||||
|
||||
+ /* has journal */
|
||||
+ if ((feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) != 0) {
|
||||
id->type = "ext3";
|
||||
goto found;
|
||||
} else {
|
||||
- /* no incompatible ext2 feature is ext2 */
|
||||
+ /* no incompatible ext2 feature is ext2 */
|
||||
if ((feature_ro_compat & EXT2_FEATURE_RO_COMPAT_UNSUPPORTED) == 0 &&
|
||||
(feature_incompat & EXT2_FEATURE_INCOMPAT_UNSUPPORTED) == 0) {
|
||||
id->type = "ext2";
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
-
|
||||
return -1;
|
||||
|
||||
found:
|
||||
@@ -1,50 +0,0 @@
|
||||
diff -Naur udev-141.org/udev/udev-event.c udev-141/udev/udev-event.c
|
||||
--- udev-141.org/udev/udev-event.c 2009-02-24 15:08:35.000000000 +0100
|
||||
+++ udev-141/udev/udev-event.c 2012-10-30 12:27:00.262833136 +0100
|
||||
@@ -486,45 +486,8 @@
|
||||
if (err == 0)
|
||||
rename_netif_kernel_log(ifr);
|
||||
else {
|
||||
- int loop;
|
||||
-
|
||||
- /* see if the destination interface name already exists */
|
||||
- if (errno != EEXIST) {
|
||||
- err(event->udev, "error changing netif name %s to %s: %m\n",
|
||||
- ifr.ifr_name, ifr.ifr_newname);
|
||||
- goto exit;
|
||||
- }
|
||||
-
|
||||
- /* free our own name, another process may wait for us */
|
||||
- util_strlcpy(ifr.ifr_newname, udev_device_get_sysname(dev), IFNAMSIZ);
|
||||
- util_strlcat(ifr.ifr_newname, "_rename", IFNAMSIZ);
|
||||
- err = ioctl(sk, SIOCSIFNAME, &ifr);
|
||||
- if (err != 0) {
|
||||
- err(event->udev, "error changing netif name %s to %s: %m\n",
|
||||
+ err(event->udev, "error changing netif name %s to %s: %m\n",
|
||||
ifr.ifr_name, ifr.ifr_newname);
|
||||
- goto exit;
|
||||
- }
|
||||
-
|
||||
- /* wait 90 seconds for our target to become available */
|
||||
- util_strlcpy(ifr.ifr_name, ifr.ifr_newname, IFNAMSIZ);
|
||||
- util_strlcpy(ifr.ifr_newname, event->name, IFNAMSIZ);
|
||||
- loop = 90 * 20;
|
||||
- while (loop--) {
|
||||
- err = ioctl(sk, SIOCSIFNAME, &ifr);
|
||||
- if (err == 0) {
|
||||
- rename_netif_kernel_log(ifr);
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- if (errno != EEXIST) {
|
||||
- err(event->udev, "error changing net interface name %s to %s: %m\n",
|
||||
- ifr.ifr_name, ifr.ifr_newname);
|
||||
- break;
|
||||
- }
|
||||
- dbg(event->udev, "wait for netif '%s' to become free, loop=%i\n",
|
||||
- event->name, (90 * 20) - loop);
|
||||
- usleep(1000 * 1000 / 20);
|
||||
- }
|
||||
}
|
||||
exit:
|
||||
close(sk);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,14 +0,0 @@
|
||||
diff -Naur v4l-dvb-20120916.org/linux/drivers/media/usb/dvb-usb-v2/rtl28xxu.c v4l-dvb-20120916/linux/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
|
||||
--- v4l-dvb-20120916.org/linux/drivers/media/usb/dvb-usb-v2/rtl28xxu.c 2012-09-16 05:46:03.000000000 +0200
|
||||
+++ v4l-dvb-20120916/linux/drivers/media/usb/dvb-usb-v2/rtl28xxu.c 2012-09-19 20:03:04.538168193 +0200
|
||||
@@ -1228,6 +1228,10 @@
|
||||
&rtl2832u_props, "G-Tek Electronics Group Lifeview LV5TDLX DVB-T", NULL) },
|
||||
{ DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_NOXON_DAB_STICK,
|
||||
&rtl2832u_props, "NOXON DAB/DAB+ USB dongle", NULL) },
|
||||
+ { DVB_USB_DEVICE(0x1d19, 0x1101,
|
||||
+ &rtl2832u_props, "DK DVB-T USB dongle", NULL) },
|
||||
+ { DVB_USB_DEVICE(0x1f4d, 0xc803,
|
||||
+ &rtl2832u_props, "Trekstor DVB-T DAB FM USB dongle", NULL) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, rtl28xxu_id_table);
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -Naur v4l-dvb-20120916.org/linux/drivers/media/usb/dvb-usb-v2/rtl28xxu.c v4l-dvb-20120916/linux/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
|
||||
--- v4l-dvb-20120916.org/linux/drivers/media/usb/dvb-usb-v2/rtl28xxu.c 2012-09-16 05:46:03.000000000 +0200
|
||||
+++ v4l-dvb-20120916/linux/drivers/media/usb/dvb-usb-v2/rtl28xxu.c 2012-10-24 13:48:13.113373414 +0200
|
||||
@@ -836,7 +836,7 @@
|
||||
if (onoff) {
|
||||
buf[0] = 0x00;
|
||||
buf[1] = 0x00;
|
||||
- usb_clear_halt(d->udev, usb_rcvbulkpipe(d->udev, 0x81));
|
||||
+// usb_clear_halt(d->udev, usb_rcvbulkpipe(d->udev, 0x81));
|
||||
} else {
|
||||
buf[0] = 0x10; /* stall EPA */
|
||||
buf[1] = 0x02; /* reset EPA */
|
||||
@@ -1,16 +0,0 @@
|
||||
diff -Naur v4l-dvb-20120916.org/linux/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c v4l-dvb-20120916/linux/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
|
||||
--- v4l-dvb-20120916.org/linux/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c 2012-08-16 05:45:24.000000000 +0200
|
||||
+++ v4l-dvb-20120916/linux/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c 2012-10-24 13:53:35.636726448 +0200
|
||||
@@ -287,9 +287,9 @@
|
||||
ret = adap->props->pid_filter(adap, dvbdmxfeed->index,
|
||||
dvbdmxfeed->pid, (count == 1) ? 1 : 0);
|
||||
if (ret < 0)
|
||||
- dev_err(&d->udev->dev, "%s: pid_filter() " \
|
||||
- "failed=%d\n", KBUILD_MODNAME,
|
||||
- ret);
|
||||
+// dev_err(&d->udev->dev, "%s: pid_filter() " \
|
||||
+// "failed=%d\n", KBUILD_MODNAME,
|
||||
+// ret);
|
||||
|
||||
/* start feeding if it is first pid */
|
||||
if (adap->feed_count == 1 && count == 1) {
|
||||
@@ -1,62 +0,0 @@
|
||||
Index: vdr-1.6.0/recording.c
|
||||
===================================================================
|
||||
--- vdr-1.6.0.orig/recording.c
|
||||
+++ vdr-1.6.0/recording.c
|
||||
@@ -509,8 +509,8 @@ cRecording::cRecording(cTimer *Timer, co
|
||||
Utf8Strn0Cpy(SubtitleBuffer, Subtitle, MAX_SUBTITLE_LENGTH);
|
||||
Subtitle = SubtitleBuffer;
|
||||
}
|
||||
- char *macroTITLE = strstr(Timer->File(), TIMERMACRO_TITLE);
|
||||
- char *macroEPISODE = strstr(Timer->File(), TIMERMACRO_EPISODE);
|
||||
+ const char *macroTITLE = strstr(Timer->File(), TIMERMACRO_TITLE);
|
||||
+ const char *macroEPISODE = strstr(Timer->File(), TIMERMACRO_EPISODE);
|
||||
if (macroTITLE || macroEPISODE) {
|
||||
name = strdup(Timer->File());
|
||||
name = strreplace(name, TIMERMACRO_TITLE, Title);
|
||||
@@ -551,7 +551,7 @@ cRecording::cRecording(const char *FileN
|
||||
sortBuffer = NULL;
|
||||
fileName = strdup(FileName);
|
||||
FileName += strlen(VideoDirectory) + 1;
|
||||
- char *p = strrchr(FileName, '/');
|
||||
+ const char *p = strrchr(FileName, '/');
|
||||
|
||||
name = NULL;
|
||||
info = new cRecordingInfo;
|
||||
@@ -1022,7 +1022,8 @@ void cRecordings::DelByName(const char *
|
||||
if (recording) {
|
||||
cThreadLock DeletedRecordingsLock(&DeletedRecordings);
|
||||
Del(recording, false);
|
||||
- char *ext = strrchr(recording->FileName(), '.');
|
||||
+ // wtf?
|
||||
+ char *ext = strrchr(const_cast<char*>(recording->FileName()), '.');
|
||||
if (ext) {
|
||||
strncpy(ext, DELEXT, strlen(ext));
|
||||
recording->fileSizeMB = DirSizeMB(recording->FileName());
|
||||
Index: vdr-1.6.0/svdrp.c
|
||||
===================================================================
|
||||
--- vdr-1.6.0.orig/svdrp.c
|
||||
+++ vdr-1.6.0/svdrp.c
|
||||
@@ -736,7 +736,7 @@ void cSVDRP::CmdGRAB(const char *Option)
|
||||
char *strtok_next;
|
||||
FileName = strtok_r(p, delim, &strtok_next);
|
||||
// image type:
|
||||
- char *Extension = strrchr(FileName, '.');
|
||||
+ const char *Extension = strrchr(FileName, '.');
|
||||
if (Extension) {
|
||||
if (strcasecmp(Extension, ".jpg") == 0 || strcasecmp(Extension, ".jpeg") == 0)
|
||||
Jpeg = true;
|
||||
@@ -796,12 +796,12 @@ void cSVDRP::CmdGRAB(const char *Option)
|
||||
if (FileName) {
|
||||
if (grabImageDir) {
|
||||
cString s;
|
||||
- char *slash = strrchr(FileName, '/');
|
||||
+ char *slash = strrchr(const_cast<char*>(FileName), '/');
|
||||
if (!slash) {
|
||||
s = AddDirectory(grabImageDir, FileName);
|
||||
FileName = s;
|
||||
}
|
||||
- slash = strrchr(FileName, '/'); // there definitely is one
|
||||
+ slash = strrchr(const_cast<char*>(FileName), '/'); // there definitely is one
|
||||
*slash = 0;
|
||||
char *r = realpath(FileName, RealFileName);
|
||||
*slash = '/';
|
||||
@@ -1,78 +0,0 @@
|
||||
diff -urNad vdr-plugin-epgsearch-0.9.24~/epgsearchsvdrp.c vdr-plugin-epgsearch-0.9.24/epgsearchsvdrp.c
|
||||
--- vdr-plugin-epgsearch-0.9.24~/epgsearchsvdrp.c 2008-04-13 20:53:44.000000000 +0200
|
||||
+++ vdr-plugin-epgsearch-0.9.24/epgsearchsvdrp.c 2009-10-26 20:27:07.000000000 +0100
|
||||
@@ -742,12 +742,13 @@
|
||||
{
|
||||
if (*Option)
|
||||
{
|
||||
- char* pipePos = strchr(Option, '|');
|
||||
+ const char* pipePos = strchr(Option, '|');
|
||||
if (pipePos)
|
||||
{
|
||||
- *pipePos = 0;
|
||||
- const char* oldName = Option;
|
||||
- const char* newName = pipePos+1;
|
||||
+ int index = pipePos - Option;
|
||||
+ char* oldName = strdup(Option);
|
||||
+ *(oldName + index) = 0;
|
||||
+ const char* newName = oldName + index + 1;
|
||||
if (strlen(oldName) > 0 && strlen(newName) > 0)
|
||||
{
|
||||
cChannelGroup *changrp = ChannelGroups.GetGroupByName(Option);
|
||||
@@ -769,15 +770,18 @@
|
||||
}
|
||||
ChannelGroups.Save();
|
||||
SearchExts.Save();
|
||||
+ free(oldName);
|
||||
return cString::sprintf("renamed channel group '%s' to '%s'", oldName, newName);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
+ free(oldName);
|
||||
ReplyCode = 901;
|
||||
return cString::sprintf("channel group '%s' not defined", Option);
|
||||
}
|
||||
}
|
||||
+ free(oldName);
|
||||
}
|
||||
ReplyCode = 901;
|
||||
return cString("Error in channel group parameters");
|
||||
diff -urNad vdr-plugin-epgsearch-0.9.24~/epgsearchtools.c vdr-plugin-epgsearch-0.9.24/epgsearchtools.c
|
||||
--- vdr-plugin-epgsearch-0.9.24~/epgsearchtools.c 2008-04-13 20:53:42.000000000 +0200
|
||||
+++ vdr-plugin-epgsearch-0.9.24/epgsearchtools.c 2009-10-26 20:27:07.000000000 +0100
|
||||
@@ -743,7 +743,7 @@
|
||||
while(tmp)
|
||||
{
|
||||
// extract a single line
|
||||
- char* lf = strchr(tmp, '\n');
|
||||
+ const char* lf = strchr(tmp, '\n');
|
||||
char* line = NULL;
|
||||
if (lf)
|
||||
line = strndup(tmp, lf-tmp);
|
||||
diff -urNad vdr-plugin-epgsearch-0.9.24~/menu_dirselect.c vdr-plugin-epgsearch-0.9.24/menu_dirselect.c
|
||||
--- vdr-plugin-epgsearch-0.9.24~/menu_dirselect.c 2008-04-13 20:53:44.000000000 +0200
|
||||
+++ vdr-plugin-epgsearch-0.9.24/menu_dirselect.c 2009-10-26 20:27:07.000000000 +0100
|
||||
@@ -83,7 +83,7 @@
|
||||
return 1;
|
||||
do
|
||||
{
|
||||
- char* pos = strchr(szDir, '~');
|
||||
+ const char* pos = strchr(szDir, '~');
|
||||
if (pos)
|
||||
{
|
||||
iLevel++;
|
||||
diff -urNad vdr-plugin-epgsearch-0.9.24~/searchtimer_thread.c vdr-plugin-epgsearch-0.9.24/searchtimer_thread.c
|
||||
--- vdr-plugin-epgsearch-0.9.24~/searchtimer_thread.c 2008-04-28 18:22:31.000000000 +0200
|
||||
+++ vdr-plugin-epgsearch-0.9.24/searchtimer_thread.c 2009-10-26 20:27:28.000000000 +0100
|
||||
@@ -565,8 +565,8 @@
|
||||
if (!isempty(aux))
|
||||
{
|
||||
tmpaux = strdup(aux);
|
||||
- char* begin = strstr(aux, "<epgsearch>");
|
||||
- char* end = strstr(aux, "</epgsearch>");
|
||||
+ const char* begin = strstr(aux, "<epgsearch>");
|
||||
+ const char* end = strstr(aux, "</epgsearch>");
|
||||
if (begin && end)
|
||||
{
|
||||
if (begin == aux) strcpy(tmpaux, ""); else strn0cpy(tmpaux, aux, begin-aux+1);
|
||||
Reference in New Issue
Block a user