[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] Ensure fds are closed when exec functions are used.
PulseAudio Marge Bot (@pulseaudio-merge-bot)
gitlab at gitlab.freedesktop.org
Thu Nov 24 22:01:16 UTC 2022
PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
e650c2b3 by Alistair Leslie-Hughes at 2022-11-24T21:58:53+00:00
Ensure fds are closed when exec functions are used.
When usng shm_open, FD_CLOEXEC is set explicitly.
However when using memfd_create, we must pass the MFD_CLOEXEC flag
to ensure the same fcntl value (FD_CLOEXEC) is set.
Fixes #1394
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/751>
- - - - -
1 changed file:
- src/pulsecore/shm.c
Changes:
=====================================
src/pulsecore/shm.c
=====================================
@@ -164,7 +164,7 @@ static int sharedmem_create(pa_shm *m, pa_mem_type_t type, size_t size, mode_t m
#endif
#ifdef HAVE_MEMFD
case PA_MEM_TYPE_SHARED_MEMFD:
- fd = memfd_create("pulseaudio", MFD_ALLOW_SEALING);
+ fd = memfd_create("pulseaudio", MFD_ALLOW_SEALING|MFD_CLOEXEC);
break;
#endif
default:
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/e650c2b33e4fefc0589751b3958bd3b5d3b423ac
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/e650c2b33e4fefc0589751b3958bd3b5d3b423ac
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20221124/84aa5933/attachment.htm>
More information about the pulseaudio-commits
mailing list