From 7795c908230c906bfcbe818fbc05871993ce96e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 19 Dec 2010 09:15:32 +0000 Subject: [PATCH] - up to 2.12.2 but rpcgen still segfaults Changed files: glibc-cv_gnu89_inline.patch -> 1.3 glibc-newmake.patch -> 1.2 glibc-suid-audit-libs.patch -> 1.2 glibc.spec -> 1.885 --- glibc-cv_gnu89_inline.patch | 10 +- glibc-newmake.patch | 28 ---- glibc-suid-audit-libs.patch | 269 ------------------------------------ glibc.spec | 12 +- 4 files changed, 9 insertions(+), 310 deletions(-) delete mode 100644 glibc-newmake.patch delete mode 100644 glibc-suid-audit-libs.patch diff --git a/glibc-cv_gnu89_inline.patch b/glibc-cv_gnu89_inline.patch index 4f57116..2b61106 100644 --- a/glibc-cv_gnu89_inline.patch +++ b/glibc-cv_gnu89_inline.patch @@ -1,11 +1,11 @@ ---- glibc-2.9/configure.in~ 2008-11-14 21:25:46.000000000 +0200 -+++ glibc-2.9/configure.in 2009-01-05 18:03:46.169335285 +0200 -@@ -1664,7 +1664,7 @@ +--- glibc-2.12.2/configure.in~ 2010-12-13 11:47:26.000000000 +0100 ++++ glibc-2.12.2/configure.in 2010-12-19 11:04:54.011123038 +0100 +@@ -1786,7 +1786,7 @@ libc_cv_gnu89_inline=no fi rm -f conftest*]) -if test $libc_cv_gnu89_inline = yes; then +if test "$libc_cv_gnu89_inline" != no; then - libc_cv_gnu89_inline=-fgnu89-inline + gnu89_inline=-fgnu89-inline else - libc_cv_gnu89_inline= + gnu89_inline= diff --git a/glibc-newmake.patch b/glibc-newmake.patch deleted file mode 100644 index 56b0675..0000000 --- a/glibc-newmake.patch +++ /dev/null @@ -1,28 +0,0 @@ -Submitted By: Matt Burgess -Date: 2010-07-26 -Initial Package Version: 2.11.2 -Upstream Status: Not submitted -Origin: Denis Onischenko - (http://www.mail-archive.com/help-make@gnu.org/msg08847.html) -Description: Fixes an incompatibility with Make-3.82. - -diff -Naur glibc-2.11.2.orig/manual/Makefile glibc-2.11.2/manual/Makefile ---- glibc-2.11.2.orig/manual/Makefile 2010-05-19 20:38:20.000000000 +0000 -+++ glibc-2.11.2/manual/Makefile 2010-07-26 06:51:27.049899308 +0000 -@@ -232,9 +232,13 @@ - .PHONY: stubs - stubs: $(objpfx)stubs - endif --$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%: -- $(make-target-directory) -- touch $@ -+$(objpfx)stubs ../po/manual.pot: -+ $(make-target-directory) -+ touch $@ -+ -+$(objpfx)stamp%: -+ $(make-target-directory) -+ touch $@ - - # Make the target directory if it doesn't exist, using the `mkinstalldirs' - # script that does `mkdir -p' even if `mkdir' doesn't support that flag. diff --git a/glibc-suid-audit-libs.patch b/glibc-suid-audit-libs.patch deleted file mode 100644 index b77a527..0000000 --- a/glibc-suid-audit-libs.patch +++ /dev/null @@ -1,269 +0,0 @@ -From libc-hacker-return-9651-listarch-libc-hacker=sources dot redhat dot com at sourceware dot org Fri Oct 22 17:17:33 2010 -Return-Path: -Delivered-To: listarch-libc-hacker at sources dot redhat dot com -Received: (qmail 15374 invoked by alias); 22 Oct 2010 17:17:31 -0000 -Received: (qmail 15356 invoked by uid 22791); 22 Oct 2010 17:17:29 -0000 -X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 - tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD -X-Spam-Check-By: sourceware.org -Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) - by sourceware dot org (qpsmtpd/0 dot 43rc1) with ESMTP; Fri, 22 Oct 2010 17:17:24 +0000 -Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) - by mx1 dot redhat dot com (8 dot 13 dot 8/8 dot 13 dot 8) with ESMTP id o9MHHMI2013888 - (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) - for ; Fri, 22 Oct 2010 13:17:23 -0400 -Received: from hase.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) - by int-mx01 dot intmail dot prod dot int dot phx2 dot redhat dot com (8 dot 13 dot 8/8 dot 13 dot 8) with ESMTP id o9MHHLZN030282 - for ; Fri, 22 Oct 2010 13:17:21 -0400 -From: Andreas Schwab -To: libc-hacker at sourceware dot org -Subject: [PATCH] Require suid bit on audit objects in privileged programs -X-Yow: This MUST be a good party -- My RIB CAGE is being painfully - pressed up against someone's MARTINI!! -Date: Fri, 22 Oct 2010 19:17:20 +0200 -Message-ID: -User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) -MIME-Version: 1.0 -Content-Type: text/plain; charset=us-ascii -Mailing-List: contact libc-hacker-help at sourceware dot org; run by ezmlm -Precedence: bulk -List-Id: -List-Subscribe: -List-Archive: -List-Post: -List-Help: , -Sender: libc-hacker-owner at sourceware dot org -Delivered-To: mailing list libc-hacker at sourceware dot org - -2010-10-22 Andreas Schwab - - * include/dlfcn.h (__RTLD_SECURE): Define. - * elf/dl-load.c (_dl_map_object): Remove preloaded parameter. Use - mode & __RTLD_SECURE instead. - (open_path): Rename preloaded parameter to secure. - * sysdeps/generic/ldsodefs.h (_dl_map_object): Adjust declaration. - * elf/dl-open.c (dl_open_worker): Adjust call to _dl_map_object. - * elf/dl-deps.c (openaux): Likewise. - * elf/rtld.c (struct map_args): Remove is_preloaded. - (map_doit): Don't use it. - (dl_main): Likewise. - (do_preload): Use __RTLD_SECURE instead of is_preloaded. - (dlmopen_doit): Add __RTLD_SECURE to mode bits. ---- - elf/dl-deps.c | 2 +- - elf/dl-load.c | 20 +++++++++++--------- - elf/dl-open.c | 2 +- - elf/rtld.c | 16 +++++++--------- - include/dlfcn.h | 1 + - sysdeps/generic/ldsodefs.h | 6 ++---- - 6 files changed, 23 insertions(+), 24 deletions(-) - -diff --git a/elf/dl-deps.c b/elf/dl-deps.c -index e5b9cdf..1cab2d1 100644 ---- a/elf/dl-deps.c -+++ b/elf/dl-deps.c -@@ -62,7 +62,7 @@ openaux (void *a) - { - struct openaux_args *args = (struct openaux_args *) a; - -- args->aux = _dl_map_object (args->map, args->name, 0, -+ args->aux = _dl_map_object (args->map, args->name, - (args->map->l_type == lt_executable - ? lt_library : args->map->l_type), - args->trace_mode, args->open_mode, -diff --git a/elf/dl-load.c b/elf/dl-load.c -index 776f7e4..9ab3520 100644 ---- a/elf/dl-load.c -+++ b/elf/dl-load.c -@@ -1808,7 +1808,7 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader, - if MAY_FREE_DIRS is true. */ - - static int --open_path (const char *name, size_t namelen, int preloaded, -+open_path (const char *name, size_t namelen, int secure, - struct r_search_path_struct *sps, char **realname, - struct filebuf *fbp, struct link_map *loader, int whatcode, - bool *found_other_class) -@@ -1890,7 +1890,7 @@ open_path (const char *name, size_t namelen, int preloaded, - /* Remember whether we found any existing directory. */ - here_any |= this_dir->status[cnt] != nonexisting; - -- if (fd != -1 && __builtin_expect (preloaded, 0) -+ if (fd != -1 && __builtin_expect (secure, 0) - && INTUSE(__libc_enable_secure)) - { - /* This is an extra security effort to make sure nobody can -@@ -1959,7 +1959,7 @@ open_path (const char *name, size_t namelen, int preloaded, - - struct link_map * - internal_function --_dl_map_object (struct link_map *loader, const char *name, int preloaded, -+_dl_map_object (struct link_map *loader, const char *name, - int type, int trace_mode, int mode, Lmid_t nsid) - { - int fd; -@@ -2063,7 +2063,8 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded, - for (l = loader; l; l = l->l_loader) - if (cache_rpath (l, &l->l_rpath_dirs, DT_RPATH, "RPATH")) - { -- fd = open_path (name, namelen, preloaded, &l->l_rpath_dirs, -+ fd = open_path (name, namelen, mode & __RTLD_SECURE, -+ &l->l_rpath_dirs, - &realname, &fb, loader, LA_SER_RUNPATH, - &found_other_class); - if (fd != -1) -@@ -2078,14 +2079,15 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded, - && main_map != NULL && main_map->l_type != lt_loaded - && cache_rpath (main_map, &main_map->l_rpath_dirs, DT_RPATH, - "RPATH")) -- fd = open_path (name, namelen, preloaded, &main_map->l_rpath_dirs, -+ fd = open_path (name, namelen, mode & __RTLD_SECURE, -+ &main_map->l_rpath_dirs, - &realname, &fb, loader ?: main_map, LA_SER_RUNPATH, - &found_other_class); - } - - /* Try the LD_LIBRARY_PATH environment variable. */ - if (fd == -1 && env_path_list.dirs != (void *) -1) -- fd = open_path (name, namelen, preloaded, &env_path_list, -+ fd = open_path (name, namelen, mode & __RTLD_SECURE, &env_path_list, - &realname, &fb, - loader ?: GL(dl_ns)[LM_ID_BASE]._ns_loaded, - LA_SER_LIBPATH, &found_other_class); -@@ -2094,12 +2096,12 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded, - if (fd == -1 && loader != NULL - && cache_rpath (loader, &loader->l_runpath_dirs, - DT_RUNPATH, "RUNPATH")) -- fd = open_path (name, namelen, preloaded, -+ fd = open_path (name, namelen, mode & __RTLD_SECURE, - &loader->l_runpath_dirs, &realname, &fb, loader, - LA_SER_RUNPATH, &found_other_class); - - if (fd == -1 -- && (__builtin_expect (! preloaded, 1) -+ && (__builtin_expect (! (mode & __RTLD_SECURE), 1) - || ! INTUSE(__libc_enable_secure))) - { - /* Check the list of libraries in the file /etc/ld.so.cache, -@@ -2165,7 +2167,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded, - && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL - || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1)) - && rtld_search_dirs.dirs != (void *) -1) -- fd = open_path (name, namelen, preloaded, &rtld_search_dirs, -+ fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs, - &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); - - /* Add another newline when we are tracing the library loading. */ -diff --git a/elf/dl-open.c b/elf/dl-open.c -index c394b3f..cf8e8cc 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -223,7 +223,7 @@ dl_open_worker (void *a) - - /* Load the named object. */ - struct link_map *new; -- args->map = new = _dl_map_object (call_map, file, 0, lt_loaded, 0, -+ args->map = new = _dl_map_object (call_map, file, lt_loaded, 0, - mode | __RTLD_CALLMAP, args->nsid); - - /* If the pointer returned is NULL this means the RTLD_NOLOAD flag is -diff --git a/elf/rtld.c b/elf/rtld.c -index 201c9cf..4a8cee8 100644 ---- a/elf/rtld.c -+++ b/elf/rtld.c -@@ -587,7 +587,6 @@ struct map_args - /* Argument to map_doit. */ - char *str; - struct link_map *loader; -- int is_preloaded; - int mode; - /* Return value of map_doit. */ - struct link_map *map; -@@ -625,16 +624,17 @@ static void - map_doit (void *a) - { - struct map_args *args = (struct map_args *) a; -- args->map = _dl_map_object (args->loader, args->str, -- args->is_preloaded, lt_library, 0, args->mode, -- LM_ID_BASE); -+ args->map = _dl_map_object (args->loader, args->str, lt_library, 0, -+ args->mode, LM_ID_BASE); - } - - static void - dlmopen_doit (void *a) - { - struct dlmopen_args *args = (struct dlmopen_args *) a; -- args->map = _dl_open (args->fname, RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT, -+ args->map = _dl_open (args->fname, -+ (RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT -+ | __RTLD_SECURE), - dl_main, LM_ID_NEWLM, _dl_argc, INTUSE(_dl_argv), - __environ); - } -@@ -804,8 +804,7 @@ do_preload (char *fname, struct link_map *main_map, const char *where) - - args.str = fname; - args.loader = main_map; -- args.is_preloaded = 1; -- args.mode = 0; -+ args.mode = __RTLD_SECURE; - - unsigned int old_nloaded = GL(dl_ns)[LM_ID_BASE]._ns_nloaded; - -@@ -1050,7 +1049,6 @@ of this helper program; chances are you did not intend to run this program.\n\ - - args.str = rtld_progname; - args.loader = NULL; -- args.is_preloaded = 0; - args.mode = __RTLD_OPENEXEC; - (void) _dl_catch_error (&objname, &err_str, &malloced, map_doit, - &args); -@@ -1062,7 +1060,7 @@ of this helper program; chances are you did not intend to run this program.\n\ - else - { - HP_TIMING_NOW (start); -- _dl_map_object (NULL, rtld_progname, 0, lt_library, 0, -+ _dl_map_object (NULL, rtld_progname, lt_library, 0, - __RTLD_OPENEXEC, LM_ID_BASE); - HP_TIMING_NOW (stop); - -diff --git a/include/dlfcn.h b/include/dlfcn.h -index a67426d..af92483 100644 ---- a/include/dlfcn.h -+++ b/include/dlfcn.h -@@ -9,6 +9,7 @@ - #define __RTLD_OPENEXEC 0x20000000 - #define __RTLD_CALLMAP 0x10000000 - #define __RTLD_AUDIT 0x08000000 -+#define __RTLD_SECURE 0x04000000 /* Apply additional security checks. */ - - #define __LM_ID_CALLER -2 - -diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h -index fcc943b..fa4b6b2 100644 ---- a/sysdeps/generic/ldsodefs.h -+++ b/sysdeps/generic/ldsodefs.h -@@ -824,11 +824,9 @@ extern void _dl_receive_error (receiver_fct fct, void (*operate) (void *), - - /* Open the shared object NAME and map in its segments. - LOADER's DT_RPATH is used in searching for NAME. -- If the object is already opened, returns its existing map. -- For preloaded shared objects PRELOADED is set to a non-zero -- value to allow additional security checks. */ -+ If the object is already opened, returns its existing map. */ - extern struct link_map *_dl_map_object (struct link_map *loader, -- const char *name, int preloaded, -+ const char *name, - int type, int trace_mode, int mode, - Lmid_t nsid) - internal_function attribute_hidden; --- -1.7.2.3 - - --- -Andreas Schwab, schwab@redhat.com -GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E -"And now for something completely different." - diff --git a/glibc.spec b/glibc.spec index 4962e9b..076f3c9 100644 --- a/glibc.spec +++ b/glibc.spec @@ -33,13 +33,13 @@ Summary(ru.UTF-8): GNU libc версии Summary(tr.UTF-8): GNU libc Summary(uk.UTF-8): GNU libc версії Name: glibc -Version: 2.12.1 -Release: 8 +Version: 2.12.2 +Release: 1 Epoch: 6 License: LGPL v2.1+ Group: Libraries Source0: http://ftp.gnu.org/pub/gnu/glibc/%{name}-%{version}.tar.xz -# Source0-md5: 4802b783766b5b487c601a19b5ce35f1 +# Source0-md5: e0043f4f8e1aa61acc62fdf0f4d6133d # Source1: ftp://sources.redhat.com/pub/glibc/releases/%{name}-ports-%{version}.tar.bz2 Source1: %{name}-ports-%{ports_version}.tar.bz2 # Source1-md5: edbf6b9a5b9aa2c441d78343fe282c64 @@ -76,9 +76,7 @@ Patch26: %{name}-posix-sh.patch Patch27: %{name}-i686.patch Patch29: %{name}-arm-alignment-fix.patch Patch30: %{name}-static-glro-init.patch -Patch31: %{name}-newmake.patch -Patch32: %{name}-origin.patch -Patch33: %{name}-suid-audit-libs.patch +Patch31: %{name}-origin.patch URL: http://www.gnu.org/software/libc/ %{?with_selinux:BuildRequires: audit-libs-devel} BuildRequires: autoconf @@ -926,8 +924,6 @@ mv %{name}-ports-%{ports_version} ports %patch29 -p1 %patch30 -p1 %patch31 -p1 -%patch32 -p1 -%patch33 -p1 # cleanup backups after patching find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f -- 2.44.0