- Pull in upstream patch to check waitpid return values (testing as
possible fix for RHBZ#507066).
This commit is contained in:
parent
87afda4422
commit
69d291b802
26
guestfs-daemon-waitpid.patch
Normal file
26
guestfs-daemon-waitpid.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
|
||||
index 2e83b9f..030aabe 100644
|
||||
--- a/daemon/guestfsd.c
|
||||
+++ b/daemon/guestfsd.c
|
||||
@@ -453,7 +453,8 @@ commandrv (char **stdoutput, char **stderror, char * const* const argv)
|
||||
{
|
||||
int so_size = 0, se_size = 0;
|
||||
int so_fd[2], se_fd[2];
|
||||
- int pid, r, quit, i;
|
||||
+ pid_t pid;
|
||||
+ int r, quit, i;
|
||||
fd_set rset, rset2;
|
||||
char buf[256];
|
||||
char *p;
|
||||
@@ -589,7 +590,10 @@ commandrv (char **stdoutput, char **stderror, char * const* const argv)
|
||||
}
|
||||
|
||||
/* Get the exit status of the command. */
|
||||
- waitpid (pid, &r, 0);
|
||||
+ if (waitpid (pid, &r, 0) != pid) {
|
||||
+ perror ("waitpid");
|
||||
+ return -1;
|
||||
+ }
|
||||
|
||||
if (WIFEXITED (r)) {
|
||||
return WEXITSTATUS (r);
|
@ -4,7 +4,7 @@
|
||||
Summary: Access and modify virtual machine disk images
|
||||
Name: libguestfs
|
||||
Version: 1.0.49
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: Development/Libraries
|
||||
URL: http://libguestfs.org/
|
||||
@ -13,6 +13,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
|
||||
# Upstream: 3c5b447efd42b03c24104bdc1f3260e879bb1d25
|
||||
Patch0: guestfs-daemon-find.patch
|
||||
# Upstream: 6654f617a6f720baa8f1ced89179e11679353d1e
|
||||
Patch1: guestfs-daemon-waitpid.patch
|
||||
|
||||
# Basic build requirements:
|
||||
BuildRequires: /usr/bin/pod2man
|
||||
@ -253,6 +255,7 @@ Requires: jpackage-utils
|
||||
%setup -q
|
||||
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
mkdir -p daemon/m4
|
||||
|
||||
@ -498,10 +501,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Jun 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.49-4
|
||||
* Sat Jun 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.49-5
|
||||
- Remove workaround for RHBZ#507007, since bug is now fixed.
|
||||
- Pull in upstream patch to fix pclose checking
|
||||
(testing as possible fix for RHBZ#507066).
|
||||
- Pull in upstream patch to check waitpid return values
|
||||
(testing as possible fix for RHBZ#507066).
|
||||
|
||||
* Fri Jun 19 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.49-2
|
||||
- New upstream release 1.0.49.
|
||||
|
Loading…
Reference in New Issue
Block a user