Commit Graph
5878 Commits
Author SHA1 Message Date
Mike BradyandGitHub ab59f20180 Merge pull request #1812 from HNKNTA/master
Update docker compose file
2024-03-08 09:19:30 +00:00
Mike BradyandGitHub d6ad6da1d6 Merge pull request #1821 from porg/patch-2
Update AIRPLAY2.md - Version introduced + Supported devices
2024-03-07 09:55:10 +00:00
porgandGitHub b97557257c Update AIRPLAY2.md - Version introduced + Supported devices
The introduction paragraph now more clearly mentions the hard facts/requirements with "as of v4.1 and newer" and the supported devices are displayed in bullet list format for better readabilty.
2024-03-07 10:31:27 +01:00
Mike BradyandGitHub a51589ed2c Update RELEASENOTES-DEVELOPMENT.md 2024-03-04 11:18:39 +00:00
Mike Brady cf10ff9d7a Build scripts/shairport-sync.service, scripts/shairport-sync.service-avahi and scripts/shairport-sync unconditionally for Linux to facilitate different installation methods. 2024-03-04 11:13:56 +00:00
HNKNTA 997ab4396c Update docker compose file
Added S6_KEEP_ENV to example, without it pulse connection won't happen
2024-02-26 20:29:15 +02:00
Mike BradyandGitHub 2dba9bc8ca Update RELEASENOTES-DEVELOPMENT.md 2024-02-25 17:38:37 +00:00
Mike BradyandGitHub 4aee4ec864 Merge pull request #1811 from klemensn/keep-password-private
Omit password in debug (syslog) output
2024-02-25 17:24:43 +00:00
Mike BradyandGitHub ebe597809c Merge pull request #1810 from klemensn/printf-null-string
Avoid passing NULL pointer to printf(3) %s
2024-02-25 17:23:59 +00:00
Mike BradyandGitHub 6561b848f6 Merge pull request #1803 from klemensn/initial-pledge
initial pledge(2) on OpenBSD
2024-02-25 17:14:29 +00:00
Klemens Nanni b831da4bf1 Omit password in debug (syslog) output
Configuration files may contain it, but those can be protected with
filesystem permissions.

Debug log, however, may end up in syslog(3) which is usually accessible
by all users on a system.

Avoid disclosing user secrets by simply not printing the password.
2024-02-24 14:41:02 +01:00
Klemens Nanni 22fc3bccab Avoid passing NULL pointer to printf(3) %s
OpenBSD issues syslog(3) warnings about these as they may hint at bugs:
	shairport-sync: vfprintf %s NULL in "metadata socket address is "%s" port %d."

Metadata listener socket is empty by default so use the existing `strnull`.
2024-02-24 14:12:25 +01:00
Klemens Nanni 5cdde02c9a initial pledge(2) on OpenBSD
Limit the set of system calls shairport-sync is allowed to make,
most importantly fork(2)/execve(2) if and only if user defined commands
are run.

OpenBSD's official audio/shairport-sync port already ships with this
patch.

https://man.openbsd.org/pledge.2
2024-02-12 12:23:46 +01:00
Mike BradyandGitHub 00a4758404 Merge pull request #1800 from klemensn/rtsp-listener-exit-segfault
Fix crash on double pthread_cancel(3) on exit (detected on OpenBSD).
2024-02-06 10:04:33 +00:00
Klemens Nanni 783d600a10 Fix crash on double pthread_cancel(3) on exit
On OpenBSD 7.4-current, failure to listen on the RTSP socket(s) results
the `rtsp_listener_thread` being pthread_cancel(3)'ed twice, once through
`rtsp_listen_loop()` and again via atexit(3) handler `exit_rtsp_listener()`:

```
$ nc -4l 5000 &
$ nc -6l 5000 &
$ shairport-sync -c/dev/null
warning: could not establish a service on port 5000 -- program terminating. Is another instance of Shairport Sync running on this device?
Segmentation fault (core dumped)
```
```
Program terminated with signal SIGSEGV, Segmentation fault.
433             if (tib->tib_canceled == 0 && tid != 0 &&
[Current thread is 1 (process 290061)]
```

