linux-cm: Fds can be 0
This commit is contained in:
parent
f153dcc6ad
commit
adeb4b1b8f
18
gupnp.spec
18
gupnp.spec
@ -1,12 +1,13 @@
|
||||
Name: gupnp
|
||||
Version: 1.2.4
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: UPnP devices & control points creation framework
|
||||
License: LGPLv2+
|
||||
URL: http://www.gupnp.org/
|
||||
Source0: http://download.gnome.org/sources/%{name}/1.2/%{name}-%{version}.tar.xz
|
||||
Patch0: CVE-2021-33516.patch
|
||||
Patch1: ServiceProxy-Remove-bogos-function-rename.patch
|
||||
Patch2: linux-cm-Fds-can-be-0.patch
|
||||
|
||||
BuildRequires: gssdp-devel >= 1.2.3 gtk-doc gobject-introspection-devel >= 1.36
|
||||
BuildRequires: libsoup-devel libxml2-devel libuuid-devel vala meson
|
||||
@ -75,6 +76,21 @@ This package contains help file and developer documentation for gupnp.
|
||||
%{_mandir}/man1/gupnp-binding-tool-*
|
||||
|
||||
%changelog
|
||||
* Thu Oct 26 2023 fandehui <fandehui@xfusion.com> - 1.2.4-3
|
||||
- linux-cm: Fds can be 0
|
||||
|
||||
* Fri Oct 20 2023 fandehui <fandehui@xfusion.com> - 1.2.4-2
|
||||
- ServiceProxy: Remove bogos function rename
|
||||
|
||||
* Mon Jun 7 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 1.2.4-1
|
||||
- Upgrade to 1.2.4
|
||||
- Update Version, Release, Source0, BuildRequires
|
||||
- Delete sed operation which existed in this version
|
||||
- Add patch for fix CVE-2021-33516
|
||||
- Update stage 'prep', 'build', 'install', 'check', 'files'
|
||||
|
||||
* Fri Oct 25 2019 Alex Chao <zhaolei746@huawei.com> - 1.0.3-2
|
||||
- Package init
|
||||
* Fri Oct 20 2023 fandehui <fandehui@xfusion.com> - 1.2.4-2
|
||||
- ServiceProxy: Remove bogos function rename
|
||||
|
||||
|
||||
57
linux-cm-Fds-can-be-0.patch
Normal file
57
linux-cm-Fds-can-be-0.patch
Normal file
@ -0,0 +1,57 @@
|
||||
From 1024bb948ae047282421dbac6f670317e4a17001 Mon Sep 17 00:00:00 2001
|
||||
From: Jens Georg <mail@jensge.org>
|
||||
Date: Mon, 10 May 2021 13:22:36 +0200
|
||||
Subject: [PATCH] linux-cm: Fds can be 0
|
||||
|
||||
---
|
||||
libgupnp/gupnp-linux-context-manager.c | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libgupnp/gupnp-linux-context-manager.c b/libgupnp/gupnp-linux-context-manager.c
|
||||
index e96ec66..03e951d 100644
|
||||
--- a/libgupnp/gupnp-linux-context-manager.c
|
||||
+++ b/libgupnp/gupnp-linux-context-manager.c
|
||||
@@ -943,8 +943,6 @@ create_ioctl_socket (GUPnPLinuxContextManager *self, GError **error)
|
||||
priv->fd = socket (AF_INET, SOCK_DGRAM, 0);
|
||||
|
||||
if (priv->fd < 0) {
|
||||
- priv->fd = 0;
|
||||
-
|
||||
g_set_error_literal (error,
|
||||
G_IO_ERROR,
|
||||
g_io_error_from_errno (errno),
|
||||
@@ -1045,6 +1043,7 @@ gupnp_linux_context_manager_init (GUPnPLinuxContextManager *self)
|
||||
GUPnPLinuxContextManagerPrivate *priv;
|
||||
|
||||
priv = gupnp_linux_context_manager_get_instance_private (self);
|
||||
+ priv->fd = -1;
|
||||
|
||||
priv->nl_seq = 0;
|
||||
|
||||
@@ -1087,8 +1086,10 @@ gupnp_linux_context_manager_constructed (GObject *object)
|
||||
NULL);
|
||||
cleanup:
|
||||
if (error) {
|
||||
- if (priv->fd > 0)
|
||||
+ if (priv->fd >= 0) {
|
||||
close (priv->fd);
|
||||
+ priv->fd = -1;
|
||||
+ }
|
||||
|
||||
g_warning ("Failed to setup Linux context manager: %s",
|
||||
error->message);
|
||||
@@ -1129,9 +1130,9 @@ gupnp_linux_context_manager_dispose (GObject *object)
|
||||
priv->netlink_socket = NULL;
|
||||
}
|
||||
|
||||
- if (priv->fd != 0) {
|
||||
+ if (priv->fd >= 0) {
|
||||
close (priv->fd);
|
||||
- priv->fd = 0;
|
||||
+ priv->fd = -1;
|
||||
}
|
||||
|
||||
if (priv->interfaces) {
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user