commit
47e80c6f15
@ -0,0 +1 @@
|
||||
969a50ae18c8d8e2288435a75666dd076e69852a SOURCES/avahi-0.8.tar.gz
|
@ -0,0 +1 @@
|
||||
SOURCES/avahi-0.8.tar.gz
|
@ -0,0 +1,25 @@
|
||||
From 374245ec1418e7e1e57120fcaf0a12ec695f5f6d Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Wed, 24 Oct 2018 15:22:19 +0000
|
||||
Subject: [PATCH] avahi-client: fix resource leak
|
||||
|
||||
---
|
||||
avahi-client/browser.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/avahi-client/browser.c b/avahi-client/browser.c
|
||||
index c978d94..fa4a9a8 100644
|
||||
--- a/avahi-client/browser.c
|
||||
+++ b/avahi-client/browser.c
|
||||
@@ -72,6 +72,8 @@ static void parse_domain_file(AvahiDomainBrowser *b) {
|
||||
if (avahi_normalize_name(buf, domain, sizeof(domain)))
|
||||
b->static_browse_domains = avahi_string_list_add(b->static_browse_domains, domain);
|
||||
}
|
||||
+
|
||||
+ fclose(f);
|
||||
}
|
||||
|
||||
static void domain_browser_ref(AvahiDomainBrowser *db) {
|
||||
--
|
||||
2.39.3 (Apple Git-146)
|
||||
|
@ -0,0 +1,31 @@
|
||||
From bf92dbc2c0cb39b4c970dcf700254ab5293b3756 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Mon, 5 Dec 2022 20:17:42 +0000
|
||||
Subject: [PATCH] avahi-core: rearrange deallocations in
|
||||
avahi_time_event_queue_new a bit
|
||||
|
||||
Reported by Coverity Scan.
|
||||
---
|
||||
avahi-core/timeeventq.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/avahi-core/timeeventq.c b/avahi-core/timeeventq.c
|
||||
index 2799bf2..beceaff 100644
|
||||
--- a/avahi-core/timeeventq.c
|
||||
+++ b/avahi-core/timeeventq.c
|
||||
@@ -135,10 +135,10 @@ AvahiTimeEventQueue* avahi_time_event_queue_new(const AvahiPoll *poll_api) {
|
||||
oom:
|
||||
|
||||
if (q) {
|
||||
- avahi_free(q);
|
||||
-
|
||||
if (q->prioq)
|
||||
avahi_prio_queue_free(q->prioq);
|
||||
+
|
||||
+ avahi_free(q);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
--
|
||||
2.39.3 (Apple Git-146)
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 9c3a314856affb288f701d2d3ee23278fc98eaee Mon Sep 17 00:00:00 2001
|
||||
From: Steve Langasek <steve.langasek@ubuntu.com>
|
||||
Date: Tue, 18 Feb 2020 15:43:19 +0800
|
||||
Subject: [PATCH 06/11] avahi-dnsconfd.service: Drop "Also=avahi-daemon.socket"
|
||||
|
||||
Also=avahi-daemon.socket' means that 'systemctl disable avahi-dnsconfd'
|
||||
ill also disable avahi-daemon.socket, which is definitely not what we
|
||||
ant, and it also causes debhelper to throw an error. Just drop this
|
||||
entry from the configuration.
|
||||
---
|
||||
avahi-dnsconfd/avahi-dnsconfd.service.in | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/avahi-dnsconfd/avahi-dnsconfd.service.in b/avahi-dnsconfd/avahi-dnsconfd.service.in
|
||||
index 95db79f..7c293da 100644
|
||||
--- a/avahi-dnsconfd/avahi-dnsconfd.service.in
|
||||
+++ b/avahi-dnsconfd/avahi-dnsconfd.service.in
|
||||
@@ -26,4 +26,3 @@ ExecStart=@sbindir@/avahi-dnsconfd -s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
-Also=avahi-daemon.socket
|
||||
--
|
||||
2.25.2
|
||||
|
@ -0,0 +1,35 @@
|
||||
From f983df44870b602179b493f9c3d113753b378e27 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Biebl <biebl@debian.org>
|
||||
Date: Sun, 17 Sep 2017 12:52:39 +0200
|
||||
Subject: [PATCH 07/11] man: add missing bshell.1 symlink
|
||||
|
||||
The bshell binary is missing a symlink to its manual page. It should be
|
||||
symlinked to the man page for bssh, just like how the bvnc man page is.
|
||||
|
||||
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=655190
|
||||
---
|
||||
man/Makefile.am | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/man/Makefile.am b/man/Makefile.am
|
||||
index d38267c..77a27bd 100644
|
||||
--- a/man/Makefile.am
|
||||
+++ b/man/Makefile.am
|
||||
@@ -137,12 +137,13 @@ BSSH_LN =
|
||||
if HAVE_GTK
|
||||
if HAVE_GLIB
|
||||
BSSH_LN += $(LN_S) bssh.1 bvnc.1 &&
|
||||
+BSSH_LN += $(LN_S) bssh.1 bshell.1 &&
|
||||
endif
|
||||
endif
|
||||
install-exec-local:
|
||||
mkdir -p $(DESTDIR)/$(mandir)/man1 && \
|
||||
cd $(DESTDIR)/$(mandir)/man1 && \
|
||||
- rm -f avahi-resolve-host-name.1 avahi-resolve-address.1 avahi-browse-domains.1 avahi-publish-address.1 avahi-publish-service.1 bvnc.1 && \
|
||||
+ rm -f avahi-resolve-host-name.1 avahi-resolve-address.1 avahi-browse-domains.1 avahi-publish-address.1 avahi-publish-service.1 bvnc.1 bshell.1 && \
|
||||
$(BSSH_LN) \
|
||||
$(LN_S) avahi-resolve.1 avahi-resolve-host-name.1 && \
|
||||
$(LN_S) avahi-resolve.1 avahi-resolve-address.1 && \
|
||||
--
|
||||
2.25.2
|
||||
|
@ -0,0 +1,52 @@
|
||||
From 751be804e891aec5701a059144e2f5cbfc981b36 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Henriksson <andreas@fatal.se>
|
||||
Date: Thu, 24 Aug 2017 17:52:19 +0200
|
||||
Subject: [PATCH 08/11] Ship avahi-discover(1), bssh(1) and bvnc(1) also for
|
||||
GTK3
|
||||
|
||||
These manpages went missing when you disabled gtk2 builds....
|
||||
---
|
||||
man/Makefile.am | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/man/Makefile.am b/man/Makefile.am
|
||||
index 77a27bd..289b942 100644
|
||||
--- a/man/Makefile.am
|
||||
+++ b/man/Makefile.am
|
||||
@@ -56,7 +56,7 @@ man_MANS += \
|
||||
avahi-publish.1 \
|
||||
avahi-set-host-name.1
|
||||
|
||||
-if HAVE_GTK
|
||||
+if HAVE_GTK2OR3
|
||||
man_MANS += \
|
||||
bssh.1
|
||||
endif
|
||||
@@ -64,12 +64,13 @@ endif
|
||||
if HAVE_PYTHON
|
||||
man_MANS += \
|
||||
avahi-bookmarks.1
|
||||
-if HAVE_GTK
|
||||
+endif
|
||||
+
|
||||
+if HAVE_PYGOBJECT
|
||||
man_MANS += \
|
||||
avahi-discover.1
|
||||
endif
|
||||
endif
|
||||
-endif
|
||||
|
||||
if ENABLE_AUTOIPD
|
||||
if HAVE_LIBDAEMON
|
||||
@@ -134,7 +135,7 @@ EXTRA_DIST = \
|
||||
if HAVE_DBUS
|
||||
|
||||
BSSH_LN =
|
||||
-if HAVE_GTK
|
||||
+if HAVE_GTK2OR3
|
||||
if HAVE_GLIB
|
||||
BSSH_LN += $(LN_S) bssh.1 bvnc.1 &&
|
||||
BSSH_LN += $(LN_S) bssh.1 bshell.1 &&
|
||||
--
|
||||
2.25.2
|
||||
|
@ -0,0 +1,24 @@
|
||||
From 366e3798bdbd6b7bf24e59379f4a9a51af575ce9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tomasz=20Pawe=C5=82=20Gajc?= <tpgxyz@gmail.com>
|
||||
Date: Thu, 20 Feb 2020 16:09:40 +0100
|
||||
Subject: [PATCH 09/11] fix requires in pc file
|
||||
|
||||
---
|
||||
avahi-libevent.pc.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/avahi-libevent.pc.in b/avahi-libevent.pc.in
|
||||
index a1dca01..3356b0b 100644
|
||||
--- a/avahi-libevent.pc.in
|
||||
+++ b/avahi-libevent.pc.in
|
||||
@@ -6,6 +6,6 @@ includedir=${prefix}/include
|
||||
Name: avahi-libevent
|
||||
Description: Avahi Multicast DNS Responder (libevent Support)
|
||||
Version: @PACKAGE_VERSION@
|
||||
-Requires: libevent-2.1.5
|
||||
+Requires: libevent >= 2.1.5
|
||||
Libs: -L${libdir} -lavahi-libevent
|
||||
Cflags: -D_REENTRANT -I${includedir}
|
||||
--
|
||||
2.25.2
|
||||
|
@ -0,0 +1,32 @@
|
||||
From a94f72081dd1d546a1d95d860311a1242315bb28 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=89ric=20Araujo?= <merwok@netwok.org>
|
||||
Date: Sat, 29 Feb 2020 19:14:04 -0500
|
||||
Subject: [PATCH 10/11] fix bytestring decoding for proper display
|
||||
|
||||
---
|
||||
avahi-python/avahi-discover/avahi-discover.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/avahi-python/avahi-discover/avahi-discover.py b/avahi-python/avahi-discover/avahi-discover.py
|
||||
index 0db705d..4a2b575 100755
|
||||
--- a/avahi-python/avahi-discover/avahi-discover.py
|
||||
+++ b/avahi-python/avahi-discover/avahi-discover.py
|
||||
@@ -238,12 +238,15 @@ class Main_window:
|
||||
txts+="<b>" + _("TXT") + " <i>%s</i></b> = %s\n" % (k,v)
|
||||
else:
|
||||
txts = "<b>" + _("TXT Data:") + "</b> <i>" + _("empty") + "</i>"
|
||||
+
|
||||
+ txts = txts.decode("utf-8")
|
||||
|
||||
infos = "<b>" + _("Service Type:") + "</b> %s\n"
|
||||
infos += "<b>" + _("Service Name:") + "</b> %s\n"
|
||||
infos += "<b>" + _("Domain Name:") + "</b> %s\n"
|
||||
infos += "<b>" + _("Interface:") + "</b> %s %s\n"
|
||||
infos += "<b>" + _("Address:") + "</b> %s/%s:%i\n%s"
|
||||
+ infos = infos.decode("utf-8")
|
||||
infos = infos % (stype, name, domain, self.siocgifname(interface), self.protoname(protocol), host, address, port, txts.strip())
|
||||
self.info_label.set_markup(infos)
|
||||
|
||||
--
|
||||
2.25.2
|
||||
|
@ -0,0 +1,33 @@
|
||||
From b897ca43ac100d326d118e5877da710eb7f836f9 Mon Sep 17 00:00:00 2001
|
||||
From: traffic-millions <60914101+traffic-millions@users.noreply.github.com>
|
||||
Date: Tue, 3 Mar 2020 11:15:48 +0800
|
||||
Subject: [PATCH 11/11] avahi_dns_packet_consume_uint32: fix potential
|
||||
undefined behavior
|
||||
|
||||
avahi_dns_packet_consume_uint32 left shifts uint8_t values by 8, 16 and 24 bits to combine them into a 32-bit value. This produces an undefined behavior warning with gcc -fsanitize when fed input values of 128 or 255 however in testing no actual unexpected behavior occurs in practice and the 32-bit uint32_t is always correctly produced as the final value is immediately stored into a uint32_t and the compiler appears to handle this "correctly".
|
||||
|
||||
Cast the intermediate values to uint32_t to prevent this warning and ensure the intended result is explicit.
|
||||
|
||||
Closes: #267
|
||||
Closes: #268
|
||||
Reference: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19304
|
||||
---
|
||||
avahi-core/dns.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/avahi-core/dns.c b/avahi-core/dns.c
|
||||
index 7c38f42..d793b76 100644
|
||||
--- a/avahi-core/dns.c
|
||||
+++ b/avahi-core/dns.c
|
||||
@@ -455,7 +455,7 @@ int avahi_dns_packet_consume_uint32(AvahiDnsPacket *p, uint32_t *ret_v) {
|
||||
return -1;
|
||||
|
||||
d = (uint8_t*) (AVAHI_DNS_PACKET_DATA(p) + p->rindex);
|
||||
- *ret_v = (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3];
|
||||
+ *ret_v = ((uint32_t)d[0] << 24) | ((uint32_t)d[1] << 16) | ((uint32_t)d[2] << 8) | (uint32_t)d[3];
|
||||
p->rindex += sizeof(uint32_t);
|
||||
|
||||
return 0;
|
||||
--
|
||||
2.25.2
|
||||
|
@ -0,0 +1,151 @@
|
||||
From 9d31939e55280a733d930b15ac9e4dda4497680c Mon Sep 17 00:00:00 2001
|
||||
From: Tommi Rantala <tommi.t.rantala@nokia.com>
|
||||
Date: Mon, 8 Feb 2021 11:04:43 +0200
|
||||
Subject: [PATCH 16/16] Fix NULL pointer crashes from #175
|
||||
|
||||
avahi-daemon is crashing when running "ping .local".
|
||||
The crash is due to failing assertion from NULL pointer.
|
||||
Add missing NULL pointer checks to fix it.
|
||||
|
||||
Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd
|
||||
---
|
||||
avahi-core/browse-dns-server.c | 5 ++++-
|
||||
avahi-core/browse-domain.c | 5 ++++-
|
||||
avahi-core/browse-service-type.c | 3 +++
|
||||
avahi-core/browse-service.c | 3 +++
|
||||
avahi-core/browse.c | 3 +++
|
||||
avahi-core/resolve-address.c | 5 ++++-
|
||||
avahi-core/resolve-host-name.c | 5 ++++-
|
||||
avahi-core/resolve-service.c | 5 ++++-
|
||||
8 files changed, 29 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/avahi-core/browse-dns-server.c b/avahi-core/browse-dns-server.c
|
||||
index 049752e..c2d914f 100644
|
||||
--- a/avahi-core/browse-dns-server.c
|
||||
+++ b/avahi-core/browse-dns-server.c
|
||||
@@ -343,7 +343,10 @@ AvahiSDNSServerBrowser *avahi_s_dns_server_browser_new(
|
||||
AvahiSDNSServerBrowser* b;
|
||||
|
||||
b = avahi_s_dns_server_browser_prepare(server, interface, protocol, domain, type, aprotocol, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_dns_server_browser_start(b);
|
||||
|
||||
return b;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/avahi-core/browse-domain.c b/avahi-core/browse-domain.c
|
||||
index f145d56..06fa70c 100644
|
||||
--- a/avahi-core/browse-domain.c
|
||||
+++ b/avahi-core/browse-domain.c
|
||||
@@ -253,7 +253,10 @@ AvahiSDomainBrowser *avahi_s_domain_browser_new(
|
||||
AvahiSDomainBrowser *b;
|
||||
|
||||
b = avahi_s_domain_browser_prepare(server, interface, protocol, domain, type, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_domain_browser_start(b);
|
||||
|
||||
return b;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/avahi-core/browse-service-type.c b/avahi-core/browse-service-type.c
|
||||
index fdd22dc..b1fc7af 100644
|
||||
--- a/avahi-core/browse-service-type.c
|
||||
+++ b/avahi-core/browse-service-type.c
|
||||
@@ -171,6 +171,9 @@ AvahiSServiceTypeBrowser *avahi_s_service_type_browser_new(
|
||||
AvahiSServiceTypeBrowser *b;
|
||||
|
||||
b = avahi_s_service_type_browser_prepare(server, interface, protocol, domain, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_service_type_browser_start(b);
|
||||
|
||||
return b;
|
||||
diff --git a/avahi-core/browse-service.c b/avahi-core/browse-service.c
|
||||
index 5531360..63e0275 100644
|
||||
--- a/avahi-core/browse-service.c
|
||||
+++ b/avahi-core/browse-service.c
|
||||
@@ -184,6 +184,9 @@ AvahiSServiceBrowser *avahi_s_service_browser_new(
|
||||
AvahiSServiceBrowser *b;
|
||||
|
||||
b = avahi_s_service_browser_prepare(server, interface, protocol, service_type, domain, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_service_browser_start(b);
|
||||
|
||||
return b;
|
||||
diff --git a/avahi-core/browse.c b/avahi-core/browse.c
|
||||
index 2941e57..e8a915e 100644
|
||||
--- a/avahi-core/browse.c
|
||||
+++ b/avahi-core/browse.c
|
||||
@@ -634,6 +634,9 @@ AvahiSRecordBrowser *avahi_s_record_browser_new(
|
||||
AvahiSRecordBrowser *b;
|
||||
|
||||
b = avahi_s_record_browser_prepare(server, interface, protocol, key, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_record_browser_start_query(b);
|
||||
|
||||
return b;
|
||||
diff --git a/avahi-core/resolve-address.c b/avahi-core/resolve-address.c
|
||||
index ac0b29b..e61dd24 100644
|
||||
--- a/avahi-core/resolve-address.c
|
||||
+++ b/avahi-core/resolve-address.c
|
||||
@@ -286,7 +286,10 @@ AvahiSAddressResolver *avahi_s_address_resolver_new(
|
||||
AvahiSAddressResolver *b;
|
||||
|
||||
b = avahi_s_address_resolver_prepare(server, interface, protocol, address, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_address_resolver_start(b);
|
||||
|
||||
return b;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/avahi-core/resolve-host-name.c b/avahi-core/resolve-host-name.c
|
||||
index 808b0e7..4e8e597 100644
|
||||
--- a/avahi-core/resolve-host-name.c
|
||||
+++ b/avahi-core/resolve-host-name.c
|
||||
@@ -318,7 +318,10 @@ AvahiSHostNameResolver *avahi_s_host_name_resolver_new(
|
||||
AvahiSHostNameResolver *b;
|
||||
|
||||
b = avahi_s_host_name_resolver_prepare(server, interface, protocol, host_name, aprotocol, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_host_name_resolver_start(b);
|
||||
|
||||
return b;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/avahi-core/resolve-service.c b/avahi-core/resolve-service.c
|
||||
index 66bf3ca..4377176 100644
|
||||
--- a/avahi-core/resolve-service.c
|
||||
+++ b/avahi-core/resolve-service.c
|
||||
@@ -519,7 +519,10 @@ AvahiSServiceResolver *avahi_s_service_resolver_new(
|
||||
AvahiSServiceResolver *b;
|
||||
|
||||
b = avahi_s_service_resolver_prepare(server, interface, protocol, name, type, domain, aprotocol, flags, callback, userdata);
|
||||
+ if (!b)
|
||||
+ return NULL;
|
||||
+
|
||||
avahi_s_service_resolver_start(b);
|
||||
|
||||
return b;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,29 @@
|
||||
From 66a684b988052664669158819fc123469b714f50 Mon Sep 17 00:00:00 2001
|
||||
From: Rex Dieter <rdieter@gmail.com>
|
||||
Date: Tue, 17 Nov 2020 16:42:00 -0600
|
||||
Subject: [PATCH 16/16] fix QT3 build
|
||||
|
||||
recent commit d1e71b320d96d0f213ecb0885c8313039a09f693 adding QT5
|
||||
support added a new conditional
|
||||
but failed to actually set the define. This commit adds that to
|
||||
allow successful build when enabling QT3 support
|
||||
---
|
||||
avahi-qt/Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/avahi-qt/Makefile.am b/avahi-qt/Makefile.am
|
||||
index 09ce7ca..b404810 100644
|
||||
--- a/avahi-qt/Makefile.am
|
||||
+++ b/avahi-qt/Makefile.am
|
||||
@@ -38,7 +38,7 @@ libavahi_qt3_la_SOURCES = \
|
||||
qt-watch.moc3: qt-watch.cpp
|
||||
$(AM_V_GEN)$(MOC_QT3) $^ > $@
|
||||
|
||||
-libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) $(VISIBILITY_HIDDEN_CFLAGS)
|
||||
+libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) -DQT3 $(VISIBILITY_HIDDEN_CFLAGS)
|
||||
libavahi_qt3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT3_LIBS)
|
||||
libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO)
|
||||
endif
|
||||
--
|
||||
2.28.0
|
||||
|
@ -0,0 +1,56 @@
|
||||
From a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
||||
Date: Thu, 17 Nov 2022 01:51:53 +0100
|
||||
Subject: [PATCH] Emit error if requested service is not found
|
||||
|
||||
It currently just crashes instead of replying with error. Check return
|
||||
value and emit error instead of passing NULL pointer to reply.
|
||||
|
||||
Fixes #375
|
||||
---
|
||||
avahi-daemon/dbus-protocol.c | 20 ++++++++++++++------
|
||||
1 file changed, 14 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c
|
||||
index 70d7687..406d0b4 100644
|
||||
--- a/avahi-daemon/dbus-protocol.c
|
||||
+++ b/avahi-daemon/dbus-protocol.c
|
||||
@@ -375,10 +375,14 @@ static DBusHandlerResult dbus_get_alternative_host_name(DBusConnection *c, DBusM
|
||||
}
|
||||
|
||||
t = avahi_alternative_host_name(n);
|
||||
- avahi_dbus_respond_string(c, m, t);
|
||||
- avahi_free(t);
|
||||
+ if (t) {
|
||||
+ avahi_dbus_respond_string(c, m, t);
|
||||
+ avahi_free(t);
|
||||
|
||||
- return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ } else {
|
||||
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Hostname not found");
|
||||
+ }
|
||||
}
|
||||
|
||||
static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DBusMessage *m, DBusError *error) {
|
||||
@@ -389,10 +393,14 @@ static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DB
|
||||
}
|
||||
|
||||
t = avahi_alternative_service_name(n);
|
||||
- avahi_dbus_respond_string(c, m, t);
|
||||
- avahi_free(t);
|
||||
+ if (t) {
|
||||
+ avahi_dbus_respond_string(c, m, t);
|
||||
+ avahi_free(t);
|
||||
|
||||
- return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ } else {
|
||||
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Service not found");
|
||||
+ }
|
||||
}
|
||||
|
||||
static DBusHandlerResult dbus_create_new_entry_group(DBusConnection *c, DBusMessage *m, DBusError *error) {
|
||||
--
|
||||
2.38.1
|
||||
|
@ -0,0 +1,50 @@
|
||||
diff -uNr avahi-0.6.30.old/avahi-sharp/Makefile.am avahi-0.6.30/avahi-sharp/Makefile.am
|
||||
--- avahi-0.6.30.old/avahi-sharp/Makefile.am 2010-06-29 05:30:35.000000000 +0200
|
||||
+++ avahi-0.6.30/avahi-sharp/Makefile.am 2011-11-27 17:03:04.933192204 +0100
|
||||
@@ -73,10 +73,10 @@
|
||||
endif
|
||||
|
||||
install-data-hook: $(ASSEMBLY)
|
||||
- $(AM_V_GEN)MONO_SHARED_DIR=. $(GACUTIL) /i $(ASSEMBLY) /package avahi-sharp /gacdir $(libdir) /root $(DESTDIR)$(libdir)
|
||||
+ $(AM_V_GEN)MONO_SHARED_DIR=. $(GACUTIL) /i $(ASSEMBLY) /package avahi-sharp /gacdir $(prefix)/lib /root $(DESTDIR)$(prefix)/lib
|
||||
|
||||
uninstall-hook: $(ASSEMBLY)
|
||||
- $(AM_V_GEN)MONO_SHARED_DIR=. $(GACUTIL) /u avahi-sharp /package avahi-sharp /gacdir $(libdir) /root $(DESTDIR)$(libdir)
|
||||
+ $(AM_V_GEN)MONO_SHARED_DIR=. $(GACUTIL) /u avahi-sharp /package avahi-sharp /gacdir $(prefix)/lib /root $(DESTDIR)$(prefix)/lib
|
||||
|
||||
endif
|
||||
endif
|
||||
diff -uNr avahi-0.6.30.old/avahi-sharp.pc.in avahi-0.6.30/avahi-sharp.pc.in
|
||||
--- avahi-0.6.30.old/avahi-sharp.pc.in 2010-06-25 02:54:22.000000000 +0200
|
||||
+++ avahi-0.6.30/avahi-sharp.pc.in 2011-11-27 17:00:05.482192846 +0100
|
||||
@@ -5,4 +5,4 @@
|
||||
Name: avahi-sharp
|
||||
Description: Mono bindings for the Avahi mDNS/DNS-SD stack
|
||||
Version: @PACKAGE_VERSION@
|
||||
-Libs: -r:${libdir}/mono/avahi-sharp/avahi-sharp.dll
|
||||
+Libs: -r:${prefix}/lib/mono/avahi-sharp/avahi-sharp.dll
|
||||
diff -uNr avahi-0.6.30.old/avahi-ui-sharp/Makefile.am avahi-0.6.30/avahi-ui-sharp/Makefile.am
|
||||
--- avahi-0.6.30.old/avahi-ui-sharp/Makefile.am 2010-06-29 05:30:35.000000000 +0200
|
||||
+++ avahi-0.6.30/avahi-ui-sharp/Makefile.am 2011-11-27 17:04:59.812193067 +0100
|
||||
@@ -60,10 +60,10 @@
|
||||
endif
|
||||
|
||||
install-data-hook: $(ASSEMBLY)
|
||||
- $(GACUTIL) /i $(ASSEMBLY) /package avahi-ui-sharp /gacdir $(libdir) /root $(DESTDIR)$(libdir)
|
||||
+ $(GACUTIL) /i $(ASSEMBLY) /package avahi-ui-sharp /gacdir $(prefix)/lib /root $(DESTDIR)$(prefix)/lib
|
||||
|
||||
uninstall-hook: $(ASSEMBLY)
|
||||
- $(GACUTIL) /u avahi-ui-sharp /package avahi-ui-sharp /gacdir $(libdir) /root $(DESTDIR)$(libdir)
|
||||
+ $(GACUTIL) /u avahi-ui-sharp /package avahi-ui-sharp /gacdir $(prefix)/lib /root $(DESTDIR)$(prefix)/lib
|
||||
|
||||
endif
|
||||
endif
|
||||
diff -uNr avahi-0.6.30.old/avahi-ui-sharp.pc.in avahi-0.6.30/avahi-ui-sharp.pc.in
|
||||
--- avahi-0.6.30.old/avahi-ui-sharp.pc.in 2010-06-25 02:54:22.000000000 +0200
|
||||
+++ avahi-0.6.30/avahi-ui-sharp.pc.in 2011-11-27 17:04:05.077192737 +0100
|
||||
@@ -6,4 +6,4 @@
|
||||
Description: Mono bindings for the Avahi mDNS/DNS-SD stack
|
||||
Version: @PACKAGE_VERSION@
|
||||
Requires: gtk-sharp-2.0
|
||||
-Libs: -r:${libdir}/mono/avahi-ui-sharp/avahi-ui-sharp.dll
|
||||
+Libs: -r:${prefix}/lib/mono/avahi-ui-sharp/avahi-ui-sharp.dll
|
@ -0,0 +1,41 @@
|
||||
diff -up avahi-0.8/avahi-ui/bssh.c.vnc avahi-0.8/avahi-ui/bssh.c
|
||||
--- avahi-0.8/avahi-ui/bssh.c.vnc 2024-06-27 09:18:51.742457490 +0200
|
||||
+++ avahi-0.8/avahi-ui/bssh.c 2024-06-27 09:43:06.669594577 +0200
|
||||
@@ -186,11 +186,14 @@ int main(int argc, char*argv[]) {
|
||||
|
||||
if (avahi_domain_equal(t, "_rfb._tcp")) {
|
||||
char p[AVAHI_DOMAIN_NAME_MAX+16];
|
||||
- snprintf(p, sizeof(p), "%s:%u", h, aui_service_dialog_get_port(AUI_SERVICE_DIALOG(d))-5900);
|
||||
+ char p_prefixed[AVAHI_DOMAIN_NAME_MAX+22];
|
||||
|
||||
+ snprintf(p, sizeof(p), "%s:%u", h, aui_service_dialog_get_port(AUI_SERVICE_DIALOG(d))-5900);
|
||||
+ snprintf(p_prefixed, sizeof(p_prefixed), "vnc://%s:%u", h, aui_service_dialog_get_port(AUI_SERVICE_DIALOG(d))-5900);
|
||||
gtk_widget_destroy(d);
|
||||
|
||||
- g_print("vncviewer %s\n", p);
|
||||
+ g_print("gnome-connections %s\n", p);
|
||||
+ execlp("gnome-connections", "gnome-connections", p_prefixed, NULL);
|
||||
execlp("xvncviewer", "xvncviewer", p, NULL);
|
||||
execlp("vncviewer", "vncviewer", p, NULL);
|
||||
|
||||
diff -up avahi-0.8/man/bssh.1.xml.in.vnc avahi-0.8/man/bssh.1.xml.in
|
||||
--- avahi-0.8/man/bssh.1.xml.in.vnc 2024-06-27 09:16:56.485135447 +0200
|
||||
+++ avahi-0.8/man/bssh.1.xml.in 2024-06-27 09:18:35.817412999 +0200
|
||||
@@ -32,7 +32,7 @@
|
||||
<description>
|
||||
<p>bssh/bvnc/bshell browses for SSH/VNC servers on the local
|
||||
network, shows them in a GUI for the user to select one and
|
||||
- finally calls ssh/vncviewer after a selection was made.</p>
|
||||
+ finally calls ssh/GNOME Connections after a selection was made.</p>
|
||||
|
||||
<p>If the binary is called as bssh only ssh servers will be shown. If the binary is called as bvnc only VNC servers will be shown. If the binary is called as bshell both VNC and SSH servers are shown.</p>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
<section name="See also">
|
||||
<p>
|
||||
- <manref name="avahi-browse" section="1"/>, <manref name="ssh" section="1"/>, <manref name="vncviewer" section="1"/>
|
||||
+ <manref name="avahi-browse" section="1"/>, <manref name="ssh" section="1"/>
|
||||
</p>
|
||||
</section>
|
||||
|
@ -0,0 +1,66 @@
|
||||
diff -up avahi-0.8/avahi-qt/Makefile.am.no_undefined avahi-0.8/avahi-qt/Makefile.am
|
||||
--- avahi-0.8/avahi-qt/Makefile.am.no_undefined 2018-09-14 00:31:28.490023071 -0500
|
||||
+++ avahi-0.8/avahi-qt/Makefile.am 2020-11-17 16:35:04.646045499 -0600
|
||||
@@ -38,9 +38,9 @@ libavahi_qt3_la_SOURCES = \
|
||||
qt-watch.moc3: qt-watch.cpp
|
||||
$(AM_V_GEN)$(MOC_QT3) $^ > $@
|
||||
|
||||
-libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) -DQT3 $(VISIBILITY_HIDDEN_CFLAGS)
|
||||
+libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) -DQT3 $(VISIBILITY_HIDDEN_CFLAGS)
|
||||
libavahi_qt3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT3_LIBS)
|
||||
-libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO)
|
||||
+libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO)
|
||||
endif
|
||||
|
||||
if HAVE_QT4
|
||||
@@ -62,7 +62,7 @@ qt-watch.moc4: qt-watch.cpp
|
||||
|
||||
libavahi_qt4_la_CPPFLAGS = $(AM_CFLAGS) $(QT4_CFLAGS) -DQT4 $(VISIBILITY_HIDDEN_CFLAGS)
|
||||
libavahi_qt4_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT4_LIBS)
|
||||
-libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT4_VERSION_INFO)
|
||||
+libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -version-info $(LIBAVAHI_QT4_VERSION_INFO)
|
||||
endif
|
||||
|
||||
if HAVE_QT5
|
||||
@@ -84,7 +84,7 @@ qt-watch.moc5: qt-watch.cpp
|
||||
|
||||
libavahi_qt5_la_CPPFLAGS = $(AM_CFLAGS) --std=gnu++11 $(QT5_CFLAGS) -DQT5 $(VISIBILITY_HIDDEN_CFLAGS)
|
||||
libavahi_qt5_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT5_LIBS)
|
||||
-libavahi_qt5_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT5_VERSION_INFO)
|
||||
+libavahi_qt5_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -version-info $(LIBAVAHI_QT5_VERSION_INFO)
|
||||
endif
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
diff -up avahi-0.8/avahi-qt/Makefile.in.no_undefined avahi-0.8/avahi-qt/Makefile.in
|
||||
--- avahi-0.8/avahi-qt/Makefile.in.no_undefined 2020-02-18 01:03:16.474614659 -0600
|
||||
+++ avahi-0.8/avahi-qt/Makefile.in 2020-11-17 16:36:12.263297534 -0600
|
||||
@@ -551,9 +551,9 @@ BUILT_SOURCES = $(am__append_2) $(am__ap
|
||||
@HAVE_QT3_TRUE@libavahi_qt3_la_SOURCES = \
|
||||
@HAVE_QT3_TRUE@ qt-watch.cpp
|
||||
|
||||
-@HAVE_QT3_TRUE@libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) $(VISIBILITY_HIDDEN_CFLAGS)
|
||||
+@HAVE_QT3_TRUE@libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) -DQT3 $(VISIBILITY_HIDDEN_CFLAGS)
|
||||
@HAVE_QT3_TRUE@libavahi_qt3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT3_LIBS)
|
||||
-@HAVE_QT3_TRUE@libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO)
|
||||
+@HAVE_QT3_TRUE@libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO)
|
||||
@HAVE_QT4_TRUE@avahiqt4includedir = $(includedir)/avahi-qt4
|
||||
@HAVE_QT4_TRUE@avahiqt4include_HEADERS = \
|
||||
@HAVE_QT4_TRUE@ qt-watch.h
|
||||
@@ -563,7 +563,7 @@ BUILT_SOURCES = $(am__append_2) $(am__ap
|
||||
|
||||
@HAVE_QT4_TRUE@libavahi_qt4_la_CPPFLAGS = $(AM_CFLAGS) $(QT4_CFLAGS) -DQT4 $(VISIBILITY_HIDDEN_CFLAGS)
|
||||
@HAVE_QT4_TRUE@libavahi_qt4_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT4_LIBS)
|
||||
-@HAVE_QT4_TRUE@libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT4_VERSION_INFO)
|
||||
+@HAVE_QT4_TRUE@libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -version-info $(LIBAVAHI_QT4_VERSION_INFO)
|
||||
@HAVE_QT5_TRUE@avahiqt5includedir = $(includedir)/avahi-qt5
|
||||
@HAVE_QT5_TRUE@avahiqt5include_HEADERS = \
|
||||
@HAVE_QT5_TRUE@ qt-watch.h
|
||||
@@ -573,7 +573,7 @@ BUILT_SOURCES = $(am__append_2) $(am__ap
|
||||
|
||||
@HAVE_QT5_TRUE@libavahi_qt5_la_CPPFLAGS = $(AM_CFLAGS) --std=gnu++11 $(QT5_CFLAGS) -DQT5 $(VISIBILITY_HIDDEN_CFLAGS)
|
||||
@HAVE_QT5_TRUE@libavahi_qt5_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT5_LIBS)
|
||||
-@HAVE_QT5_TRUE@libavahi_qt5_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT5_VERSION_INFO)
|
||||
+@HAVE_QT5_TRUE@libavahi_qt5_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -no-undefined -version-info $(LIBAVAHI_QT5_VERSION_INFO)
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
all: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue