SHA256
3
0
forked from pool/bash

Harden for gcc 14

OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=381
This commit is contained in:
Dr. Werner Fink 2024-02-28 14:05:40 +00:00 committed by Git OBS Bridge
parent e3bbc3d8c8
commit 7d70e4ce7c
5 changed files with 34 additions and 6 deletions

View File

@ -4,15 +4,16 @@
--- shell.c
+++ shell.c 2018-09-20 08:08:34.242204532 +0000
@@ -43,6 +43,7 @@
@@ -43,6 +43,8 @@
#endif
#if defined (HAVE_UNISTD_H)
+# include <sys/mman.h>
+# include <sys/types.h>
# include <unistd.h>
#endif
@@ -1888,6 +1893,28 @@ init_interactive_script ()
@@ -1888,6 +1894,28 @@ init_interactive_script ()
#endif
}

16
bash-5.2-gcc14.patch Normal file
View File

@ -0,0 +1,16 @@
---
aclocal.m4 | 3 +++
1 file changed, 3 insertions(+)
--- aclocal.m4
+++ aclocal.m4 2024-02-28 13:50:24.552597535 +0000
@@ -238,6 +238,9 @@ AC_CACHE_VAL(bash_cv_dup2_broken,
#include <sys/types.h>
#include <fcntl.h>
#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
int
main()
{

View File

@ -151,15 +151,15 @@
static int
--- shell.c
+++ shell.c 2022-04-28 11:56:12.623015117 +0000
@@ -45,6 +45,7 @@
#if defined (HAVE_UNISTD_H)
@@ -46,6 +46,7 @@
# include <sys/mman.h>
# include <sys/types.h>
# include <unistd.h>
+# include <grp.h>
#endif
#include "bashintl.h"
@@ -511,7 +512,7 @@ main (argc, argv, env)
@@ -512,7 +513,7 @@ main (argc, argv, env)
read_but_dont_execute = 1;
#endif
@ -168,7 +168,7 @@
disable_priv_mode ();
/* Need to get the argument to a -c option processed in the
@@ -1341,6 +1342,9 @@ disable_priv_mode ()
@@ -1342,6 +1343,9 @@ disable_priv_mode ()
{
int e;

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Feb 28 13:52:24 UTC 2024 - Dr. Werner Fink <werner@suse.de>
- Harden bash to be compiled with gcc 14 (boo#1220564)
* Modify patch bash-4.2-nscdunmap.dif to include <sys/mman.h>
* Port bash-5.2.dif to the former change
* Add patch bash-5.2-gcc14.patch
-------------------------------------------------------------------
Tue Jan 16 08:49:57 UTC 2024 - Dr. Werner Fink <werner@suse.de>

View File

@ -88,6 +88,8 @@ Patch48: bash-4.3-extra-import-func.patch
Patch49: bash-4.3-pathtemp.patch
# PATCH-FIX-SUSE
Patch50: quotes-man2html.patch
# PATCH-FIX-UPSTREAM
Patch51: bash-5.2-gcc14.patch
BuildRequires: autoconf
# latest bash uses with patch 18 the tag YYEOF
BuildRequires: bison
@ -281,6 +283,7 @@ set -x
%endif
%patch -P49 -b .pthtmp
%patch -P50 -b .qd
%patch -P51 -b .gcc14
%patch -P0 -b .p0
# This has to be always the same version as included in the bash its self