[SailfishDevel] Avahi error opening socket
Michael Fuchs
michfu at gmx.at
Mon Jan 29 11:07:04 UTC 2018
I found a solution. If I understand this right, a program which wants to
broadcast to the network needs to be in the "inet" group.
So for avahi the solution was to put user "avahi" in the supplementary
group "inet".
For another program (snapserver) this wasn't enough, because the forking
mechanism doesn't pass the permissions of the supplementary groups to
the forked process. So either you can make it a none forking process and
start it as a simple systemd.service[1] or you start it as
<processuser>:inet [2][3]
[1]
https://build.merproject.org/package/view_file/home:fooxl:sailfish/snapcast/snapserver-nofork.service?expand=1
[2]https://build.merproject.org/package/view_file/home:fooxl:sailfish/snapcast/snapserver.default?expand=1
[3]https://build.merproject.org/package/view_file/home:fooxl:sailfish/snapcast/snapserver.service?expand=1
cheers, Michael.
Am 18.01.2018 um 16:53 schrieb Michael Fuchs:
> Hi,
>
> I'm trying to use avahi on Sailfish.
>
> I built it here:
>
> https://build.merproject.org/package/show/home:fooxl:sailfish/avahi-simple
>
> In the emulator it runs fine by starting it via systemctl
>
> # systemctl start avahi-daemon
>
> The daemon forks and drops its privileges to avahi:avahi.
>
> But on the device (JollaC) it complains about
> socket() failed: Permission denied
>
> If I start it with
>
> # avahi-daemon --no-drop-root
>
> as root, it runs also fine on the device.
>
> Could somebody please give me a hint, how to investigate this issue?
>
> greetz, Michael.
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org
More information about the Devel
mailing list