Compare commits

...

80 Commits
f25 ... master

Author SHA1 Message Date
Cole Robinson 7d77bf76aa libvirt-5.6.0-1.fc31
Update to version 5.6.0
2019-08-06 13:23:41 -04:00
Fedora Release Engineering 7f0f1b831e - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 14:40:37 +00:00
Cole Robinson d964be0097 libvirt-5.5.0-1.fc31
Rebased to version 5.5.0
2019-07-03 11:25:28 -04:00
Cole Robinson a2479f539e libvirt-5.4.0-2.fc31
CVE-2019-10161: arbitrary file read/exec via virDomainSaveImageGetXMLDesc API (bz #1722463, bz #1720115)
CVE-2019-10166: virDomainManagedSaveDefineXML API exposed to readonly clients (bz #1722462, bz #1720114)
CVE-2019-10167: arbitrary command execution via virConnectGetDomainCapabilities API (bz #1722464, bz #1720117)
CVE-2019-10168: arbitrary command execution via virConnectBaselineHypervisorCPU and virConnectCompareHypervisorCPU APIs (bz #1722466, bz #1720118)
2019-06-20 12:30:57 -04:00
Daniel P. Berrangé c2c89ec6a3 Update to 5.4.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-06-12 11:29:13 +02:00
Daniel P. Berrangé d61e2404ba Fix systemd socket permissions (CVE-2019-10132)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-05-21 16:58:15 +01:00
Daniel P. Berrangé a2be167dfe Define md-clear CPUID bit
CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-05-14 19:17:13 +01:00
Daniel P. Berrangé 15ca09e1da Update to 5.3.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-05-07 14:50:34 +01:00
Cole Robinson 2cc07e6366 libvirt-5.2.0-2.fc31
Rebuild for xen 4.12 soname bump
2019-04-08 10:24:27 -04:00
Daniel P. Berrangé 4dd4fe78a4 Remove patch chunk touching Makefile.am
We don't need to run make dist from a build and the filename is broken
and would require re-running autotools anyway.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-04-03 13:59:48 +01:00
Daniel P. Berrangé 0bc22fb6f7 Remove patching on mock-noinline.pl which is missing in dist
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-04-03 11:47:23 +01:00
Daniel P. Berrangé 76097a6961 Add fix for mocking tests on 32-bit
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-04-03 11:35:55 +01:00
Daniel P. Berrangé 98cbf39fd3 Update to 5.2.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-04-03 11:06:44 +01:00
Daniel P. Berrangé d670e246d0 Fix rbd upgrade compat & deprecations and networking
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-20 17:42:59 +00:00
Igor Gnatenko 50e7b9a91d
Remove obsolete scriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-03-06 09:47:43 +01:00
Daniel P. Berrangé 5cbc0451ce Update to 5.1.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-04 10:57:08 +00:00
Igor Gnatenko b420054636 Rebuild for readline 8.0 2019-02-17 09:30:51 +01:00
Fedora Release Engineering 143fedee46 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 08:30:03 +00:00
Daniel P. Berrangé 88887cac0f Update to 5.0.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-21 12:19:06 +00:00
Daniel P. Berrangé 579afc99f2 Disable RBD on 32-bit arches
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-12-10 18:33:58 +00:00
Daniel P. Berrangé 7f5808b9d0 Update to 4.10.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-12-03 13:55:36 +00:00
Daniel P. Berrangé 4df5f77071 Update to 4.9.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-11-12 14:53:44 +00:00
Daniel P. Berrangé 1bdd527daf Update to 4.8.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-10-05 14:25:26 +01:00
Daniel P. Berrangé e5fa1c00d2 Update to 4.7.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-09-04 10:43:47 +01:00
David Abdurachmanov 18f7b8c79c Add support for RISC-V (riscv64) 2018-08-19 19:41:56 +01:00
Daniel P. Berrangé 782468f8e9 Update to 4.6.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-08-06 14:07:24 +01:00
Fedora Release Engineering 202e7d9569 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 09:01:16 +00:00
Daniel P. Berrangé 0676a07265 Fix regressions in chardev handling
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-07-06 11:30:44 +01:00
Daniel P. Berrangé f57ce74947 Update to 4.5.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-07-03 11:00:57 +01:00
Daniel P. Berrangé 851cfde15b Fix typo in date
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-06-05 12:49:52 +01:00
Daniel P. Berrangé 06123137eb Update to 4.4.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-06-05 12:30:16 +01:00
Igor Gnatenko 6ccf3cb58c Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-05-07 09:38:07 +02:00
Igor Gnatenko 030ddaa4ef Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-05-07 09:38:07 +02:00
Daniel P. Berrangé a8886736c4 Set wireshark plugin dir dynamically
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-05-03 12:26:11 +01:00
Daniel P. Berrangé 4fd635e537 Update to 4.3.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-05-03 10:55:46 +01:00
Daniel P. Berrangé 6210c457fc Update to 4.2.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-03 13:42:58 +01:00
Iryna Shcherbina 82926cfdf0 Update Python 2 dependency declarations to new packaging standards 2018-03-23 23:29:56 +01:00
Daniel P. Berrangé e7a3ca6f6b Fix systemd macro argument with line continuations (rhbz#1558648)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-21 09:38:28 +00:00
Daniel P. Berrangé 1ae6f647b7 Upload 4.1.0 sources
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 13:36:35 +00:00
Daniel P. Berrangé 48941c011f Rebase to version 4.1.0
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 13:31:54 +00:00
Igor Gnatenko a3c4cc6f3d
Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-14 09:28:07 +01:00
Igor Gnatenko 90fbcbd48f Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-13 23:44:12 +01:00
Fedora Release Engineering 6efd96d995 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 23:38:57 +00:00
Daniel P. Berrange 21316e7a45 Avoid undefined symbols from new linker flags
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-23 13:01:06 +00:00
Daniel P. Berrange 8adbb7a402 Cull changelog before 2017
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-19 17:34:53 +00:00
Daniel P. Berrange 3f19d41908 Fix rpc package name
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-19 16:37:43 +00:00
Daniel P. Berrange 34da93e0c9 Fix typos
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-19 16:30:19 +00:00
Daniel P. Berrange 208f506190 Add rpcgen + tirpc-devel dependancies
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-19 16:28:25 +00:00
Daniel P. Berrange 0ca715cad9 Update to version 4.0.0
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-19 16:14:30 +00:00
Cole Robinson 0f5d8c1c22 Rebuild for xen 4.10 2017-12-20 07:05:15 -05:00
Daniel P. Berrange a56bcbd063 Update to 3.10.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-12-05 11:11:01 +00:00
Daniel P. Berrange 89c3fa751c Update to 3.9.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-11-03 11:14:48 +00:00
Daniel P. Berrange 051644ffcb Update to 3.8.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-10-04 14:46:26 +01:00
Daniel P. Berrange 2a9c282548 Update to 3.7.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-09-04 11:33:13 +01:00
Daniel P. Berrange 2ae80af461 Disable qemumonitorjsontest temporarily
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-04 10:30:58 +01:00
Daniel P. Berrange 7335ede0e1 Rebase to 3.6.0
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-02 10:47:35 +01:00
Florian Weimer 6c92ba3805 Rebuild with fixed binutils for ppc64le (#1475636) 2017-07-30 19:09:40 +02:00
Daniel P. Berrange 446f680673 Disabled RBD on i386, arm, ppc64 (rhbz #1474743)
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-25 11:11:19 +01:00
Daniel P. Berrange 3f56aa2870 Rebuild for changed rbd soname
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-25 09:14:27 +01:00
Cole Robinson 3cec91694f Remove unused patch 2017-07-17 09:01:37 -04:00
Cole Robinson cb0cfa566f Rebuild for xen 4.9 2017-07-17 09:00:52 -04:00
Petr Písař a27acebf66 perl dependency renamed to perl-interpreter <https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules> 2017-07-12 15:20:34 +02:00
Daniel P. Berrange 99d3a0ca1a Update to 3.5.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-06 15:32:03 +01:00
Daniel P. Berrange 9c962ebc4f Add patch to fix gnulib build
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-06-05 11:13:10 +01:00
Daniel P. Berrange 99cbbf6606 Fix clash between gnulib and glibc system headers
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-06-05 11:11:32 +01:00
Daniel P. Berrange b73e509648 Update to 3.4.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-06-02 12:08:34 +01:00
Daniel P. Berrange b23ff9c0f7 Update to 3.3.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-05-08 10:45:19 +01:00
Cole Robinson 20f9ed9c4c Remove unused patch 2017-05-04 20:10:10 -04:00
Daniel P. Berrange 04cb28c315 Update to 3.2.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-04-03 14:30:13 +01:00
Daniel P. Berrange a74ea318d1 Update to 3.1.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-03-03 16:48:12 +00:00
Fedora Release Engineering 98ed6b4e36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 19:39:29 +00:00
Daniel P. Berrange 2c49d1fd11 Update to 3.0.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-01-19 10:16:16 +00:00
Igor Gnatenko 6e7bca6631 Rebuild for readline 7.x
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-01-12 17:30:33 +01:00
Daniel P. Berrange 2fe145bb02 Rebuild to pick up new libxen* soname
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-08 18:31:20 +00:00
Daniel P. Berrange 10b7d235e3 Temp hack for gnutls 3.5.6 regression
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-05 12:06:04 +00:00
Daniel P. Berrange 232e2e7de2 Add workaround for wireshark-devel brokeness yet again
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-05 11:21:03 +00:00
Daniel P. Berrange fb1e4b061e Kill changeog entries prior to 2015
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-05 10:07:41 +00:00
Daniel P. Berrange 0b1a013081 Update to 2.5.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-05 10:06:54 +00:00
Daniel P. Berrange a972457f43 Update to 2.4.0 release
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-11-02 09:20:09 +00:00
Daniel P. Berrange 67cfa34a05 Update to 2.3.0 release 2016-10-06 11:42:08 +01:00
3 changed files with 646 additions and 1925 deletions

View File

@ -1,242 +0,0 @@
From c0bc172383c2c955394589e5808457935ae06f1d Mon Sep 17 00:00:00 2001
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Mon, 6 Jun 2016 15:03:27 +0100
Subject: [PATCH] systemd: directly notify systemd instead of using sd_notify
The sd_notify method is used to tell systemd when libvirtd
has finished starting up. All it does is send a datagram
containing the string parameter to systemd on a UNIX socket
named in the NOTIFY_SOCKET environment variable. Rather than
pulling in the systemd libraries for this, just code the
notification directly in libvirt as this is a stable ABI
from systemd's POV which explicitly allows independant
implementations:
See "Reimplementable Independently" column in the
"$NOTIFY_SOCKET Daemon Notifications" row:
https://www.freedesktop.org/wiki/Software/systemd/InterfacePortabilityAndStabilityChart/
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1314881
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
configure.ac | 2 --
libvirt.spec.in | 12 -----------
m4/virt-systemd-daemon.m4 | 34 ------------------------------
src/Makefile.am | 4 ++--
src/util/virsystemd.c | 53 ++++++++++++++++++++++++++++++++++++++++++-----
5 files changed, 50 insertions(+), 55 deletions(-)
delete mode 100644 m4/virt-systemd-daemon.m4
diff --git a/configure.ac b/configure.ac
index f2554a4..12eb3b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -256,7 +256,6 @@ LIBVIRT_CHECK_SANLOCK
LIBVIRT_CHECK_SASL
LIBVIRT_CHECK_SELINUX
LIBVIRT_CHECK_SSH2
-LIBVIRT_CHECK_SYSTEMD_DAEMON
LIBVIRT_CHECK_UDEV
LIBVIRT_CHECK_WIRESHARK
LIBVIRT_CHECK_NSS
@@ -2787,7 +2786,6 @@ LIBVIRT_RESULT_SANLOCK
LIBVIRT_RESULT_SASL
LIBVIRT_RESULT_SELINUX
LIBVIRT_RESULT_SSH2
-LIBVIRT_RESULT_SYSTEMD_DAEMON
LIBVIRT_RESULT_UDEV
LIBVIRT_RESULT_WIRESHARK
LIBVIRT_RESULT_NSS
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 8b88eef..b93a53c 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -79,7 +79,6 @@
%define with_firewalld 0%{!?_without_firewalld:0}
%define with_libssh2 0%{!?_without_libssh2:0}
%define with_wireshark 0%{!?_without_wireshark:0}
-%define with_systemd_daemon 0%{!?_without_systemd_daemon:0}
%define with_pm_utils 1
# Finally set the OS / architecture specific special cases
@@ -133,7 +132,6 @@
# Fedora has systemd, libvirt still used sysvinit there.
%if 0%{?fedora} || 0%{?rhel} >= 7
%define with_systemd 1
- %define with_systemd_daemon 1
%define with_pm_utils 0
%endif
@@ -268,9 +266,6 @@ BuildRequires: python
%if %{with_systemd}
BuildRequires: systemd-units
%endif
-%if %{with_systemd_daemon}
-BuildRequires: systemd-devel
-%endif
%if %{with_xen} || %{with_libxl}
BuildRequires: xen-devel
%endif
@@ -1061,12 +1056,6 @@ rm -rf .git
%define arg_wireshark --without-wireshark-dissector
%endif
-%if %{with_systemd_daemon}
- %define arg_systemd_daemon --with-systemd-daemon
-%else
- %define arg_systemd_daemon --without-systemd-daemon
-%endif
-
%if %{with_pm_utils}
%define arg_pm_utils --with-pm-utils
%else
@@ -1157,7 +1146,6 @@ rm -f po/stamp-po
--with-driver-modules \
%{?arg_firewalld} \
%{?arg_wireshark} \
- %{?arg_systemd_daemon} \
%{?arg_pm_utils} \
--with-nss-plugin \
%{arg_packager} \
diff --git a/m4/virt-systemd-daemon.m4 b/m4/virt-systemd-daemon.m4
deleted file mode 100644
index 8516e41..0000000
--- a/m4/virt-systemd-daemon.m4
+++ /dev/null
@@ -1,34 +0,0 @@
-dnl The libsystemd-daemon.so library
-dnl
-dnl Copyright (C) 2012-2013 Red Hat, Inc.
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License, or (at your option) any later version.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library. If not, see
-dnl <http://www.gnu.org/licenses/>.
-dnl
-
-AC_DEFUN([LIBVIRT_CHECK_SYSTEMD_DAEMON],[
- LIBVIRT_CHECK_PKG([SYSTEMD_DAEMON], [libsystemd-daemon], [0.27.1])
-
- old_CFLAGS="$CFLAGS"
- old_LIBS="$LIBS"
- CFLAGS="$CFLAGS $SYSTEMD_DAEMON_CFLAGS"
- LIBS="$LIBS $SYSTEMD_DAEMON_LIBS"
- AC_CHECK_FUNCS([sd_notify])
- CFLAGS="$old_CFLAGS"
- LIBS="$old_LIBS"
-])
-
-AC_DEFUN([LIBVIRT_RESULT_SYSTEMD_DAEMON],[
- LIBVIRT_RESULT_LIB([SYSTEMD_DAEMON])
-])
diff --git a/src/Makefile.am b/src/Makefile.am
index f3c9a14..f020b92 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1107,12 +1107,12 @@ libvirt_util_la_SOURCES = \
libvirt_util_la_CFLAGS = $(CAPNG_CFLAGS) $(YAJL_CFLAGS) $(LIBNL_CFLAGS) \
$(AM_CFLAGS) $(AUDIT_CFLAGS) $(DEVMAPPER_CFLAGS) \
$(DBUS_CFLAGS) $(LDEXP_LIBM) $(NUMACTL_CFLAGS) \
- $(SYSTEMD_DAEMON_CFLAGS) $(POLKIT_CFLAGS) $(GNUTLS_CFLAGS) \
+ $(POLKIT_CFLAGS) $(GNUTLS_CFLAGS) \
-I$(srcdir)/conf
libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \
$(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \
$(LIB_CLOCK_GETTIME) $(DBUS_LIBS) $(MSCOM_LIBS) $(LIBXML_LIBS) \
- $(SECDRIVER_LIBS) $(NUMACTL_LIBS) $(SYSTEMD_DAEMON_LIBS) \
+ $(SECDRIVER_LIBS) $(NUMACTL_LIBS) \
$(POLKIT_LIBS)
diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c
index 4883f94..871db7e 100644
--- a/src/util/virsystemd.c
+++ b/src/util/virsystemd.c
@@ -21,8 +21,9 @@
#include <config.h>
-#ifdef WITH_SYSTEMD_DAEMON
-# include <systemd/sd-daemon.h>
+#include <sys/socket.h>
+#ifdef HAVE_SYS_UN_H
+# include <sys/un.h>
#endif
#include "virsystemd.h"
@@ -34,6 +35,7 @@
#include "virutil.h"
#include "virlog.h"
#include "virerror.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_SYSTEMD
@@ -480,9 +482,50 @@ int virSystemdTerminateMachine(const char *name)
void
virSystemdNotifyStartup(void)
{
-#ifdef WITH_SYSTEMD_DAEMON
- sd_notify(0, "READY=1");
-#endif
+#ifdef HAVE_SYS_UN_H
+ const char *path;
+ const char *msg = "READY=1";
+ int fd;
+ struct sockaddr_un un = {
+ .sun_family = AF_UNIX,
+ };
+ struct iovec iov = {
+ .iov_base = (char *)msg,
+ .iov_len = strlen(msg),
+ };
+ struct msghdr mh = {
+ .msg_name = &un,
+ .msg_namelen = sizeof(un),
+ .msg_iov = &iov,
+ .msg_iovlen = 1,
+ };
+
+ if (!(path = virGetEnvBlockSUID("NOTIFY_SOCKET"))) {
+ VIR_DEBUG("Skipping systemd notify, not requested");
+ return;
+ }
+
+ /* NB sun_path field is *not* NUL-terminated, hence >, not >= */
+ if (strlen(path) > sizeof(un.sun_path)) {
+ VIR_WARN("Systemd notify socket path '%s' too long", path);
+ return;
+ }
+
+ memcpy(un.sun_path, path, strlen(path));
+ if (un.sun_path[0] == '@')
+ un.sun_path[0] = '\0';
+
+ fd = socket(AF_UNIX, SOCK_DGRAM, 0);
+ if (fd < 0) {
+ VIR_WARN("Unable to create socket FD");
+ return;
+ }
+
+ if (sendmsg(fd, &mh, MSG_NOSIGNAL) < 0)
+ VIR_WARN("Failed to notify systemd");
+
+ VIR_FORCE_CLOSE(fd);
+#endif /* HAVE_SYS_UN_H */
}
static int
--
2.5.5

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
2462e768e1518026c3105a0466b5fece libvirt-2.2.0.tar.xz
SHA512 (libvirt-5.6.0.tar.xz) = 95fe931394fb31288faf73349bb298f08f63cf062f851b9935303145f8166f69128be9360757f0e1845256c14f4d7672843dba0dc6c086b1c3c8bfc035cc8986