-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hoist PTP socket handling, drop privileges on OpenBSD
bind(2)ing ports below 1024 is the only privileged operation NQPTP does. Move its code up in main() before shared memory handling such that root privileges can be dropped immediately after it; no currently supported system does that, thus this should be a NOOP. Do so on OpenBSD where shm_open(3) does not allow access to shared memory objects by multiple UIDs, i.e. to communicate, shairport-sync and NQPTP must create them and run as the very same user. OpenBSD's official audio/shairport-sync user provides an rc.d(8) daemon script that runs as `_shairport` user.
- Loading branch information
Showing
3 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters