On Sun 31/12/2023 22:05, Klemens Nanni wrote: > On Sun, Dec 31, 2023 at 08:49:48PM +0000, Klemens Nanni wrote: > > _nginx is the oldest commented user from 2012 according to my blame/grep. > > I'd like to recycle the ID into _spotifyd and isolate this internet facing > > daemon into /var/spotifyd/, away from /home/kn/. > > > > Looks like this is the first case of an unprivileged user in ports playing. > > sndio(7) needs a cookie file; neither PortAudio (audio/portaudio-svn), nor > > Rust's portaudio-rs crate or spotifyd seem to use that, so I've added a > > trivial rc_pre() one-shot hook leveraging aucat(1). > > > > Existing users as per README won't have to do anything after upgrading > > to spotifyd-0.3.5p3; ~/.spotifyd/spotifyd.conf continues to take > > precedence and is NOT merged with /etc/spotifyd.conf used by rc.d/spotifyd. > > Same diff plus README bits on how to share sndio(7) cookies since sndiod(8) > does not concurrent connections from different users/accounts (read: cookies). > > > Works like a charm for me. > > > > Feedback? OK?
Works for me as well. Recycling id 593 should be ok. I am not sure if using aucat(1) in spotifyd.rc has any downsides. Maybe doing something like 'mkdir ~/.sndiod && if=/dev/urandom bs=16 count=1 of=~/.sndio/cookie' is a good alternative, which is more self explaining.