make commandtest more robust
parent
6051cec412
commit
05aa1933ee
|
@ -0,0 +1,32 @@
|
||||||
|
From 12509c09a55bd2ab171f9fa029fb94f297adc0a0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
Date: Thu, 24 Feb 2011 12:12:27 +0000
|
||||||
|
Subject: [PATCH] Make commandtest more robust wrt its execution environment
|
||||||
|
|
||||||
|
When executed from cron, commandtest would fail to correctly
|
||||||
|
identify daemon processes. Set session ID and process group
|
||||||
|
IDs at startup to ensure we have a consistent environment to
|
||||||
|
run in.
|
||||||
|
|
||||||
|
* tests/commandtest.c: Call setsid() and setpgid()
|
||||||
|
---
|
||||||
|
tests/commandtest.c | 3 +++
|
||||||
|
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/commandtest.c b/tests/commandtest.c
|
||||||
|
index 7157c51..dc2f8a1 100644
|
||||||
|
--- a/tests/commandtest.c
|
||||||
|
+++ b/tests/commandtest.c
|
||||||
|
@@ -730,6 +730,9 @@ mymain(int argc, char **argv)
|
||||||
|
if (chdir("/tmp") < 0)
|
||||||
|
return(EXIT_FAILURE);
|
||||||
|
|
||||||
|
+ setpgid(0, 0);
|
||||||
|
+ setsid();
|
||||||
|
+
|
||||||
|
/* Kill off any inherited fds that might interfere with our
|
||||||
|
* testing. */
|
||||||
|
fd = 3;
|
||||||
|
--
|
||||||
|
1.7.3.4
|
||||||
|
|
|
@ -219,6 +219,7 @@ Patch7: %{name}-%{version}-virt-pki-validate-behave-when-CERTTOOL-is-missing.pat
|
||||||
Patch8: %{name}-%{version}-build-add-dependency-on-gnutls-utils.patch
|
Patch8: %{name}-%{version}-build-add-dependency-on-gnutls-utils.patch
|
||||||
Patch9: %{name}-%{version}-rpm-add-missing-dependencies.patch
|
Patch9: %{name}-%{version}-rpm-add-missing-dependencies.patch
|
||||||
Patch10: %{name}-%{version}-remote-protect-against-integer-overflow.patch
|
Patch10: %{name}-%{version}-remote-protect-against-integer-overflow.patch
|
||||||
|
Patch11: %{name}-%{version}-make-commandtest-more-robust.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
URL: http://libvirt.org/
|
URL: http://libvirt.org/
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
|
@ -501,6 +502,7 @@ of recent versions of Linux (and other OSes).
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
%patch9 -p1
|
%patch9 -p1
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
|
%patch11 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if ! %{with_xen}
|
%if ! %{with_xen}
|
||||||
|
@ -1030,6 +1032,7 @@ fi
|
||||||
Bug 717204
|
Bug 717204
|
||||||
- Add several build and runtime dependencies to specfile
|
- Add several build and runtime dependencies to specfile
|
||||||
Bug 680270
|
Bug 680270
|
||||||
|
- Make commandtest more robust.
|
||||||
|
|
||||||
* Tue Apr 5 2011 Laine Stump <laine@redhat.com> 0.8.8-4
|
* Tue Apr 5 2011 Laine Stump <laine@redhat.com> 0.8.8-4
|
||||||
- Fix for CVE-2011-1486, error reporting in libvirtd is not thread safe,
|
- Fix for CVE-2011-1486, error reporting in libvirtd is not thread safe,
|
||||||
|
|
Loading…
Reference in New Issue