`die()` -> `exit(EXIT_FAILURE)` normally in this case, thus forgoing the
first cancel and relying on the atexit handler alone.

With Mike Brady.
2024-02-01 18:35:35 +01:00
Mike BradyandGitHub 750e43bcaf Update RELEASENOTES-DEVELOPMENT.md 2024-01-30 16:17:06 +00:00
Mike BradyandGitHub 926cd56eac Merge pull request #1797 from klemensn/openbsd-doc-nits
OpenBSD doc nits
2024-01-30 15:56:00 +00:00
Mike BradyandGitHub 2810559f29 Merge pull request #1798 from klemensn/config-perm-segfault
Exit on config read error to avoid crash on EACCES
2024-01-30 14:05:48 +00:00
Klemens Nanni ad1fc121eb 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)
```
2024-01-30 03:57:37 +01:00
Klemens Nanni 2eb2cc20e5 clarify root privilege requirements
NQPTP works and runs as _shairport user on OpenBSD.

Linux capabilities(7) allow starting as unprivileged user in the first
place, otherwise programs only need to start and perform privileged
actions such as bind(2)ing sockets as root, after that they can and
should! drop privileges.

Instead of updating/repeating supported systems, drop listings.
2024-01-30 03:17:57 +01:00
Klemens Nanni 5cc825c7e2 Sprinkle OpenBSD news in README.md 2024-01-30 03:03:36 +01:00
Klemens Nanni 62abb0465c fix [-Wunused-variable] for keep* variables 2024-01-30 02:52:49 +01:00
Mike BradyandGitHub 7fcfe070a0 Update RELEASENOTES-DEVELOPMENT.md 2024-01-29 16:57:51 +00:00
Mike BradyandGitHub f37d1b8eb1 Merge pull request #1795 from klemensn/manual-section
Move shairport-sync manual from section 7 to 1
2024-01-29 16:32:36 +00:00
Mike BradyandGitHub e6f7a45528 Merge pull request #1794 from klemensn/per-socket-keepidle
No per-socket TCP keepidle on OpenBSD
2024-01-29 16:28:06 +00:00
Mike BradyandGitHub 6c6d284f8b Merge pull request #1793 from klemensn/control-socket
Connect to NQPTP control socket on localhost
2024-01-29 16:23:31 +00:00
Mike BradyandGitHub b80d0720ba Merge pull request #1782 from vs49688/master
Makefile.am: allow manually installing config files
2024-01-29 14:40:56 +00:00
Zane van Iperen ec3b5ffca2 Makefile.am: allow manually installing config files
Adds a "install-config-files" Makefile target that installs the config
files and dbus policies to DESTDIR=, regardless of whether
--with{,out}-configfiles is specified.
2024-01-29 02:33:53 +10:00
Klemens NanniandKlemens Nanni 8ae635e78e Move shairport-sync manual from section 7 to 1
From mandoc man(1) [-s] section:
                   1         General commands (tools and utilities).
                   [...]
                   7         Miscellaneous information.

From GNU man(1) DESCRIPTION:
     1   Executable programs or shell commands
     [...]
     7   Miscellaneous (including macro packages and conventions), e.g.
         man(7), groff(7)

shairport-sync is an executable, shairport-sync(1) ought to be its
documentation, not merely miscellaneous information.

OpenBSD adjusts this in its audio/shairport-sync port/package ever since.
2024-01-27 19:40:04 +01:00
Klemens NanniandKlemens Nanni dc235275ac No per-socket TCP keepidle on OpenBSD
A system-wide sysctl(2) net.inet.tcp.keepidle exists, but there is no
setsockopt(2) equivalent.
2024-01-27 19:15:07 +01:00
Klemens NanniandKlemens Nanni 6dd311a1a8 Connect to NQPTP control socket on localhost
nqptp.c listens on "localhost", but shairport-sync connectes to the wildcard
address 0/0.  This apparently works on Linux and FreeBSD, but OpenBSD fails:

```
$ ktrace shairport-sync -v -u
[...]
         0.000038288 "ptp-utilities.c:243" *fatal error: error sending timing_peer_list to NQPTP
         0.000021868 "shairport.c:1728" emergency exit
