]> git.meshlink.io Git - catta/commitdiff
Merge remote-tracking branch 'origin/master-tx'
authorLennart Poettering <lennart@poettering.net>
Sat, 2 Apr 2011 01:23:36 +0000 (03:23 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 2 Apr 2011 01:23:36 +0000 (03:23 +0200)
29 files changed:
.dir-locals.el [new file with mode: 0644]
Makefile.am
avahi-autoipd/iface-linux.c
avahi-client/browser.c
avahi-common/utf8.c
avahi-core/avahi-test.c
avahi-core/iface-linux.c
avahi-core/server.c
avahi-core/socket.c
avahi-daemon/chroot.c
avahi-daemon/dbus-protocol.c
avahi-daemon/main.c
avahi-daemon/sd-daemon.c
avahi-daemon/sd-daemon.h
avahi-daemon/setproctitle.c
avahi-daemon/simple-protocol.c
avahi-dnsconfd/avahi-dnsconfd.service.in
avahi-gobject/ga-service-browser.c
avahi-gobject/ga-service-browser.h
avahi-python/avahi-discover/avahi-discover.py
avahi-ui/avahi-ui.c
configure.ac
docs/NEWS
initscript/suse/avahi-daemon.in
initscript/suse/avahi-dnsconfd.in
man/avahi-autoipd.8.xml.in
man/avahi-autoipd.action.8.xml.in
man/avahi-daemon.8.xml.in
man/avahi-dnsconfd.8.xml.in

diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644 (file)
index 0000000..9d9f8cd
--- /dev/null
@@ -0,0 +1,7 @@
+; Sets emacs variables based on mode.
+; A list of (major-mode . ((var1 . value1) (var2 . value2)))
+; Mode can be nil, which gives default values.
+
+((nil . ((indent-tabs-mode . nil)
+         (tab-width . 8)))
+)
index 1c67793e8b27679ba31257c0633c58c0a9dd7fbd..8234d698d2b9a20a9d9bd9fc57e3a20173b81f12 100644 (file)
@@ -155,6 +155,7 @@ pkgconfigdir = $(libdir)/pkgconfig
 %.pc: %.pc.in
        $(AM_V_GEN)sed -e 's,@prefix\@,$(prefix),g' \
            -e 's,@libdir\@,$(libdir),g' \
+           -e 's,@HOWL_COMPAT_VERSION\@,$(HOWL_COMPAT_VERSION),g' \
            -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
 
 pkgconfig_DATA = avahi-core.pc
index fc27829d43c9fbd989f7142d27fa90b9b12292a0..83e9e416bb38c6b4ce6f0f10bde9d89fe862118a 100644 (file)
@@ -262,7 +262,7 @@ int iface_get_initial_state(State *state) {
     n->nlmsg_len = NLMSG_LENGTH(sizeof(*ifi));
     n->nlmsg_type = RTM_GETLINK;
     n->nlmsg_seq = seq;
-    n->nlmsg_flags = NLM_F_MATCH|NLM_F_REQUEST|NLM_F_ACK;
+    n->nlmsg_flags = NLM_F_REQUEST|NLM_F_DUMP;
     n->nlmsg_pid = 0;
 
     ifi = NLMSG_DATA(n);
index f92ed0d8b65c76a19c9b70671453f97a0a2493d5..c978d942a80e11b64c6a228257ac281d65c38308 100644 (file)
@@ -171,7 +171,7 @@ AvahiDomainBrowser* avahi_domain_browser_new(
               DBUS_TYPE_INT32, &i_protocol,
               DBUS_TYPE_STRING, &domain,
               DBUS_TYPE_INT32, &bt,
-              DBUS_TYPE_UINT32, &flags,
+              DBUS_TYPE_UINT32, &u_flags,
               DBUS_TYPE_INVALID))) {
         avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
         goto fail;
@@ -1023,4 +1023,3 @@ fail:
     dbus_error_free (&error);
     return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 }
