diff options
| author | rawnix ports <ports@rawnix.org> | 2026-09-26 18:19:05 +0000 |
|---|---|---|
| committer | rawnix ports <ports@rawnix.org> | 2026-09-26 18:19:05 +0000 |
| commit | c82e88dd00d1b0b7fcfb4e5628d99611388cef6f (patch) | |
| tree | 56d864b5a5c6c145edd96178ae219a8f90e191a6 /core/bash/bash53-002 | |
| download | ports-c82e88dd00d1b0b7fcfb4e5628d99611388cef6f.tar.gz | |
sync 2026-09-26 18:19 UTC
1672 files changed, 151396 insertions(+)
Diffstat (limited to 'core/bash/bash53-002')
| -rw-r--r-- | core/bash/bash53-002 | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/core/bash/bash53-002 b/core/bash/bash53-002 new file mode 100644 index 0000000..cddc90e --- /dev/null +++ b/core/bash/bash53-002 @@ -0,0 +1,122 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-002 + +Bug-Reported-by: +Bug-Reference-ID: +Bug-Reference-URL: https://savannah.gnu.org/bugs/?67326 + +Bug-Description: + +There are too many differences in the various implementations of shm_open(2) +to rely on it for bash's use. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/lib/sh/anonfile.c Tue Jul 9 11:41:57 2024 +--- lib/sh/anonfile.c Thu Jul 17 11:03:23 2025 +*************** +*** 26,30 **** + #include <bashtypes.h> + +! #if defined (HAVE_MEMFD_CREATE) || defined (HAVE_SHM_OPEN) || defined (HAVE_SHM_MKSTEMP) + # include <sys/mman.h> + #endif +--- 26,30 ---- + #include <bashtypes.h> + +! #if defined (HAVE_MEMFD_CREATE) || defined (HAVE_SHM_MKSTEMP) + # include <sys/mman.h> + #endif +*************** +*** 42,57 **** + #endif + +! #if defined (HAVE_SHM_OPEN) +! #ifndef O_NOFOLLOW +! # define O_NOFOLLOW 0 +! #endif +! + static int +- anonshmunlink (const char *fn) +- { +- return (shm_unlink (fn)); +- } +- +- static int + anonshmopen (const char *name, int flags, char **fn) + { +--- 42,47 ---- + #endif + +! #if defined (HAVE_SHM_MKSTEMP) + static int + anonshmopen (const char *name, int flags, char **fn) + { +*************** +*** 63,95 **** + *fn = 0; + +- #if defined (HAVE_SHM_MKSTEMP) + fname = savestring ("/shm-XXXXXXXXXX"); + fd = shm_mkstemp (fname); + if (fd < 0) +- free (fname); +- #endif +- +- if (fd < 0) + { +- fname = sh_mktmpname (name, flags); +- fd = shm_open (fname, O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600); +- } +- +- if (fd < 0) +- { + free (fname); + return fd; + } + +- if (shm_unlink (fname) < 0) +- { +- int o; +- o = errno; +- free (fname); +- close (fd); +- errno = o; +- return -1; +- } +- + if (fn) + *fn = fname; +--- 53,64 ---- +*************** +*** 123,127 **** + flag = (name && *name == '/') ? MT_TEMPLATE : MT_USETMPDIR; + +! #if defined (HAVE_SHM_OPEN) + fd = anonshmopen (name, flag, fn); + if (fd >= 0) +--- 92,96 ---- + flag = (name && *name == '/') ? MT_TEMPLATE : MT_USETMPDIR; + +! #if defined (HAVE_SHM_MKSTEMP) + fd = anonshmopen (name, flag, fn); + if (fd >= 0) + +*** ../bash-5.3/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 1 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 2 + + #endif /* _PATCHLEVEL_H_ */ |
