summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-09-21 15:49:37 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-09-21 15:49:37 +0000
commitae08410274473c5ab78d300ea2365c4b1070cc61 (patch)
treeb7c8ba3dee66edfadb32e57332ed76025981c94d /core
parentd739da01541d53414129d3171df221cfe2440fe5 (diff)
Wed Sep 21 15:49:35 UTC 2011
Diffstat (limited to 'core')
-rw-r--r--core/glibc/glibc-2.14-fix-resolver-crash-typo.patch22
-rw-r--r--core/glibc/glibc-2.14-revert-4462fad3.patch37
-rw-r--r--core/openssh/authfile.c.patch198
-rw-r--r--core/util-linux/mount-segfault-2.19.1.patch84
-rw-r--r--core/util-linux/two-component-linux.patch32
5 files changed, 0 insertions, 373 deletions
diff --git a/core/glibc/glibc-2.14-fix-resolver-crash-typo.patch b/core/glibc/glibc-2.14-fix-resolver-crash-typo.patch
deleted file mode 100644
index b5d86c7d2..000000000
--- a/core/glibc/glibc-2.14-fix-resolver-crash-typo.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/resolv/res_send.c b/resolv/res_send.c
-index 97142b7..a001c1e 100644
---- a/resolv/res_send.c
-+++ b/resolv/res_send.c
-@@ -549,7 +549,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
- ns, ansp, ansp2, nansp2, resplen2);
- if (n < 0)
- return (-1);
-- if (n == 0 && (buf2 == NULL || resplen2 == 0))
-+ if (n == 0 && (buf2 == NULL || *resplen2 == 0))
- goto next_ns;
- } else {
- /* Use datagrams. */
-@@ -559,7 +559,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
- ansp2, nansp2, resplen2);
- if (n < 0)
- return (-1);
-- if (n == 0 && (buf2 == NULL || resplen2 == 0))
-+ if (n == 0 && (buf2 == NULL || *resplen2 == 0))
- goto next_ns;
- if (v_circuit)
- // XXX Check whether both requests failed or
diff --git a/core/glibc/glibc-2.14-revert-4462fad3.patch b/core/glibc/glibc-2.14-revert-4462fad3.patch
deleted file mode 100644
index d71e37492..000000000
--- a/core/glibc/glibc-2.14-revert-4462fad3.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff -Naur glibc-orig//resolv/res_send.c glibc/resolv/res_send.c
---- glibc-orig//resolv/res_send.c 2011-06-10 18:59:03.041436996 +1000
-+++ glibc/resolv/res_send.c 2011-06-10 19:08:09.379309323 +1000
-@@ -549,7 +549,7 @@
- ns, ansp, ansp2, nansp2, resplen2);
- if (n < 0)
- return (-1);
-- if (n == 0 && (buf2 == NULL || resplen2 == 0))
-+ if (n == 0)
- goto next_ns;
- } else {
- /* Use datagrams. */
-@@ -559,7 +559,7 @@
- ansp2, nansp2, resplen2);
- if (n < 0)
- return (-1);
-- if (n == 0 && (buf2 == NULL || resplen2 == 0))
-+ if (n == 0)
- goto next_ns;
- if (v_circuit)
- // XXX Check whether both requests failed or
-@@ -1275,14 +1275,10 @@
- (*thisresplenp > *thisanssizp)
- ? *thisanssizp : *thisresplenp);
-
-- if (recvresp1 || (buf2 != NULL && recvresp2)) {
-- *resplen2 = 0;
-+ if (recvresp1 || (buf2 != NULL && recvresp2))
- return resplen;
-- }
- if (buf2 != NULL)
- {
-- /* No data from the first reply. */
-- resplen = 0;
- /* We are waiting for a possible second reply. */
- if (hp->id == anhp->id)
- recvresp1 = 1;
diff --git a/core/openssh/authfile.c.patch b/core/openssh/authfile.c.patch
deleted file mode 100644
index 6c18fe807..000000000
--- a/core/openssh/authfile.c.patch
+++ /dev/null
@@ -1,198 +0,0 @@
-diff -aur old/authfile.c new/authfile.c
---- old/authfile.c 2011-06-12 02:21:52.262338254 +0200
-+++ new/authfile.c 2011-06-12 02:13:43.051467269 +0200
-@@ -1,4 +1,4 @@
--/* $OpenBSD: authfile.c,v 1.87 2010/11/29 18:57:04 markus Exp $ */
-+/* $OpenBSD: authfile.c,v 1.95 2011/05/29 11:42:08 djm Exp $ */
- /*
- * Author: Tatu Ylonen <ylo@cs.hut.fi>
- * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
-@@ -69,6 +69,8 @@
- #include "misc.h"
- #include "atomicio.h"
-
-+#define MAX_KEY_FILE_SIZE (1024 * 1024)
-+
- /* Version identification string for SSH v1 identity files. */
- static const char authfile_id_string[] =
- "SSH PRIVATE KEY FILE FORMAT 1.1\n";
-@@ -312,12 +314,12 @@
- return pub;
- }
-
--/* Load the contents of a key file into a buffer */
--static int
-+/* Load a key from a fd into a buffer */
-+int
- key_load_file(int fd, const char *filename, Buffer *blob)
- {
-+ u_char buf[1024];
- size_t len;
-- u_char *cp;
- struct stat st;
-
- if (fstat(fd, &st) < 0) {
-@@ -325,30 +327,45 @@
- filename == NULL ? "" : filename,
- filename == NULL ? "" : " ",
- strerror(errno));
-- close(fd);
- return 0;
- }
-- if (st.st_size > 1*1024*1024) {
-+ if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 &&
-+ st.st_size > MAX_KEY_FILE_SIZE) {
-+ toobig:
- error("%s: key file %.200s%stoo large", __func__,
- filename == NULL ? "" : filename,
- filename == NULL ? "" : " ");
-- close(fd);
- return 0;
- }
-- len = (size_t)st.st_size; /* truncated */
--
- buffer_init(blob);
-- cp = buffer_append_space(blob, len);
--
-- if (atomicio(read, fd, cp, len) != len) {
-- debug("%s: read from key file %.200s%sfailed: %.100s", __func__,
-- filename == NULL ? "" : filename,
-- filename == NULL ? "" : " ",
-- strerror(errno));
-+ for (;;) {
-+ if ((len = atomicio(read, fd, buf, sizeof(buf))) == 0) {
-+ if (errno == EPIPE)
-+ break;
-+ debug("%s: read from key file %.200s%sfailed: %.100s",
-+ __func__, filename == NULL ? "" : filename,
-+ filename == NULL ? "" : " ", strerror(errno));
-+ buffer_clear(blob);
-+ bzero(buf, sizeof(buf));
-+ return 0;
-+ }
-+ buffer_append(blob, buf, len);
-+ if (buffer_len(blob) > MAX_KEY_FILE_SIZE) {
-+ buffer_clear(blob);
-+ bzero(buf, sizeof(buf));
-+ goto toobig;
-+ }
-+ }
-+ bzero(buf, sizeof(buf));
-+ if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 &&
-+ st.st_size != buffer_len(blob)) {
-+ debug("%s: key file %.200s%schanged size while reading",
-+ __func__, filename == NULL ? "" : filename,
-+ filename == NULL ? "" : " ");
- buffer_clear(blob);
-- close(fd);
- return 0;
- }
-+
- return 1;
- }
-
-@@ -606,7 +623,7 @@
- error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
- error("Permissions 0%3.3o for '%s' are too open.",
- (u_int)st.st_mode & 0777, filename);
-- error("It is recommended that your private key files are NOT accessible by others.");
-+ error("It is required that your private key files are NOT accessible by others.");
- error("This private key will be ignored.");
- return 0;
- }
-@@ -626,6 +643,7 @@
- case KEY_UNSPEC:
- return key_parse_private_pem(blob, type, passphrase, commentp);
- default:
-+ error("%s: cannot parse key type %d", __func__, type);
- break;
- }
- return NULL;
-@@ -670,11 +688,38 @@
- }
-
- Key *
-+key_parse_private(Buffer *buffer, const char *filename,
-+ const char *passphrase, char **commentp)
-+{
-+ Key *pub, *prv;
-+ Buffer pubcopy;
-+
-+ buffer_init(&pubcopy);
-+ buffer_append(&pubcopy, buffer_ptr(buffer), buffer_len(buffer));
-+ /* it's a SSH v1 key if the public key part is readable */
-+ pub = key_parse_public_rsa1(&pubcopy, commentp);
-+ buffer_free(&pubcopy);
-+ if (pub == NULL) {
-+ prv = key_parse_private_type(buffer, KEY_UNSPEC,
-+ passphrase, NULL);
-+ /* use the filename as a comment for PEM */
-+ if (commentp && prv)
-+ *commentp = xstrdup(filename);
-+ } else {
-+ key_free(pub);
-+ /* key_parse_public_rsa1() has already loaded the comment */
-+ prv = key_parse_private_type(buffer, KEY_RSA1, passphrase,
-+ NULL);
-+ }
-+ return prv;
-+}
-+
-+Key *
- key_load_private(const char *filename, const char *passphrase,
- char **commentp)
- {
-- Key *pub, *prv;
-- Buffer buffer, pubcopy;
-+ Key *prv;
-+ Buffer buffer;
- int fd;
-
- fd = open(filename, O_RDONLY);
-@@ -697,23 +742,7 @@
- }
- close(fd);
-
-- buffer_init(&pubcopy);
-- buffer_append(&pubcopy, buffer_ptr(&buffer), buffer_len(&buffer));
-- /* it's a SSH v1 key if the public key part is readable */
-- pub = key_parse_public_rsa1(&pubcopy, commentp);
-- buffer_free(&pubcopy);
-- if (pub == NULL) {
-- prv = key_parse_private_type(&buffer, KEY_UNSPEC,
-- passphrase, NULL);
-- /* use the filename as a comment for PEM */
-- if (commentp && prv)
-- *commentp = xstrdup(filename);
-- } else {
-- key_free(pub);
-- /* key_parse_public_rsa1() has already loaded the comment */
-- prv = key_parse_private_type(&buffer, KEY_RSA1, passphrase,
-- NULL);
-- }
-+ prv = key_parse_private(&buffer, filename, passphrase, commentp);
- buffer_free(&buffer);
- return prv;
- }
-@@ -737,13 +766,19 @@
- case '\0':
- continue;
- }
-+ /* Abort loading if this looks like a private key */
-+ if (strncmp(cp, "-----BEGIN", 10) == 0)
-+ break;
- /* Skip leading whitespace. */
- for (; *cp && (*cp == ' ' || *cp == '\t'); cp++)
- ;
- if (*cp) {
- if (key_read(k, &cp) == 1) {
-- if (commentp)
-- *commentp=xstrdup(filename);
-+ cp[strcspn(cp, "\r\n")] = '\0';
-+ if (commentp) {
-+ *commentp = xstrdup(*cp ?
-+ cp : filename);
-+ }
- fclose(f);
- return 1;
- }
diff --git a/core/util-linux/mount-segfault-2.19.1.patch b/core/util-linux/mount-segfault-2.19.1.patch
deleted file mode 100644
index 7bcb3bc05..000000000
--- a/core/util-linux/mount-segfault-2.19.1.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From f53edda83ebcfd7015c3f35196d6cbd7bc2d8369 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Wed, 11 May 2011 16:57:27 +0200
-Subject: [PATCH] mount: -a segfaults when 4th field is omitted (mount
- options)
-
- # echo 'tmpd /tmp/x tmpfs' >> /etc/fstab
- # mkdir /tmp/x
- # mount -a
- segfault
-
-Reported-by: Mike Frysinger <vapier@gentoo.org>
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- mount/mount.c | 8 +++++---
- mount/mount_mntent.c | 5 +++--
- mount/sundries.c | 2 ++
- 3 files changed, 10 insertions(+), 5 deletions(-)
-
-diff --git a/mount/mount.c b/mount/mount.c
-index ba71149..29963c2 100644
---- a/mount/mount.c
-+++ b/mount/mount.c
-@@ -1163,7 +1163,9 @@ is_mounted_same_loopfile(const char *node0, const char *loopfile, unsigned long
- res = loopfile_used_with((char *) mnt->m.mnt_fsname,
- loopfile, offset);
-
-- else if ((p = strstr(mnt->m.mnt_opts, "loop="))) {
-+ else if (mnt->m.mnt_opts &&
-+ (p = strstr(mnt->m.mnt_opts, "loop=")))
-+ {
- char *dev = xstrdup(p+5);
- if ((p = strchr(dev, ',')))
- *p = '\0';
-@@ -2052,8 +2054,8 @@ is_fstab_entry_mounted(struct mntentchn *mc, int verbose)
- goto yes;
-
- /* extra care for loop devices */
-- if ((strstr(mc->m.mnt_opts, "loop=") ||
-- (stat(mc->m.mnt_fsname, &st) == 0 && S_ISREG(st.st_mode)))) {
-+ if ((mc->m.mnt_opts && strstr(mc->m.mnt_opts, "loop=")) ||
-+ (stat(mc->m.mnt_fsname, &st) == 0 && S_ISREG(st.st_mode))) {
-
- char *p = get_option_value(mc->m.mnt_opts, "offset=");
- uintmax_t offset = 0;
-diff --git a/mount/mount_mntent.c b/mount/mount_mntent.c
-index d90def3..f42c0ad 100644
---- a/mount/mount_mntent.c
-+++ b/mount/mount_mntent.c
-@@ -70,7 +70,7 @@ my_addmntent (mntFILE *mfp, struct my_mntent *mnt) {
- m1 = mangle(mnt->mnt_fsname);
- m2 = mangle(mnt->mnt_dir);
- m3 = mangle(mnt->mnt_type);
-- m4 = mangle(mnt->mnt_opts);
-+ m4 = mnt->mnt_opts ? mangle(mnt->mnt_opts) : "rw";
-
- res = fprintf (mfp->mntent_fp, "%s %s %s %s %d %d\n",
- m1, m2, m3, m4, mnt->mnt_freq, mnt->mnt_passno);
-@@ -78,7 +78,8 @@ my_addmntent (mntFILE *mfp, struct my_mntent *mnt) {
- free(m1);
- free(m2);
- free(m3);
-- free(m4);
-+ if (mnt->mnt_opts)
-+ free(m4);
- return (res < 0) ? 1 : 0;
- }
-
-diff --git a/mount/sundries.c b/mount/sundries.c
-index ae4501a..2dec37f 100644
---- a/mount/sundries.c
-+++ b/mount/sundries.c
-@@ -217,6 +217,8 @@ matching_opts (const char *options, const char *test_opts) {
-
- if (test_opts == NULL)
- return 1;
-+ if (options == NULL)
-+ options = "";
-
- len = strlen(test_opts);
- q = alloca(len+1);
---
-1.7.5.1
-
diff --git a/core/util-linux/two-component-linux.patch b/core/util-linux/two-component-linux.patch
deleted file mode 100644
index 1b65ca295..000000000
--- a/core/util-linux/two-component-linux.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From fa7e0d6d442de9f5940f99fd93f4522602439131 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 6 Jun 2011 12:35:26 +0200
-Subject: [PATCH] lib: [linux_version.c] accommodate two-component linux
- version (e.g. 3.0)
-
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- lib/linux_version.c | 6 +++---
- 1 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/lib/linux_version.c b/lib/linux_version.c
-index f9fbd8d..ada566a 100644
---- a/lib/linux_version.c
-+++ b/lib/linux_version.c
-@@ -16,10 +16,10 @@ get_linux_version (void)
- return kver;
- if (uname (&uts))
- kver = 0;
-- else if (sscanf (uts.release, "%d.%d.%d", &major, &minor, &teeny) != 3)
-- kver = 0;
-- else
-+ else if (sscanf (uts.release, "%d.%d.%d", &major, &minor, &teeny) == 3)
- kver = KERNEL_VERSION (major, minor, teeny);
-+ else if (sscanf (uts.release, "%d.%d", &major, &minor) == 2)
-+ kver = KERNEL_VERSION (major, minor, 0);
-
- return kver;
- }
---
-1.7.6
-