-
index fa6a31859bce4d863a5b89bc34a21fbd93119a22..ab10ba06a05238ab8c505fb43939f13c9fb75387 100644 (file)
@@ -60,9 +60,6 @@ avahi_utf8_valid (const char *str)
        /* done */;
       else
        {
-         const char *last;
-
-         last = p;
          if ((*(const unsigned char *)p & 0xe0) == 0xc0) /* 110xxxxx */
            {
              if ( ((*(const unsigned char *)p & 0x1e) == 0))
index 07d7a8de815f8effcfa13fe48f9b17d21f374d46..8b2376fb2fc8bc58332bb19c2009b134f50fdbdc 100644 (file)
@@ -381,6 +381,7 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
     avahi_s_record_browser_free(r);
     avahi_s_host_name_resolver_free(hnr);
     avahi_s_address_resolver_free(ar);
+    avahi_s_domain_browser_free(db);
     avahi_s_service_type_browser_free(stb);
     avahi_s_service_browser_free(sb);
     avahi_s_service_resolver_free(sr);
index a1b7f73ec48db314de2c718e5cc4ba58cab381fd..da497bc4dcbadb4816d5dc301acb25d3fd55e135 100644 (file)
@@ -53,7 +53,7 @@ static int netlink_list_items(AvahiNetlink *nl, uint16_t type, unsigned *ret_seq
     n = (struct nlmsghdr*) req;
     n->nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg));
     n->nlmsg_type = type;
-    n->nlmsg_flags = NLM_F_ROOT|NLM_F_REQUEST;
+    n->nlmsg_flags = NLM_F_REQUEST|NLM_F_DUMP;
     n->nlmsg_pid = 0;
 
     gen = NLMSG_DATA(n);
@@ -181,8 +181,8 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat
         AvahiInterface *i;
         struct rtattr *a = NULL;
         size_t l;
-        AvahiAddress raddr;
-        int raddr_valid = 0;
+        AvahiAddress raddr, rlocal, *r;
+        int raddr_valid = 0, rlocal_valid = 0;
 
         /* We are only interested in IPv4 and IPv6 */
         if (ifaddrmsg->ifa_family != AF_INET && ifaddrmsg->ifa_family != AF_INET6)
@@ -195,7 +195,7 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat
             return;
 
         /* Fill in address family for our new address */
-        raddr.proto = avahi_af_to_proto(ifaddrmsg->ifa_family);
+        rlocal.proto = raddr.proto = avahi_af_to_proto(ifaddrmsg->ifa_family);
 
         l = NLMSG_PAYLOAD(n, sizeof(struct ifaddrmsg));
         a = IFA_RTA(ifaddrmsg);
@@ -203,8 +203,25 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat
         while (RTA_OK(a, l)) {
 
             switch(a->rta_type) {
+
                 case IFA_ADDRESS:
-                    /* Fill in address data */
+
+                    if ((rlocal.proto == AVAHI_PROTO_INET6 && RTA_PAYLOAD(a) != 16) ||
+                        (rlocal.proto == AVAHI_PROTO_INET && RTA_PAYLOAD(a) != 4))
+                        return;
+
+                    memcpy(rlocal.data.data, RTA_DATA(a), RTA_PAYLOAD(a));
+                    rlocal_valid = 1;
+
+                    break;
+
+                case IFA_LOCAL:
+
+                    /* Fill in local address data. Usually this is
+                     * preferable over IFA_ADDRESS if both are set,
+                     * since this refers to the local address of a PPP
+                     * link while IFA_ADDRESS refers to the other
+                     * end. */
 
                     if ((raddr.proto == AVAHI_PROTO_INET6 && RTA_PAYLOAD(a) != 16) ||
                         (raddr.proto == AVAHI_PROTO_INET && RTA_PAYLOAD(a) != 4))
@@ -223,17 +240,21 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat
         }
 
         /* If there was no adress attached to this message, let's quit. */
-        if (!raddr_valid)
+        if (rlocal_valid)
+            r = &rlocal;
+        else if (raddr_valid)
+            r = &raddr;
+        else
             return;
 
         if (n->nlmsg_type == RTM_NEWADDR) {
             AvahiInterfaceAddress *addr;
 
             /* This address is new or has been modified, so let's get an object for it */
-            if (!(addr = avahi_interface_monitor_get_address(m, i, &raddr)))
+            if (!(addr = avahi_interface_monitor_get_address(m, i, r)))
 
                 /* Mmm, no object existing yet, so let's create a new one */
-                if (!(addr = avahi_interface_address_new(m, i, &raddr, ifaddrmsg->ifa_prefixlen)))
+                if (!(addr = avahi_interface_address_new(m, i, r, ifaddrmsg->ifa_prefixlen)))
                     return; /* OOM */
 
             /* Update the scope field for the address */
@@ -244,7 +265,7 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat
             assert(n->nlmsg_type == RTM_DELADDR);
 
             /* Try to get a reference to our AvahiInterfaceAddress object for this address */
-            if (!(addr = avahi_interface_monitor_get_address(m, i, &raddr)))
+            if (!(addr = avahi_interface_monitor_get_address(m, i, r)))
                 return;
 
             /* And free it */
index 2b8f95fd56a50a234b5d891eba585391559279ce..86fd4a551e7341af4d3856687a99dfa6453cc7dd 100644 (file)
@@ -513,12 +513,20 @@ static void reflect_response(AvahiServer *s, AvahiInterface *i, AvahiRecord *r,
 
 static void* reflect_cache_walk_callback(AvahiCache *c, AvahiKey *pattern, AvahiCacheEntry *e, void* userdata) {
     AvahiServer *s = userdata;
+    AvahiRecord* r;
 
     assert(c);
     assert(pattern);
     assert(e);
     assert(s);
 
+    /* Don't reflect cache entry with ipv6 link-local addresses. */
+    r = e->record;
+    if ((r->key->type == AVAHI_DNS_TYPE_AAAA) &&
+            (r->data.aaaa.address.address[0] == 0xFE) &&
+            (r->data.aaaa.address.address[1] == 0x80))
+      return NULL;
+
     avahi_record_list_push(s->record_list, e->record, e->cache_flush, 0, 0);
     return NULL;
 }
index be62105dba8788975d83b9f2a196f3a761b83bdd..e69ec7d42a7d1f947d1c7f3988e443dd68255873 100644 (file)
@@ -653,10 +653,6 @@ AvahiDnsPacket *avahi_recv_dns_packet_ipv4(
         goto fail;
     }
 
-    /* For corrupt packets FIONREAD returns zero size (See rhbz #607297) */
-    if (!ms)
-        goto fail;
-
     p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE);
 
     io.iov_base = AVAHI_DNS_PACKET_DATA(p);
@@ -683,10 +679,14 @@ AvahiDnsPacket *avahi_recv_dns_packet_ipv4(
         goto fail;
     }
 
-    if (sa.sin_addr.s_addr == INADDR_ANY) {
+    /* For corrupt packets FIONREAD returns zero size (See rhbz #607297). So
+     * fail after having read them. */
+    if (!ms)
+        goto fail;
+
+    if (sa.sin_addr.s_addr == INADDR_ANY)
         /* Linux 2.4 behaves very strangely sometimes! */
         goto fail;
-    }
 
     assert(!(msg.msg_flags & MSG_CTRUNC));
     assert(!(msg.msg_flags & MSG_TRUNC));
@@ -810,10 +810,6 @@ AvahiDnsPacket *avahi_recv_dns_packet_ipv6(
         goto fail;
     }
 
-    /* For corrupt packets FIONREAD returns zero size (See rhbz #607297) */
-    if (!ms)
-        goto fail;
-
     p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE);
 
     io.iov_base = AVAHI_DNS_PACKET_DATA(p);
@@ -841,6 +837,11 @@ AvahiDnsPacket *avahi_recv_dns_packet_ipv6(
         goto fail;
     }
 
+    /* For corrupt packets FIONREAD returns zero size (See rhbz #607297). So
+     * fail after having read them. */
+    if (!ms)
+        goto fail;
+
     assert(!(msg.msg_flags & MSG_CTRUNC));
     assert(!(msg.msg_flags & MSG_TRUNC));
 
index d796a399510703b45f2661262e3cc848e4419d8d..ccd56be090cc6b64d4454a5d8b4f804af7267fc2 100644 (file)
@@ -394,12 +394,14 @@ int avahi_chroot_helper_unlink(const char *fname) {
             return -1;
         }
 
-        if (write(helper_fd, &command, sizeof(command)) < 0) {
+        if (write(helper_fd, &command, sizeof(command)) < 0 &&
+            (errno != EPIPE && errno != ECONNRESET)) {
             avahi_log_error("write() failed: %s\n", strerror(errno));
             return -1;
         }
 
-        if ((r = read(helper_fd, &c, sizeof(c))) < 0) {
+        if ((r = read(helper_fd, &c, sizeof(c))) < 0 &&
+            (errno != EPIPE && errno != ECONNRESET)) {
             avahi_log_error("read() failed: %s\n", r < 0 ? strerror(errno) : "EOF");
             return -1;
         }
index 91ea8fae58f99d8b54fe94dfcfe43bcfcb1ddb74..eb8a6629a4c2541ee0ae34044b808ce8a041af54 100644 (file)
@@ -197,7 +197,7 @@ static DBusHandlerResult msg_signal_filter_impl(AVAHI_GCC_UNUSED DBusConnection
                 server->reconnect_timeout = server->poll_api->timeout_new(server->poll_api, &tv, reconnect_callback, NULL);
         } else {
             avahi_log_warn("Disconnected from D-Bus, exiting.");
-            raise(SIGQUIT);
+            raise(SIGTERM);
         }
 
         return DBUS_HANDLER_RESULT_HANDLED;
index 1e8b2559173a8bcef3147c2864c3f32ddfb87c4d..d46f40a8dddf990f6f5f07766e7e3d01b8f1be08 100644 (file)
@@ -1046,12 +1046,10 @@ static void signal_callback(AvahiWatch *watch, AVAHI_GCC_UNUSED int fd, AVAHI_GC
 
     switch (sig) {
         case SIGINT:
-        case SIGQUIT:
         case SIGTERM:
             avahi_log_info(
                     "Got %s, quitting.",
-                    sig == SIGINT ? "SIGINT" :
-                    (sig == SIGQUIT ? "SIGQUIT" : "SIGTERM"));
+                    sig == SIGINT ? "SIGINT" : "SIGTERM");
             avahi_simple_poll_quit(simple_poll_api);
             break;
 
@@ -1113,7 +1111,7 @@ static int run_server(DaemonConfig *c) {
 
     poll_api = avahi_simple_poll_get(simple_poll_api);
 
-    if (daemon_signal_init(SIGINT, SIGQUIT, SIGHUP, SIGTERM, SIGUSR1, 0) < 0) {
+    if (daemon_signal_init(SIGINT, SIGHUP, SIGTERM, SIGUSR1, 0) < 0) {
         avahi_log_error("Could not register signal handlers (%s).", strerror(errno));
         goto finish;
     }
index 316fccc50a2fa806de374e0f55f12b10e6ce6c47..6d1eebff07c68a977abc325a3c9c3592839a24ee 100644 (file)
@@ -40,6 +40,7 @@
 #include <string.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include <stddef.h>
 
 #include "sd-daemon.h"
 
@@ -307,17 +308,17 @@ int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t
 
                 if (length <= 0)
                         /* Unnamed socket */
-                        return l == sizeof(sa_family_t);
+                        return l == offsetof(struct sockaddr_un, sun_path);
 
                 if (path[0])
                         /* Normal path socket */
                         return
-                                (l >= sizeof(sa_family_t) + length + 1) &&
+                                (l >= offsetof(struct sockaddr_un, sun_path) + length + 1) &&
                                 memcmp(path, sockaddr.un.sun_path, length+1) == 0;
                 else
                         /* Abstract namespace socket */
                         return
-                                (l == sizeof(sa_family_t) + length) &&
+                                (l == offsetof(struct sockaddr_un, sun_path) + length) &&
                                 memcmp(path, sockaddr.un.sun_path, length) == 0;
         }
 
@@ -366,7 +367,7 @@ int sd_notify(int unset_environment, const char *state) {
 
         memset(&msghdr, 0, sizeof(msghdr));
         msghdr.msg_name = &sockaddr;
-        msghdr.msg_namelen = sizeof(sa_family_t) + strlen(e);
+        msghdr.msg_namelen = offsetof(struct sockaddr_un, sun_path) + strlen(e);
 
         if (msghdr.msg_namelen > sizeof(struct sockaddr_un))
                 msghdr.msg_namelen = sizeof(struct sockaddr_un);
@@ -433,41 +434,3 @@ int sd_booted(void) {
         return a.st_dev != b.st_dev;
 #endif
 }
-
-static int touch(const char *path) {
-
-#if !defined(DISABLE_SYSTEMD) && defined(__linux__)
-        int fd;
-
-        mkdir("/dev/.systemd", 0755);
-        mkdir("/dev/.systemd/readahead", 0755);
-
-        if ((fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, 0666)) < 0)
-                return -errno;
-
-        for (;;) {
-                if (close(fd) >= 0)
-                        break;
-
-                if (errno != -EINTR)
-                        return -errno;
-        }
-
-#endif
-        return 0;
-}
-
-int sd_readahead(const char *action) {
-
-        if (!action)
-                return -EINVAL;
-
-        if (strcmp(action, "cancel") == 0)
-                return touch("/dev/.systemd/readahead/cancel");
-        else if (strcmp(action, "done") == 0)
-                return touch("/dev/.systemd/readahead/done");
-        else if (strcmp(action, "noreplay") == 0)
-                return touch("/dev/.systemd/readahead/noreplay");
-
-        return -EINVAL;
-}
index 2fbfe955cef5c98a3cb4a2b6fb56ebd2a0fb49b6..4b853a15bec92fa98785fdb6638cfd2d22f67dd9 100644 (file)
@@ -67,17 +67,21 @@ extern "C" {
   See sd-daemon(7) for more information.
 */
 
+#ifndef _sd_printf_attr_
 #if __GNUC__ >= 4
 #define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
 #else
 #define _sd_printf_attr_(a,b)
 #endif
+#endif
 
+#ifndef _sd_hidden_
 #if (__GNUC__ >= 4) && !defined(SD_EXPORT_SYMBOLS)
 #define _sd_hidden_ __attribute__ ((visibility("hidden")))
 #else
 #define _sd_hidden_
 #endif
+#endif
 
 /*
   Log levels for usage on stderr:
@@ -181,7 +185,7 @@ int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t
      READY=1      Tells systemd that daemon startup is finished (only
                   relevant for services of Type=notify). The passed
                   argument is a boolean "1" or "0". Since there is
-                  little value in signalling non-readiness the only
+                  little value in signaling non-readiness the only
                   value daemons should send is "READY=1".
 
      STATUS=...   Passes a single-line status string back to systemd
@@ -202,7 +206,7 @@ int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t
                   fork off the process itself. Example: "MAINPID=4711"
 
   Daemons can choose to send additional variables. However, it is
-  recommened to prefix variable names not listed above with X_.
+  recommended to prefix variable names not listed above with X_.
 
   Returns a negative errno-style error code on failure. Returns > 0
   if systemd could be notified, 0 if it couldn't possibly because
@@ -248,22 +252,12 @@ int sd_notifyf(int unset_environment, const char *format, ...) _sd_printf_attr_(
   fine. You should NOT protect them with a call to this function. Also
   note that this function checks whether the system, not the user
   session is controlled by systemd. However the functions above work
-  for both session and system services.
+  for both user and system services.
 
   See sd_booted(3) for more information.
 */
 int sd_booted(void) _sd_hidden_;
 
-/*
-  Controls ongoing disk read-ahead operations during boot-up. The argument
-  must be a string, and either "cancel", "done" or "noreplay".
-
-  cancel = terminate read-ahead data collection, drop collected information
-  done = terminate read-ahead data collection, keep collected information
-  noreplay = terminate read-ahead replay
-*/
-int sd_readahead(const char *action);
-
 #ifdef __cplusplus
 }
 #endif
index aef3555751a666e8ca5266fdb979b575d62c9e25..e6f0941641749119761fe831b09b09767cc8a796 100644 (file)
@@ -85,7 +85,7 @@ void avahi_set_proc_title(const char *name, const char *fmt,...) {
     va_end(ap);
 
     setproctitle("-%s", t);
-#elif __linux__
+#elif defined(__linux__)
     size_t l;
     va_list ap;
 
index 7f755621f926a647f26905d30db2e2c88169d1d6..3e0ebb114444a665e046b9b0d9ada1c10d0c73c6 100644 (file)
@@ -475,7 +475,7 @@ int simple_protocol_setup(const AvahiPoll *poll_api) {
     if (n == 1) {
         int r;
 
-        if ((r = sd_is_socket(AF_LOCAL, SOCK_STREAM, 1, 0)) < 0) {
+        if ((r = sd_is_socket(SD_LISTEN_FDS_START, AF_LOCAL, SOCK_STREAM, 1)) < 0) {
             avahi_log_warn("Passed systemd file descriptor is of wrong type: %s", strerror(-r));
             goto fail;
         }
index bd12b7ef93bdb3e0abdd4600f486dcde9b6d36fd..89f436debdf24c5bca8317b1f67d0981063a6f92 100644 (file)
@@ -23,7 +23,6 @@ After=syslog.target avahi-daemon.socket
 [Service]
 Type=simple
 ExecStart=@sbindir@/avahi-dnsconfd -s
-ExecReload=@sbindir@/avahi-dnsconfd -r
 
 [Install]
 WantedBy=multi-user.target
index abd03cd2b6829c3474161bf555edf43d3d64aba6..3c3b80e231c4dc5d4e8b45d4455b396826c291e9 100644 (file)
@@ -330,14 +330,14 @@ static void _avahi_service_browser_cb(AvahiServiceBrowser * b, AvahiIfIndex inte
     }
 }
 
-GaServiceBrowser *ga_service_browser_new(gchar * type) {
+GaServiceBrowser *ga_service_browser_new(const gchar * type) {
     return ga_service_browser_new_full(AVAHI_IF_UNSPEC,
                                        AVAHI_PROTO_UNSPEC, type, NULL, 0);
 }
 
 GaServiceBrowser *ga_service_browser_new_full(AvahiIfIndex interface,
                                               AvahiProtocol protocol,
-                                              gchar * type, gchar * domain,
+                                              const gchar * type, gchar * domain,
                                               GaLookupFlags flags) {
     return g_object_new(GA_TYPE_SERVICE_BROWSER,
                         "interface", interface,
index d625279445cdb4db418c1bac1cf76061758e7503..eaead4be83cbc90619f07ab3d2631fb7a628ecb8 100644 (file)
@@ -55,11 +55,11 @@ GType ga_service_browser_get_type(void);
 #define GA_SERVICE_BROWSER_GET_CLASS(obj) \
   (G_TYPE_INSTANCE_GET_CLASS ((obj), GA_TYPE_SERVICE_BROWSER, GaServiceBrowserClass))
 
-GaServiceBrowser *ga_service_browser_new(gchar * type);
+GaServiceBrowser *ga_service_browser_new(const gchar * type);
 
 GaServiceBrowser *ga_service_browser_new_full(AvahiIfIndex interface,
                                               AvahiProtocol protocol,
-                                              gchar * type, gchar * domain,
+                                              const gchar * type, gchar * domain,
                                               GaLookupFlags flags);
 
 gboolean
index cea1ff9f6af74a4e3706e93326ae8dc479b01f4f..362d3b697d73d9f233e09faa7c19b29864b606a4 100755 (executable)
@@ -236,7 +236,7 @@ class Main_window:
     def insert_row(self, model,parent,
                    content, name, interface,protocol,stype,domain):
         myiter=model.insert_after(parent,None)
-        model.set(myiter,0,content,1,name,2,interface,3,protocol,4,stype,5,domain)
+        model.set(myiter,0,content,1,name,2,str(interface),3,str(protocol),4,stype,5,domain)
         return myiter
 
     def new(self):
index 2569ba0cc0f4a49e1f40d74588b5bf99769e6f88..92d765aa1a8b40f426771d094b5d1e0834a63d08 100644 (file)
@@ -890,7 +890,7 @@ static void response_callback(GtkDialog *dialog, gint response, gpointer user_da
         gtk_widget_set_sensitive(GTK_WIDGET(dialog), FALSE);
         cursor = gdk_cursor_new(GDK_WATCH);
         gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(dialog)), cursor);
-        gdk_cursor_unref(cursor);
+        g_object_unref(G_OBJECT(cursor));
 
         if (!(d->priv->resolver = avahi_service_resolver_new(
                       d->priv->client, interface, protocol, name, type, d->priv->domain,
index f2377b750d1c447d70b1601ae2b57021f00263d7..b9aa356220e9ddc2cb708447fc51733e12408259 100644 (file)
@@ -19,7 +19,7 @@
 # USA.
 
 AC_PREREQ(2.63)
-AC_INIT([avahi],[0.6.28],[avahi (at) lists (dot) freedesktop (dot) org])
+AC_INIT([avahi],[0.6.29],[avahi (at) lists (dot) freedesktop (dot) org])
 AC_CONFIG_SRCDIR([avahi-core/server.c])
 AC_CONFIG_MACRO_DIR([common])
 AC_CONFIG_HEADERS([config.h])
@@ -28,13 +28,13 @@ AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax])
 AC_SUBST(PACKAGE_URL, [http://avahi.org/])
 
 AC_SUBST(LIBAVAHI_COMMON_VERSION_INFO, [8:2:5])
-AC_SUBST(LIBAVAHI_CORE_VERSION_INFO, [7:0:0])
+AC_SUBST(LIBAVAHI_CORE_VERSION_INFO, [7:1:0])
 AC_SUBST(LIBAVAHI_CLIENT_VERSION_INFO, [5:8:2])
 AC_SUBST(LIBAVAHI_GLIB_VERSION_INFO, [1:2:0])
-AC_SUBST(LIBAVAHI_GOBJECT_VERSION_INFO, [0:3:0])
+AC_SUBST(LIBAVAHI_GOBJECT_VERSION_INFO, [0:4:0])
 AC_SUBST(LIBAVAHI_QT3_VERSION_INFO, [1:2:0])
 AC_SUBST(LIBAVAHI_QT4_VERSION_INFO, [1:2:0])
-AC_SUBST(LIBAVAHI_UI_VERSION_INFO, [1:3:1])
+AC_SUBST(LIBAVAHI_UI_VERSION_INFO, [1:4:1])
 
 # Do not touch these, since they we took this version-info from upstream HOWL/Bonjour
 AC_SUBST(LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO, [1:0:0])
index 1dd7afd864e51ac553de3da0b0c633718c66151d..20f8fd87c73405d61f200da58775506c71b3f4cf 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -1,3 +1,16 @@
+Avahi 0.6.29
+============
+
+This is a bugfix release.
+
+ * Updates regarding systemd integration
+ * Compatibility with newer gtk3 and gobject introspection
+ * i18n updates
+ * Minor other updates
+ * Fix CVE-2011-1002, fixing the fix for CVE-2010-2244
+
+This release is backwards compatible with Avahi 0.6.x with x < 29.
+
 Avahi 0.6.28
 ============
 
index 851006cf722480fba03398ea8d532f424ff74ce2..0dc5f9fb5c1e74ec862d6f07f4a6722e124f9498 100644 (file)
@@ -2,6 +2,7 @@
 ### BEGIN INIT INFO
 # Provides:          avahi
 # Required-Start:    $network $remote_fs dbus
+# Required-Stop:     $network $remote_fs dbus
 # Default-Start:     3 5
 # Default-Stop:
 # Short-Description: ZeroConf daemon
@@ -25,6 +26,18 @@ case "$1" in
                $AVAHI_BIN -k 2>/dev/null || /bin/true
                rc_status -v
                ;;
+       try-restart|condrestart)
+               if test "$1" = "condrestart"; then
+                       echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
+               fi
+               $0 status
+               if test $? = 0; then
+                       $0 restart
+               else
+                       rc_reset
+               fi
+               rc_status
+               ;;
        restart)
                $0 stop
                $0 start
@@ -41,7 +54,7 @@ case "$1" in
                rc_status -v
                ;;
        *)
-               echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
+               echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
                exit 1
                ;;
 esac
index e633b8d16cd168bab3a228fb47473966c6c73b2e..b88660ba77497bd8a777ad794040669ee929808f 100644 (file)
@@ -2,6 +2,7 @@
 ### BEGIN INIT INFO
 # Provides:          avahi-dnsconfd
 # Required-Start:    $remote_fs avahi
+# Required-Stop:     $remote_fs avahi
 # Default-Start:     3 5
 # Default-Stop:
 # Short-Description: ZeroConf daemon
@@ -30,6 +31,18 @@ case "$1" in
                $0 start
                rc_status
                ;;
+       try-restart|condrestart)
+               if test "$1" = "condrestart"; then
+                       echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
+               fi
+               $0 status
+               if test $? = 0; then
+                       $0 restart
+               else
+                       rc_reset
+               fi
+               rc_status
+               ;;
        force-reload|reload)
                echo -n "Reloading Avahi DNS Configuration daemon "
                $AVAHI_BIN -r
@@ -37,11 +50,11 @@ case "$1" in
                ;;
        status)
                echo -n "Checking for Avahi DNS Configuration daemon: "
-               $AVAHI_BIN -c
+               $AVAHI_BIN -c || _rc_status=3
                rc_status -v
                ;;
        *)
-               echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
+               echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
                exit 1
                ;;
 esac
index 477beb849a823ff2b8d94b100518533eb5f22184..7137c308a500d003feda3b46bf1b4b6f22d44b25 100644 (file)
@@ -69,7 +69,7 @@
 
          <option>
                <p><opt>-r | --refresh</opt></p>
-               <optdesc><p>Tell an already running avahi-autoipd to reannounce the acquired IP address on the specified network interface. (Equivalent to sending a SIGHUP)</p></optdesc>
+               <optdesc><p>Tell an already running avahi-autoipd to re-announce the acquired IP address on the specified network interface. (Equivalent to sending a SIGHUP)</p></optdesc>
          </option>
 
          <option>
 
       <option>
         <p><opt>-w | --wait</opt></p>
-        <optdesc><p>Wait until a IP address has been sucessfully acquired before detaching. Only valid in combination with <opt>--daemonize</opt>.</p></optdesc>
+        <optdesc><p>Wait until a IP address has been successfully acquired before detaching. Only valid in combination with <opt>--daemonize</opt>.</p></optdesc>
       </option>
 
       <option>
     </section>
 
     <section name="Signals">
-      <p><arg>SIGINT, SIGTERM, SIGQUIT</arg>: avahi-autoipd will shutdown. (Same as <opt>--kill</opt>)</p>
-      <p><arg>SIGHUP</arg>: avahi-autoipd will reannounce the acquired IP address. (Same as <opt>--refresh</opt>)</p>
+      <p><arg>SIGINT, SIGTERM</arg>: avahi-autoipd will shutdown. (Same as <opt>--kill</opt>)</p>
+      <p><arg>SIGHUP</arg>: avahi-autoipd will re-announce the acquired IP address. (Same as <opt>--refresh</opt>)</p>
     </section>
 
        <section name="Authors">
index 9dea446b7687df445b38d00d5ded05736ad8f5e2..5e4986fb4440e7ac0a5afd42f4734870af14d4a2 100644 (file)
@@ -40,7 +40,7 @@
       <option>
         <p><opt>argv[1]</opt> An event string: one of BIND, CONFLICT,
         UNBIND or STOP. If BIND is passed an IP address has been
-        sucessfully acquired and the script shall add it to the
+        successfully acquired and the script shall add it to the
         network interface. If CONFLICT is passed avahi-autopid
         detected a IP address on the local network, the action script
         should remove the configured IP address. If UNBIND is passed
index e93fc734f90a4e026d03b526b9effa5febcdf303..0c2990d3bda84786e66dbdc4b83238c160a51211 100644 (file)
     </section>
 
     <section name="Signals">
-      <p><arg>SIGINT, SIGTERM, SIGQUIT</arg>: avahi-daemon will shutdown. (Same as <opt>--kill</opt>).</p>
+      <p><arg>SIGINT, SIGTERM</arg>: avahi-daemon will shutdown. (Same as <opt>--kill</opt>).</p>
       <p><arg>SIGHUP</arg>: avahi-daemon will reload unicast DNS
       server data from <file>/etc/resolv.conf</file> and static
       service definitions from <file>@servicedir@/</file>. (Same as <opt>--reload</opt>)</p>
index e01ab44a43c7277ec7225014897d10a8452f2688..7b09cd4281ac76c1cd7da984813031ec30c52dc3 100644 (file)
@@ -84,7 +84,7 @@
     </section>
 
     <section name="Signals">
-      <p><arg>SIGINT, SIGTERM, SIGQUIT</arg>: avahi-dnsconfd will shutdown. This is issued by passing --kill to avahi-daemon.</p>
+      <p><arg>SIGINT, SIGTERM</arg>: avahi-dnsconfd will shutdown. This is issued by passing --kill to avahi-daemon.</p>
       <p><arg>SIGHUP</arg>: avahi-dnsconfd will refresh the DNS server data.</p>
     </section>