$ kdump
[...]
  2319 shairport-sync STRU  struct sockaddr { AF_INET, 0.0.0.0:9000 }
  2319 shairport-sync RET   sendto -1 errno 51 Network is unreachable
[...]
```

Resolve and connect to "localhost" just like NQPTP does, resulting in
127.0.0.1 or ::1 as socket addresses.

This is required to run when configured `--with-airplay-2`.
Tested on OpenBSD/amd64 7.4-current with shairport-sync 2.4.3 and nqptp
1.2.5-dev cfa8315 (plus OpenBSD fixes).

I expect Linux and FreeBSD to work as before, but have not tested it.
2024-01-27 18:56:26 +01:00
Mike BradyandGitHub 165431a897 Update stale.yaml
Set to 28 days.
2023-12-22 20:10:10 +00:00
Mike Brady e36ec5c45d Quieten some debug messages. 2023-11-12 11:50:21 +00:00
Mike BradyandGitHub 9f54a75127 Update RELEASENOTES-DEVELOPMENT.md 2023-11-06 11:15:58 +00:00
Mike BradyandGitHub 7e7414658f Update CAR INSTALL.md 2023-11-06 11:07:06 +00:00
Mike Brady 5f9a88fb74 Use pthread_rwlock_wrlock instead of the incorrect use of pthread_rdlock_wrlock when tearing down a connection. 2023-10-31 09:01:24 +00:00
Mike BradyandGitHub d8c741e391 Update RELEASENOTES-DEVELOPMENT.md 2023-10-30 17:51:52 +00:00
Mike Brady 9ab85989f3 A bit late, but tag this as 4.3.3-dev. Also merge in the commit history of the master branch. 2023-10-30 17:46:12 +00:00
Mike Brady 04c8c01452 merge back in 4.3.2, a bit lae... 2023-10-30 17:32:43 +00:00
Mike BradyandGitHub 84a214d4d0 Update CAR INSTALL.md 2023-10-30 17:07:28 +00:00
Mike BradyandGitHub 40306cc742 Update CAR INSTALL.md 2023-10-23 15:10:54 +01:00
Mike BradyandGitHub bc363160ba Update CAR INSTALL.md 2023-10-23 14:49:02 +01:00
Mike BradyandGitHub 95d81341c9 Update RELEASENOTES-DEVELOPMENT.md 2023-10-23 11:48:13 +01:00
Mike BradyandGitHub 31d24a89ca Update RELEASENOTES-DEVELOPMENT.md 2023-10-23 11:46:20 +01:00
Mike Brady a760389346 Merge branch 'development' of github.com:mikebrady/shairport-sync into development
Online updates.
2023-10-23 11:42:04 +01:00
Mike Brady 626f986a18 Stop some warnings during build for Docker. 2023-10-23 11:41:20 +01:00
Mike BradyandGitHub 1d8a509ed7 Update RELEASENOTES-DEVELOPMENT.md 2023-10-23 10:18:12 +01:00
Mike BradyandGitHub c9c9033261 Update RELEASENOTES-DEVELOPMENT.md 2023-10-23 10:17:33 +01:00
Mike BradyandGitHub 2a5c49d3c1 Bookworm and simplifications
Update for Bookworm and make some simplifications.
2023-10-23 10:07:53 +01:00
Mike BradyandGitHub fef5adaf54 Update CAR INSTALL.md
Update for Bookworm and simplify some steps. Add some information about updating.
2023-10-22 13:06:45 +01:00