1 |
commit: 2fe2484bb7f9de72413eb25deb02e4212d81c8d0 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 31 09:14:14 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 31 09:16:28 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fe2484b |
7 |
|
8 |
net-misc/minidlna: Fix socket leak |
9 |
|
10 |
Closes: https://bugs.gentoo.org/768030 |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
.../minidlna/files/minidlna-1.3.0-fd-leak.patch | 28 ++++++++++++++++++++++ |
14 |
...idlna-1.3.0.ebuild => minidlna-1.3.0-r1.ebuild} | 5 ++-- |
15 |
2 files changed, 31 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/net-misc/minidlna/files/minidlna-1.3.0-fd-leak.patch b/net-misc/minidlna/files/minidlna-1.3.0-fd-leak.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..eec2bcd020e |
20 |
--- /dev/null |
21 |
+++ b/net-misc/minidlna/files/minidlna-1.3.0-fd-leak.patch |
22 |
@@ -0,0 +1,28 @@ |
23 |
+diff --git a/upnpevents.c b/upnpevents.c |
24 |
+index 4de6ce8..1126fa7 100644 |
25 |
+--- a/upnpevents.c |
26 |
++++ b/upnpevents.c |
27 |
+@@ -290,18 +290,17 @@ upnp_event_create_notify(struct subscriber *sub) |
28 |
+ addr.sin_family = AF_INET; |
29 |
+ inet_aton(obj->addrstr, &addr.sin_addr); |
30 |
+ addr.sin_port = htons(port); |
31 |
+- DPRINTF(E_DEBUG, L_HTTP, "%s: '%s' %hu '%s'\n", "upnp_event_notify_connect", |
32 |
++ DPRINTF(E_DEBUG, L_HTTP, "%s: '%s' %hu '%s'\n", "upnp_event_create_notify", |
33 |
+ obj->addrstr, port, obj->path); |
34 |
+ obj->state = EConnecting; |
35 |
++ obj->ev = (struct event ){ .fd = s, .rdwr = EVENT_WRITE, |
36 |
++ .process = upnp_event_process_notify, .data = obj }; |
37 |
++ event_module.add(&obj->ev); |
38 |
+ if(connect(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) { |
39 |
+ if(errno != EINPROGRESS && errno != EWOULDBLOCK) { |
40 |
+- DPRINTF(E_ERROR, L_HTTP, "%s: connect(): %s\n", "upnp_event_notify_connect", strerror(errno)); |
41 |
++ DPRINTF(E_ERROR, L_HTTP, "%s: connect(): %s\n", "upnp_event_create_notify", strerror(errno)); |
42 |
+ obj->state = EError; |
43 |
+ } |
44 |
+- } else { |
45 |
+- obj->ev = (struct event ){ .fd = s, .rdwr = EVENT_WRITE, |
46 |
+- .process = upnp_event_process_notify, .data = obj }; |
47 |
+- event_module.add(&obj->ev); |
48 |
+ } |
49 |
+ |
50 |
+ return; |
51 |
|
52 |
diff --git a/net-misc/minidlna/minidlna-1.3.0.ebuild b/net-misc/minidlna/minidlna-1.3.0-r1.ebuild |
53 |
similarity index 94% |
54 |
rename from net-misc/minidlna/minidlna-1.3.0.ebuild |
55 |
rename to net-misc/minidlna/minidlna-1.3.0-r1.ebuild |
56 |
index 06bcef995db..3acb5fe4950 100644 |
57 |
--- a/net-misc/minidlna/minidlna-1.3.0.ebuild |
58 |
+++ b/net-misc/minidlna/minidlna-1.3.0-r1.ebuild |
59 |
@@ -1,4 +1,4 @@ |
60 |
-# Copyright 1999-2020 Gentoo Authors |
61 |
+# Copyright 1999-2021 Gentoo Authors |
62 |
# Distributed under the terms of the GNU General Public License v2 |
63 |
|
64 |
EAPI=7 |
65 |
@@ -9,7 +9,7 @@ DESCRIPTION="DLNA/UPnP-AV compliant media server" |
66 |
HOMEPAGE="https://sourceforge.net/projects/minidlna/" |
67 |
SRC_URI=" |
68 |
https://downloads.sourceforge.net/project/minidlna/${PN}/${PV}/${P}.tar.gz |
69 |
- https://dev.gentoo.org/~xmw/minidlna-gentoo-artwork.patch.xz" |
70 |
+ mirror://gentoo/minidlna-gentoo-artwork.patch.xz" |
71 |
|
72 |
LICENSE="BSD GPL-2" |
73 |
SLOT="0" |
74 |
@@ -38,6 +38,7 @@ CONFIG_CHECK="~INOTIFY_USER" |
75 |
PATCHES=( |
76 |
"${WORKDIR}"/minidlna-gentoo-artwork.patch |
77 |
"${FILESDIR}"/${P}-fno-common.patch |
78 |
+ "${FILESDIR}"/${P}-fd-leak.patch |
79 |
) |
80 |
|
81 |
src_prepare() { |