From mboxrd@z Thu Jan 1 00:00:00 1970 From: git@ipfire.org To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 3.x development tree branch, master, updated. 5447802fdc59ea866d6287d82e0f6920443c2816 Date: Wed, 12 Sep 2012 19:39:45 +0200 Message-ID: <20120912173945.B787C20094@argus.ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4709208684302089331==" List-Id: --===============4709208684302089331== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree". The branch, master has been updated via 5447802fdc59ea866d6287d82e0f6920443c2816 (commit) from 0038068c61ce274ca414b29020f3314a0247bb64 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5447802fdc59ea866d6287d82e0f6920443c2816 Author: Michael Tremer Date: Wed Sep 12 19:39:13 2012 +0200 patch: Update to 2.7. ----------------------------------------------------------------------- Summary of changes: patch/patch.nm | 8 +- patch/patches/patch-2.5.4-sigsegv.patch | 42 ----- patch/patches/patch-2.6.1-CVE-2010-4651.patch | 164 ------------------- patch/patches/patch-2.6.1-backup-if-mismatch.patch | 31 ---- patch/patches/patch-2.6.1-get-arg.patch | 12 -- patch/patches/patch-selinux.patch | 171 ------------------= -- 6 files changed, 5 insertions(+), 423 deletions(-) delete mode 100644 patch/patches/patch-2.5.4-sigsegv.patch delete mode 100644 patch/patches/patch-2.6.1-CVE-2010-4651.patch delete mode 100644 patch/patches/patch-2.6.1-backup-if-mismatch.patch delete mode 100644 patch/patches/patch-2.6.1-get-arg.patch delete mode 100644 patch/patches/patch-selinux.patch Difference in files: diff --git a/patch/patch.nm b/patch/patch.nm index 1dfa927..48b6687 100644 --- a/patch/patch.nm +++ b/patch/patch.nm @@ -4,8 +4,8 @@ ############################################################################= ### =20 name =3D patch -version =3D 2.6.1 -release =3D 3 +version =3D 2.7 +release =3D 1 =20 groups =3D Development/Tools url =3D http://www.gnu.org/software/patch/patch.html @@ -20,10 +20,12 @@ description diff file to add the changes to their original file. end =20 -source_dl =3D +source_dl =3D ftp://ftp.gnu.org/gnu/patch/ +sources =3D %{thisapp}.tar.xz =20 build requires + attr-devel ed libselinux-devel pkg-config diff --git a/patch/patches/patch-2.5.4-sigsegv.patch b/patch/patches/patch-2.= 5.4-sigsegv.patch deleted file mode 100644 index c018153..0000000 --- a/patch/patches/patch-2.5.4-sigsegv.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -up patch-2.6/src/inp.c.sigsegv patch-2.6/src/inp.c ---- patch-2.6/src/inp.c.sigsegv 2009-11-02 19:09:57.000000000 +0000 -+++ patch-2.6/src/inp.c 2009-11-16 09:31:52.305022200 +0000 -@@ -77,6 +77,14 @@ re_input (void) - } - } -=20 -+void -+reset_scan_input_vars() -+{ -+ using_plan_a =3D 1; -+ i_buffer =3D NULL; -+ i_ptr =3D NULL; -+} -+ - /* Construct the line index, somehow or other. */ -=20 - void -diff -up patch-2.6/src/inp.h.sigsegv patch-2.6/src/inp.h ---- patch-2.6/src/inp.h.sigsegv 2009-11-02 19:09:57.000000000 +0000 -+++ patch-2.6/src/inp.h 2009-11-16 09:32:24.440021838 +0000 -@@ -24,4 +24,5 @@ XTERN LINENUM input_lines; /* how long=20 - char const *ifetch (LINENUM, bool, size_t *); - void get_input_file (char const *, char const *); - void re_input (void); -+void reset_scan_input_vars (void); - void scan_input (char *); -diff -up patch-2.6/src/patch.c.sigsegv patch-2.6/src/patch.c ---- patch-2.6/src/patch.c.sigsegv 2009-11-02 19:09:57.000000000 +0000 -+++ patch-2.6/src/patch.c 2009-11-16 09:31:52.306021801 +0000 -@@ -210,7 +210,10 @@ main (int argc, char **argv) -=20 - /* find out where all the lines are */ - if (!skip_rest_of_patch) -- scan_input (inname); -+ scan_input (inname); -+ else -+ reset_scan_input_vars (); -+ =20 -=20 - /* from here on, open no standard i/o files, because malloc */ - /* might misfire and we can't catch it easily */ diff --git a/patch/patches/patch-2.6.1-CVE-2010-4651.patch b/patch/patches/pa= tch-2.6.1-CVE-2010-4651.patch deleted file mode 100644 index 3f2de6a..0000000 --- a/patch/patches/patch-2.6.1-CVE-2010-4651.patch +++ /dev/null @@ -1,164 +0,0 @@ -diff -up patch-2.6.1/Makefile.in.CVE-2010-4651 patch-2.6.1/Makefile.in ---- patch-2.6.1/Makefile.in.CVE-2010-4651 2009-12-30 12:56:30.000000000 +0000 -+++ patch-2.6.1/Makefile.in 2011-02-10 12:29:32.926361705 +0000 -@@ -192,6 +192,7 @@ installcheck:: - TESTS =3D \ - tests/asymmetric-hunks \ - tests/backup-prefix-suffix \ -+ tests/bad-filenames \ - tests/corrupt-reject-files \ - tests/create-delete \ - tests/crlf-handling \ -diff -up patch-2.6.1/src/common.h.CVE-2010-4651 patch-2.6.1/src/common.h ---- patch-2.6.1/src/common.h.CVE-2010-4651 2011-02-10 12:30:29.142797627 +00= 00 -+++ patch-2.6.1/src/common.h 2011-02-10 12:30:33.566989729 +0000 -@@ -169,6 +169,7 @@ XTERN char *revision; /* prerequisite=20 - #endif -=20 - void fatal_exit (int) __attribute__ ((noreturn)); -+void validate_target_name (char const *n); -=20 - #include - #if !STDC_HEADERS && !defined errno -diff -up patch-2.6.1/src/patch.c.CVE-2010-4651 patch-2.6.1/src/patch.c ---- patch-2.6.1/src/patch.c.CVE-2010-4651 2011-02-10 12:30:20.721432124 +0000 -+++ patch-2.6.1/src/patch.c 2011-02-10 12:30:33.567989772 +0000 -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include -=20 - /* procedures */ -=20 -@@ -916,6 +917,26 @@ numeric_string (char const *string, - return value; - } -=20 -+void -+validate_target_name (char const *n) -+{ -+ char const *p =3D n; -+ if (explicit_inname) -+ return; -+ if (IS_ABSOLUTE_FILE_NAME (p)) -+ fatal ("rejecting absolute target file name: %s", quotearg (p)); -+ while (*p) -+ { -+ if (*p =3D=3D '.' && *++p =3D=3D '.' && ( ! *++p || ISSLASH (*p))) -+ fatal ("rejecting target file name with \"..\" component: %s", -+ quotearg (n)); -+ while (*p && ! ISSLASH (*p)) -+ p++; -+ while (ISSLASH (*p)) -+ p++; -+ } -+} -+ - /* Attempt to find the right place to apply this hunk of patch. */ -=20 - static LINENUM -diff -up patch-2.6.1/src/pch.c.CVE-2010-4651 patch-2.6.1/src/pch.c ---- patch-2.6.1/src/pch.c.CVE-2010-4651 2009-12-30 12:56:30.000000000 +0000 -+++ patch-2.6.1/src/pch.c 2011-02-10 12:30:33.573990033 +0000 -@@ -3,7 +3,7 @@ - /* Copyright (C) 1986, 1987, 1988 Larry Wall -=20 - Copyright (C) 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2001, -- 2002, 2003, 2006, 2009 Free Software Foundation, Inc. -+ 2002, 2003, 2006, 2009, 2011 Free Software Foundation, Inc. -=20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -@@ -199,6 +199,8 @@ maybe_reverse (char const *name, bool no - { - bool looks_reversed =3D (! is_empty) < p_says_nonexistent[reverse ^ is_em= pty]; -=20 -+ validate_target_name (name); -+ - if (looks_reversed) - reverse ^=3D - ok_to_reverse ("The next patch%s would %s the file %s,\nwhich %s!", -@@ -725,6 +727,7 @@ intuit_diff_type (bool need_header) - inerrno =3D stat_errno[i]; - invc =3D version_controlled[i]; - instat =3D st[i]; -+ validate_target_name (inname); - } -=20 - return retval; -diff -up patch-2.6.1/tests/bad-filenames.CVE-2010-4651 patch-2.6.1/tests/bad= -filenames ---- patch-2.6.1/tests/bad-filenames.CVE-2010-4651 2011-02-10 12:29:32.931361= 921 +0000 -+++ patch-2.6.1/tests/bad-filenames 2011-02-10 12:30:33.576990163 +0000 -@@ -0,0 +1,71 @@ -+# Copyright (C) 2011 Free Software Foundation, Inc. -+# -+# Copying and distribution of this file, with or without modification, -+# in any medium, are permitted without royalty provided the copyright -+# notice and this notice are preserved. -+ -+. $srcdir/test-lib.sh -+ -+use_local_patch -+use_tmpdir -+ -+# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -+ -+emit_2() -+{ -+cat < target -+check 'emit_2 /abs/path target | patch -R -p0; echo status: $?' < - #include -=20 -+#include -+ - #include - #if ! defined S_ISDIR && defined S_IFDIR - # define S_ISDIR(m) (((m) & S_IFMT) =3D=3D S_IFDIR) -@@ -118,6 +120,7 @@ XTERN char *outfile; - XTERN int inerrno; - XTERN int invc; - XTERN struct stat instat; -+XTERN security_context_t incontext; - XTERN bool dry_run; - XTERN bool posixly_correct; -=20 -diff -up patch-2.6.1/src/inp.c.selinux patch-2.6.1/src/inp.c ---- patch-2.6.1/src/inp.c.selinux 2011-02-08 11:29:34.576271352 +0000 -+++ patch-2.6.1/src/inp.c 2011-02-08 11:29:34.604271627 +0000 -@@ -152,8 +152,18 @@ get_input_file (char const *filename, ch - char *diffbuf; - char *getbuf; -=20 -- if (inerrno =3D=3D -1) -- inerrno =3D stat (filename, &instat) =3D=3D 0 ? 0 : errno; -+ inerrno =3D stat (filename, &instat) =3D=3D 0 ? 0 : errno; -+ if (inerrno =3D=3D 0) -+ { -+ inerrno =3D getfilecon (inname, &incontext) =3D=3D -1 ? errno : 0; -+ if (inerrno =3D=3D ENODATA || inerrno =3D=3D ENOTSUP) -+ { -+ inerrno =3D 0; -+ incontext =3D NULL; -+ } -+ } -+ else -+ incontext =3D NULL; -=20 - /* Perhaps look for RCS or SCCS versions. */ - if (patch_get -@@ -197,7 +207,7 @@ get_input_file (char const *filename, ch - } -=20 - if (cs && version_get (filename, cs, ! inerrno, elsewhere, getbuf, -- &instat)) -+ &instat, &incontext)) - inerrno =3D 0; -=20 - free (getbuf); -@@ -209,6 +219,7 @@ get_input_file (char const *filename, ch - { - instat.st_mode =3D S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH; - instat.st_size =3D 0; -+ incontext =3D NULL; - } - else if (! S_ISREG (instat.st_mode)) - fatal ("File %s is not a regular file -- can't patch", -diff -up patch-2.6.1/src/patch.c.selinux patch-2.6.1/src/patch.c ---- patch-2.6.1/src/patch.c.selinux 2011-02-08 11:29:34.586271450 +0000 -+++ patch-2.6.1/src/patch.c 2011-02-08 11:29:34.606271646 +0000 -@@ -421,6 +421,21 @@ main (int argc, char **argv) - /* Fails if we are not in group instat.st_gid. */ - chown (outname, -1, instat.st_gid); - } -+ -+ if (! inerrno && incontext) -+ { -+ security_context_t outcontext; -+ if (getfilecon (outname, &outcontext) !=3D -1 && -+ outcontext && -+ strcmp(outcontext, incontext) &&=20 -+ setfilecon (outname, incontext) !=3D 0) -+ { -+ if (errno !=3D ENOTSUP && errno !=3D EPERM) -+ pfatal ("Can't set security context " -+ "on file %s", quotearg (outname)); -+ } -+ } -+ - /* FIXME: There may be other attributes to preserve. */ - } - } -diff -up patch-2.6.1/src/pch.c.selinux patch-2.6.1/src/pch.c ---- patch-2.6.1/src/pch.c.selinux 2011-02-08 11:29:34.591271499 +0000 -+++ patch-2.6.1/src/pch.c 2011-02-08 11:30:08.810621570 +0000 -@@ -307,7 +307,12 @@ there_is_another_patch (bool need_header - inname[t - buf - 1] =3D 0; - if (stat (inname, &instat) =3D=3D 0) - { -- inerrno =3D 0; -+ inerrno =3D getfilecon (inname, &incontext) =3D=3D -1 ? errno : 0; -+ if (inerrno =3D=3D ENODATA || inerrno =3D=3D ENOTSUP) -+ { -+ inerrno =3D 0; -+ incontext =3D NULL; -+ } - invc =3D -1; - } - else -@@ -681,7 +686,7 @@ intuit_diff_type (bool need_header) - if (cs) - { - if (version_get (p_name[i], cs, false, readonly, -- getbuf, &st[i])) -+ getbuf, &st[i], NULL)) - stat_errno[i] =3D 0; - else - version_controlled[i] =3D 0; -@@ -746,6 +751,7 @@ intuit_diff_type (bool need_header) - invc =3D version_controlled[i]; - instat =3D st[i]; - validate_target_name (inname); -+ getfilecon (inname, &incontext); - } -=20 - return retval; -diff -up patch-2.6.1/src/util.c.selinux patch-2.6.1/src/util.c ---- patch-2.6.1/src/util.c.selinux 2009-11-02 19:09:57.000000000 +0000 -+++ patch-2.6.1/src/util.c 2011-02-08 11:29:34.613271715 +0000 -@@ -574,7 +574,8 @@ version_controller (char const *filename - Return true if successful. */ - bool - version_get (char const *filename, char const *cs, bool exists, bool readon= ly, -- char const *getbuf, struct stat *filestat) -+ char const *getbuf, struct stat *filestat, -+ security_context_t *filecontext) - { - if (patch_get < 0) - { -@@ -599,6 +600,13 @@ version_get (char const *filename, char=20 - fatal ("Can't get file %s from %s", quotearg (filename), cs); - if (stat (filename, filestat) !=3D 0) - pfatal ("%s", quotearg (filename)); -+ if (filecontext && getfilecon (filename, filecontext) =3D=3D -1) -+ { -+ if (errno =3D=3D ENODATA || errno =3D=3D ENOTSUP) -+ *filecontext =3D NULL; -+ else -+ pfatal ("%s", quotearg (filename)); -+ } - } -=20 - return 1; -diff -up patch-2.6.1/src/util.h.selinux patch-2.6.1/src/util.h ---- patch-2.6.1/src/util.h.selinux 2009-11-02 19:09:57.000000000 +0000 -+++ patch-2.6.1/src/util.h 2011-02-08 11:29:34.614271726 +0000 -@@ -51,7 +51,7 @@ char *fetchname (char *, int, char **, t - char *savebuf (char const *, size_t); - char *savestr (char const *); - char const *version_controller (char const *, bool, struct stat const *, ch= ar **, char **); --bool version_get (char const *, char const *, bool, bool, char const *, str= uct stat *); -+bool version_get (char const *, char const *, bool, bool, char const *, str= uct stat *, security_context_t *); - int create_file (char const *, int, mode_t, bool); - int systemic (char const *); - char *format_linenum (char[LINENUM_LENGTH_BOUND + 1], LINENUM); hooks/post-receive -- IPFire 3.x development tree --===============4709208684302089331==--