dtcooper / raspotify

A Spotify Connect client that mostly Just Works™
https://dtcooper.github.io/raspotify
MIT License
4.63k stars 213 forks source link

`raspotify.service` security file update broke pipe backend #468

Closed jgabriel98 closed 2 years ago

jgabriel98 commented 2 years ago

after commit a844a33 the backend pipe doesn't work anymore.

How to reproduce:

  1. add the following lines to /etc/default/raspotify:

    OPTIONS="--device /tmp/fifo_raspotify"
    BACKEND_ARGS="--backend pipe"
  2. create a pipe with read and write permissions: mkfifo /tmp/fifo_raspotify --mode=0666 result:

    $ ls -l /tmp/fifo_raspotify
    prw-rw-rw- 1 pi pi 0 nov 30 00:04 /tmp/fifo_raspotify
  3. restart raspotify.service

  4. connect to device and try to start a song, it will break

note:

When reverting commit a844a33 and reproducing the steps above (also running systemctl daemon-reload before step 3), everything works fine.


Early investigations:

system info:

pi@raspberrypi:~/spotifypiHome $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

Running raspotify with no authentication

github-actions[bot] commented 2 years ago

This question or issue can probably be easily answered or resolved by reading the docs/wiki.

github-actions[bot] commented 2 years ago

The OS referenced is unsupported.

github-actions[bot] commented 2 years ago

This issue has been marked wontfix and may not be a bug at all.

JasonLG1979 commented 2 years ago

/tmp is a sewer. You should not use the common system /tmp for IPC. Many systems will not even allow services access to /tmp.

Raspotify has no access to /tmp by design.

You should put fifo's under /var/run as per the wiki.

See a relevant issue in the snapcast repo.

Also, in the sames logs, i've found out that some lines in the .service file are not reconized by the system (running latest raspbian):

Buster is not the latest version.

jgabriel98 commented 2 years ago

Oh, didn't know that the wiki was updated with this info about fifo under /var/run (it's been a long time that i've read through this repo docs).

But thank you so much, will test this as soon as possible.