]> git.ipfire.org Git - thirdparty/shairport-sync.git/commit
Exit on config read error to avoid crash on EACCES 1798/head
authorKlemens Nanni <kn@openbsd.org>
Tue, 30 Jan 2024 02:43:44 +0000 (03:43 +0100)
committerKlemens Nanni <kn@openbsd.org>
Tue, 30 Jan 2024 02:57:37 +0000 (03:57 +0100)
commitad1fc121ebaa6f7109d23555ad27d3a0e2d0a840
tree9b45bf167a6f1ce67bbfb433a5fa09095cf7caf5
parent7fcfe070a04d2804090e199a10148fc7aa10e38b
Exit on config read error to avoid crash on EACCES

Failure to read does not exit despite
`    /* Read the file. If there is an error, report it and exit. */`

EACCES (e.g. insufficient filesystem permissions) is enough to crash
on access through later `config_*()` such as those when either of
either of D-Bus, MPRIS or MQTT is used.

Seen `--with-mpris-interface` and
```
$ ls -l /etc/shairport-sync.conf
-rw-r-----  1 root  _shairport  28114 Jan 25 01:53 /etc/shairport-sync.conf
$ shairport-sync
Segmentation fault (core dumped)
```
shairport.c