To give just an example, /dev/umidi* have 644 perms, which means I can read MIDI in, but not write to MIDI out. I spent hours trying to identify faulty cable only to realize it's the device file that doesn't have proper permissions. My suggestion is to either have audio group with rw permissions on dsp, midi and umidi devices or to adjust permissions on those devices so everyone can read and write. I slightly prefer dedicated audio group as that way I can limit who has access to audio hardware. I am posting here for a discussion and whatever we decide, I'll be glad to implement.
I was bitten by the unexpected default permissions of /dev/umidi* too. But tightening dsp permissions to an audio group will be disruptive to many desktop users - they'll have to add themselves to the audio group manually. We would need a good reason to justify that. For me it boils down to the following questions: 1. Is there a technical / security reason that prevents permission 666 on umidi? 2. Are there significant security gains by tightening audio permissions in general? @HPS: What do you think?
Hi, /dev/dsp* already has 666 permissions, so I guess doing the same for midi wouldn't hurt. --HPS
Alexander, what do you think?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2fcd7d380ba103060d43d6d01c1af6bb95819504 commit 2fcd7d380ba103060d43d6d01c1af6bb95819504 Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2021-12-17 10:52:00 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2021-12-17 10:54:19 +0000 snd_uaudio(4): Loosen up the USB MIDI permissions. This makes USB MIDI more userfriendly for desktop users. PR: 260489 MFC after: 1 week Sponsored by: NVIDIA Networking sys/dev/sound/usb/uaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=457750da86f17598be135b3cc706f4275560749d commit 457750da86f17598be135b3cc706f4275560749d Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2021-12-17 10:52:00 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2022-01-07 13:23:26 +0000 snd_uaudio(4): Loosen up the USB MIDI permissions. This makes USB MIDI more userfriendly for desktop users. PR: 260489 Sponsored by: NVIDIA Networking (cherry picked from commit 2fcd7d380ba103060d43d6d01c1af6bb95819504) sys/dev/sound/usb/uaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)