summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--avahi-core/server.c4
-rw-r--r--avahi-daemon/avahi-dbus.conf.in7
-rw-r--r--avahi-daemon/caps.c1
3 files changed, 7 insertions, 5 deletions
diff --git a/avahi-core/server.c b/avahi-core/server.c
index 73ae1cb..bb625a5 100644
--- a/avahi-core/server.c
+++ b/avahi-core/server.c
@@ -844,7 +844,7 @@ static int originates_from_local_legacy_unicast_socket(AvahiServer *s, const Ava
if (getsockname(s->fd_legacy_unicast_ipv4, (struct sockaddr*) &lsa, &l) != 0)
avahi_log_warn("getsockname(): %s", strerror(errno));
else
- return lsa.sin_port == port;
+ return avahi_port_from_sockaddr((struct sockaddr*) &lsa) == port;
}
@@ -855,7 +855,7 @@ static int originates_from_local_legacy_unicast_socket(AvahiServer *s, const Ava
if (getsockname(s->fd_legacy_unicast_ipv6, (struct sockaddr*) &lsa, &l) != 0)
avahi_log_warn("getsockname(): %s", strerror(errno));
else
- return lsa.sin6_port == port;
+ return avahi_port_from_sockaddr((struct sockaddr*) &lsa) == port;
}
return 0;
diff --git a/avahi-daemon/avahi-dbus.conf.in b/avahi-daemon/avahi-dbus.conf.in
index e439e07..9d21181 100644
--- a/avahi-daemon/avahi-dbus.conf.in
+++ b/avahi-daemon/avahi-dbus.conf.in
@@ -1,6 +1,6 @@
<!DOCTYPE busconfig PUBLIC
- "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+ "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Only root or user @AVAHI_USER@ can own the Avahi service -->
@@ -16,7 +16,8 @@
<allow send_destination="org.freedesktop.Avahi"/>
<allow receive_sender="org.freedesktop.Avahi"/>
- <deny send_interface="org.freedesktop.Avahi.Server" send_member="SetHostName"/>
+ <deny send_destination="org.freedesktop.Avahi"
+ send_interface="org.freedesktop.Avahi.Server" send_member="SetHostName"/>
</policy>
<!-- Allow everything, including access to SetHostName to users of the group "@AVAHI_PRIV_ACCESS_GROUP@" -->
diff --git a/avahi-daemon/caps.c b/avahi-daemon/caps.c
index 3c9f50f..fbb9d7a 100644
--- a/avahi-daemon/caps.c
+++ b/avahi-daemon/caps.c
@@ -23,6 +23,7 @@
#include <config.h>
#endif
+#include <sys/types.h>
#include <assert.h>
#include <errno.h>
#include <string.h>