Replies: 1 comment
-
|
Yes, it should work like it currently does. Of course, that behavior should be documented. Right now, (Oh, and by the way, the |
Beta Was this translation helpful? Give feedback.
-
|
Yes, it should work like it currently does. Of course, that behavior should be documented. Right now, (Oh, and by the way, the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Just spent some time debugging an issue I was having, and I have a question about MPD's behavior.
My initial issue was that MPD couldn't open my audio device, even though it has membership in the
audiogroup. I'm using it with a dedicated USB DAC and direct hardware access, no pulse/pipewire/whatever.Examining
/proc/$PID/statusshowed that the MPD process had no supplementary groups at all. Digging through the code, I found that MPD's behavior is:groupsetting (ex:group "mpd"), the process gets that group as its GID, but no supplementary groups.groupset, the MPD process gets its supplementary groups set.Here's a sample configuration:
If I run MPD with this configuration, it gets no supplementary groups:
If I remove the
groupoption, it gets them:For completeness, here are the relevant UIDs/GIDs on this system:
This seems to be intentional behavior, MPD doesn't call
initgroups()unlesshad_groupisFALSE.had_groupisTRUEif thegroupconfiguration option is present, andFALSEotherwise. The behavior was introduced in d718a8b59d1f48abcff7f5626a237c1998fc83d5.The behavior appears to be undocumented, and is, at least to me, surprising.
What I'd expect is that if you specify
group, that sets the PGID, and the user's supplementary groups are still effective. Should it work like it currently does, or how I'd expect it to?Beta Was this translation helpful? Give feedback.
All reactions