diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2019-10-02 02:37:34 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2019-10-02 02:37:34 +0000 |
commit | 5a391b572bdf688c7c4de9a3f57219a7032ae274 (patch) | |
tree | 09c30fc6a89f3a458b8e69fb0d3ef6a288dbf3b7 /sys/kern/uipc_shm.c | |
parent | a9fe8c68aa249bcdb63abe5a1a7910b63c42e7da (diff) | |
download | src-5a391b572bdf688c7c4de9a3f57219a7032ae274.tar.gz src-5a391b572bdf688c7c4de9a3f57219a7032ae274.zip |
shm_open2(2): completely unbreak
kern_shm_open2(), since conception, completely fails to pass the mode along
to kern_shm_open(). This breaks most uses of it.
Add tests alongside this that actually check the mode of the returned
files.
PR: 240934 [pulseaudio breakage]
Reported by: ler, Andrew Gierth [postgres breakage]
Diagnosed by: Andrew Gierth (great catch)
Tested by: ler, tmunro
Pointy hat to: kevans
Notes
Notes:
svn path=/head/; revision=352952
Diffstat (limited to 'sys/kern/uipc_shm.c')
-rw-r--r-- | sys/kern/uipc_shm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 33ca9aacab1c..e0c6be1f0fab 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -1484,7 +1484,7 @@ kern_shm_open2(struct thread *td, const char *path, int flags, mode_t mode, initial_seals = F_SEAL_SEAL; if ((shmflags & SHM_ALLOW_SEALING) != 0) initial_seals &= ~F_SEAL_SEAL; - return (kern_shm_open(td, path, flags, 0, NULL, initial_seals)); + return (kern_shm_open(td, path, flags, mode, NULL, initial_seals)); } /* |