mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
shm: allow for older versions of Linux without MFD_NOEXEC_SEAL
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/794>
This commit is contained in:
parent
eb302240cc
commit
421cf15486
1 changed files with 4 additions and 0 deletions
|
|
@ -164,7 +164,11 @@ static int sharedmem_create(pa_shm *m, pa_mem_type_t type, size_t size, mode_t m
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_MEMFD
|
#ifdef HAVE_MEMFD
|
||||||
case PA_MEM_TYPE_SHARED_MEMFD:
|
case PA_MEM_TYPE_SHARED_MEMFD:
|
||||||
|
/* For linux >= 6.3 create fd with MFD_NOEXEC_SEAL flag */
|
||||||
fd = memfd_create("pulseaudio", MFD_ALLOW_SEALING|MFD_CLOEXEC|MFD_NOEXEC_SEAL);
|
fd = memfd_create("pulseaudio", MFD_ALLOW_SEALING|MFD_CLOEXEC|MFD_NOEXEC_SEAL);
|
||||||
|
/* Retry creating fd without MFD_NOEXEC_SEAL to support linux < 6.3 */
|
||||||
|
if (fd < 0)
|
||||||
|
fd = memfd_create("pulseaudio", MFD_ALLOW_SEALING|MFD_CLOEXEC);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue