Re: [SailfishDevel] Avahi error opening socket

2018-01-29 Thread Michael Fuchs
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 mec

Re: [SailfishDevel] Avahi error opening socket

2018-01-27 Thread Michael Fuchs
So the relevant part seemes to be: https://gist.github.com/fuchsmich/ce0951252bd64c62ed0fabf26e820a24#file-strace_avahi-daemon-L745 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = -1 EACCES (Permission denied) write(2, "socket() failed: Permission deni"..., 34socket() failed: Permission denied) = 34

Re: [SailfishDevel] Avahi error opening socket

2018-01-22 Thread Slava Monich
Hi Michael, If you ssh into the phone directly as root, try logging in as nemo first and become root via devel-su. There should be no difference but there is one (hint: id -a). Cheers, -Slava Thanks, Lukas, but it didn't help getcap /usr/sbin/avahi-daemon /usr/sbin/avahi-daemon = cap_net_r

Re: [SailfishDevel] Avahi error opening socket

2018-01-21 Thread Michael Fuchs
Here is some of the output: socket(PF_LOCAL, SOCK_STREAM, 0)= 7 unlink("/run/avahi-daemon/socket") = 0 bind(7, {sa_family=AF_LOCAL, sun_path="/run/avahi-daemon/socket"}, 110) = 0 listen(7, 128) = 0 umask(022) = 0 write(4, "W", 1)

Re: [SailfishDevel] Avahi error opening socket

2018-01-21 Thread Michael Fuchs
Thanks, Lukas, but it didn't help getcap /usr/sbin/avahi-daemon /usr/sbin/avahi-daemon = cap_net_raw+ep Log entries of avahi-daemon: avahi-daemon[10662]: Found user 'avahi' (UID 993) and group 'avahi' (GID 988). avahi-daemon[10662]: Successfully dropped root privileges. avahi-daemon[10662]: av

Re: [SailfishDevel] Avahi error opening socket

2018-01-18 Thread Lukáš Karas
Just guessing, don't need Avahi open raw socket? Try to add capability CAP_NET_RAW to your avahi binary. sudo setcap cap_net_raw+p /path/to/avahi Lukas Dne čtvrtek 18. ledna 2018 16:53:03 CET Michael Fuchs napsal(a): > Hi, > > I'm trying to use avahi on Sailfish. > > I built it here: > > htt

Re: [SailfishDevel] Avahi error opening socket

2018-01-18 Thread Niel Nielsen
Try a trace with strace /Niel On Thursday, January 18, 2018, Michael Fuchs wrote: > 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 > >

[SailfishDevel] Avahi error opening socket

2018-01-18 Thread 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