mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-16 16:36:03 +02:00
fix for internal redirection flags colliding with open/fcntl flags; call memfd_create with MFD_NOEXEC_SEAL; fix for setting $BASH in su-started login shell; fix for unsetting $REPLY after nofork comsubs
This commit is contained in:
+5
-1
@@ -37,6 +37,10 @@
|
||||
|
||||
static int anonunlink (const char *);
|
||||
|
||||
#if defined (HAVE_MEMFD_CREATE) && !defined (MFD_NOEXEC_SEAL)
|
||||
# define MFD_NOEXEC_SEAL 0
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_SHM_OPEN)
|
||||
#ifndef O_NOFOLLOW
|
||||
# define O_NOFOLLOW 0
|
||||
@@ -104,7 +108,7 @@ anonopen (const char *name, int flags, char **fn)
|
||||
|
||||
#if defined (HAVE_MEMFD_CREATE)
|
||||
/* "Names do not affect the behavior of the file descriptor." */
|
||||
fd = memfd_create ("anonopen", 0);
|
||||
fd = memfd_create ("anonopen", MFD_NOEXEC_SEAL);
|
||||
if (fd >= 0)
|
||||
{
|
||||
if (fn)
|
||||
|
||||
Reference in New Issue
Block a user