diff --git a/fopen-close-exec.patch b/fopen-close-exec.patch new file mode 100644 index 0000000..160221d --- /dev/null +++ b/fopen-close-exec.patch @@ -0,0 +1,14 @@ +Index: glibc-2.14/libio/fileops.c +=================================================================== +--- glibc-2.14.orig/libio/fileops.c ++++ glibc-2.14/libio/fileops.c +@@ -338,7 +338,8 @@ _IO_new_file_fopen (fp, filename, mode, + is32not64); + + #ifndef __ASSUME_O_CLOEXEC +- if ((fp->_flags2 & _IO_FLAGS2_CLOEXEC) != 0 && __have_o_cloexec <= 0) ++ if ((result != NULL) ++ && (fp->_flags2 & _IO_FLAGS2_CLOEXEC) != 0 && __have_o_cloexec <= 0) + { + int fd = _IO_fileno (fp); + if (__have_o_cloexec == 0) diff --git a/glibc.changes b/glibc.changes index b150122..2edd020 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Aug 19 13:26:11 UTC 2011 - aj@suse.de + +- Fix fopen("non-existing-file", "re") errno [bnc#713146]. + ------------------------------------------------------------------- Thu Aug 18 11:55:08 UTC 2011 - aj@suse.de diff --git a/glibc.spec b/glibc.spec index e27bdfd..b87da60 100644 --- a/glibc.spec +++ b/glibc.spec @@ -196,6 +196,8 @@ Patch66: glibc2.14-revert-sunrpc-removal.patch Patch67: glibc-revert-fseek-on-fclose.diff # PATCH-FIX-OPENSUSE Fix crash (access-after-free) in dl_lookup_x bnc#703140 matz@suse.de Patch68: glibc-fix-lookup-crash.patch +# PATCH-FIX-UPSTREAM Fix fopen("non-existing-file", "re") errno bnc#713146 aj@suse.de +Patch69: fopen-close-exec.patch # PATCH-FEATURE-OPENSUSE -- add sha support to crypt_blowfish lnussel@suse.de Patch80: crypt_blowfish-1.1-sha.diff @@ -426,6 +428,7 @@ rm nscd/s-stamp %patch66 -p1 %patch67 -p1 %patch68 -p1 +%patch69 -p1 # # Inconsistency detected by ld.so: dl-close.c: 719: _dl_close: Assertion `map->l_init_called' failed!