No way to use shm_open(3)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Confirmed
|
Undecided
|
Zygmunt Krynicki |
Bug Description
This bug collects all of the research about how programs using shm_open(3) operate within a snappy environment.
Currently snappy allows programs to open files under /dev/shm/
- Programs don't have any permissions to create /dev/shm/snap, /dev/shm/
- The actual function shm_open(3) does not allow programs to choose the directory. The manual page says that at most one / character can be used (and glibc verifies this).
I have found a way to work around this by linking or pre-loading a helper [1] that defines a glibc function const char *__shm_
It is my proposal to change ubuntu-
[1] https:/
Changed in snappy: | |
assignee: | nobody → Zygmunt Krynicki (zyga) |
status: | New → In Progress |
Changed in snappy: | |
status: | In Progress → Triaged |
Changed in snappy: | |
status: | In Progress → Confirmed |
affects: | snappy → snapd |
I think the proposal is generally fine but I wonder about its viability with pulseaudio which creates a number of shm files in /dev/shm. Eg:
$ ls -l /dev/shm/ pulse-shm- * pulse-shm- 1126818553 pulse-shm- 1225715323 pulse-shm- 145271673 pulse-shm- 147887719 pulse-shm- 1487298717 pulse-shm- 2387793072 pulse-shm- 2399721183 pulse-shm- 3323349813 pulse-shm- 3437821583 pulse-shm- 36248552 pulse-shm- 980235161
-rwx------ 1 jamie jamie 67108904 May 2 19:11 /dev/shm/
-rwx------ 1 jamie jamie 67108904 May 3 09:39 /dev/shm/
-rwx------ 1 jamie jamie 67108904 May 3 16:40 /dev/shm/
-rwx------ 1 lightdm lightdm 67108904 May 2 19:11 /dev/shm/
-rwx------ 1 jamie jamie 67108904 May 4 08:35 /dev/shm/
-rwx------ 1 jamie jamie 67108904 May 2 19:11 /dev/shm/
-rwx------ 1 lightdm lightdm 67108904 May 2 19:11 /dev/shm/
-rwx------ 1 jamie jamie 67108904 May 4 08:35 /dev/shm/
-rwx------ 1 jamie jamie 67108904 May 3 14:14 /dev/shm/
-rwx------ 1 lightdm lightdm 67108904 May 2 19:11 /dev/shm/
-rwx------ 1 jamie jamie 67108904 May 2 19:11 /dev/shm/
Have you tested this approach with an app that uses pulseaudio? (I understand there is no pulseaudio interface yet, but it can be tested by adjust the policy directly).