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) = 1 clock_getres(CLOCK_MONOTONIC, {0, 1}) = 0 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0) = 8 connect(8, {sa_family=AF_LOCAL, sun_path="/var/run/dbus/system_bus_socket"}, 33) = 0 fcntl64(8, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(8, F_SETFL, O_RDWR|O_NONBLOCK) = 0 geteuid32() = 993 getsockname(8, {sa_family=AF_LOCAL, NULL}, [2]) = 0 poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}]) send(8, "\0", 1, MSG_NOSIGNAL) = 1 send(8, "AUTH EXTERNAL 393933\r\n", 22, MSG_NOSIGNAL) = 22 poll([{fd=8, events=POLLIN}], 1, -1) = 1 ([{fd=8, revents=POLLIN}]) read(8, "OK 98ca77e4210e148e2e0cfcbb00506"..., 2048) = 37 poll([{fd=8, events=POLLOUT}], 1, -1) = 1 ([{fd=8, revents=POLLOUT}]) send(8, "NEGOTIATE_UNIX_FD\r\n", 19, MSG_NOSIGNAL) = 19 poll([{fd=8, events=POLLIN}], 1, -1) = 1 ([{fd=8, revents=POLLIN}]) read(8, "AGREE_UNIX_FD\r\n", 2048) = 15 poll([{fd=8, events=POLLOUT}], 1, -1) = 1 ([{fd=8, revents=POLLOUT}]) send(8, "BEGIN\r\n", 7, MSG_NOSIGNAL) = 7 poll([{fd=8, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=8, revents=POLLOUT}]) sendmsg(8, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1\0\0\0\0\1\0\0\0n \0\0\0\1\1o\0\25\0\0\0/org/fre"..., 128}, {"", 0}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 128 clock_gettime(CLOCK_MONOTONIC, {7689, 966740247}) = 0 poll([{fd=8, events=POLLIN}], 1, 25000) = 1 ([{fd=8, revents=POLLIN}]) recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"l\2\1\1\v\0\0\0\1\0\0\0= \0\0\0\6\1s\0\6\0\0\0:1.333\0\0"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 262 recvmsg(8, 0xbeb09558, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable) write(4, "W", 1) = 1 write(4, "W", 1) = 1 write(4, "W", 1) = 1 gettimeofday({1516572251, 509075}, NULL) = 0 write(4, "W", 1) = 1 sendmsg(8, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1 \0\0\0\2\0\0\0\200\0\0\0\1\1o\0\25\0\0\0/org/fre"..., 144}, {"\25\0\0\0org.freedesktop.Avahi\0\0\0\4\0\0\0", 32}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 176 clock_gettime(CLOCK_MONOTONIC, {7689, 976919408}) = 0 poll([{fd=8, events=POLLIN}], 1, 25000) = 1 ([{fd=8, revents=POLLIN}]) recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"l \4\1\1\32\0\0\0\3\0\0\0\215\0\0\0\1\1o\0\25\0\0\0/org/fre"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 270 write(4, "W", 1) = 1 recvmsg(8, 0xbeb095b0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable) gettimeofday({1516572251, 518058}, NULL) = 0 write(4, "W", 1) = 1 sendmsg(8, {msg_name(0)=NULL, msg_iov(2)=[{"l \1\0\0013\0\0\0\3\0\0\0\177\0\0\0\1\1o\0\25\0\0\0/org/fre"..., 144}, {". \0\0\0type='signal',interface='org"..., 51}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 195 clock_gettime(CLOCK_MONOTONIC, {7689, 983252374}) = 0 poll([{fd=8, events=POLLIN}], 1, 25000) = 1 ([{fd=8, revents=POLLIN}]) recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"l \2\1\1\0\0\0\0\5\0\0\0005\0\0\0\6\1s\0\6\0\0\0:1.333\0\0"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 72 write(4, "W", 1) = 1 recvmsg(8, 0xbeb095a0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable) inotify_init() = 9 inotify_add_watch(9, "/etc/avahi/services", IN_CLOSE_WRITE|IN_MOVED_FROM| IN_MOVED_TO|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_ONLYDIR) = 1 inotify_add_watch(9, "/etc/avahi", IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO| IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_ONLYDIR) = 2 write(4, "W", 1) = 1 open("/etc/resolv.conf", O_RDONLY) = 10 fstat64(10, {st_mode=S_IFREG|0644, st_size=70, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f28000 read(10, "# Generated by Connection Manage"..., 4096) = 70 read(10, "", 4096) = 0 close(10) = 0 munmap(0xb6f28000, 4096) = 0 openat(AT_FDCWD, "/etc/avahi/services", O_RDONLY|O_NONBLOCK|O_LARGEFILE| O_DIRECTORY|O_CLOEXEC) = 10 getdents64(10, /* 4 entries */, 32768) = 120 getdents64(10, /* 0 entries */, 32768) = 0 close(10) = 0 write(2, "Loading service file /etc/avahi/"..., 58Loading service file /etc/ avahi/services/sftp-ssh.service.) = 58 write(2, "\n", 1 ) = 1 open("/etc/avahi/services/sftp-ssh.service", O_RDONLY) = 10 fstat64(10, {st_mode=S_IFREG|0644, st_size=1075, ...}) = 0 read(10, "<?xml version=\"1.0\" standalone='"..., 10240) = 1075 gettimeofday({1516572251, 539155}, NULL) = 0 read(10, "", 10240) = 0 close(10) = 0 write(2, "Loading service file /etc/avahi/"..., 53Loading service file /etc/ avahi/services/ssh.service.) = 53 write(2, "\n", 1 ) = 1 open("/etc/avahi/services/ssh.service", O_RDONLY) = 10 fstat64(10, {st_mode=S_IFREG|0644, st_size=1071, ...}) = 0 read(10, "<?xml version=\"1.0\" standalone='"..., 10240) = 1071 gettimeofday({1516572251, 546807}, NULL) = 0 read(10, "", 10240) = 0 close(10) = 0 open("/etc/avahi/hosts", O_RDONLY) = 10 fstat64(10, {st_mode=S_IFREG|0644, st_size=1121, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f28000 read(10, "# This file is part of avahi.\n# "..., 4096) = 1121 read(10, "", 4096) = 0 close(10) = 0 munmap(0xb6f28000, 4096) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = -1 EACCES (Permission denied) write(2, "socket() failed: Permission deni"..., 34socket() failed: Permission denied) = 34 write(2, "\n", 1 ) = 1 socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = -1 EACCES (Permission denied) write(2, "socket() failed: Permission deni"..., 34socket() failed: Permission denied) = 34 write(2, "\n", 1 ) = 1 write(2, "Failed to create server: No suit"..., 63Failed to create server: No suitable network protocol available) = 63 write(2, "\n", 1 ) = 1 unlink("/run/avahi-daemon/socket") = 0 write(4, "W", 1) = 1 close(7) = 0 write(4, "W", 1) = 1 close(8) = 0 write(4, "W", 1) = 1 close(5) = 0 close(6) = 0 write(4, "W", 1) = 1 write(4, "W", 1) = 1 close(9) = 0 close(3) = 0 close(4) = 0 write(2, "avahi-daemon 0.7 exiting.", 25avahi-daemon 0.7 exiting.) = 25 write(2, "\n", 1 ) = 1 unlink("/run/avahi-daemon//pid") = 0 exit_group(255) = ? +++ exited with 255 +++
On Donnerstag, 18. Jänner 2018 17:04:12 CET Niel Nielsen wrote: > Try a trace with strace > > /Niel > > On Thursday, January 18, 2018, Michael Fuchs <mic...@gmx.at> 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 > > > > # 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@lists. > > sailfishos.org _______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org