[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#44706: marked as done (apt: Dpkg-Prexec broken)



Your message dated Fri, 24 Sep 1999 19:52:10 -0600 (MDT)
with message-id <Pine.LNX.3.96.990924194530.2349J-100000@localhost>
and subject line Closed
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Darren Benham
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 9 Sep 1999 19:59:48 +0000
Received: (qmail 7498 invoked from network); 9 Sep 1999 19:59:47 -0000
Received: from gw.varesearch.com (HELO oxygen.su.varesearch.com) (@209.81.8.2)
  by master.debian.org with SMTP; 9 Sep 1999 19:59:47 -0000
Received: from hydrogen.su.varesearch.com ([10.1.0.1] helo=gumdrop.su.varesearch.com)
	by oxygen.su.varesearch.com with esmtp (Exim 2.12 #6)
	id 11PAMD-0006LY-00; Thu, 9 Sep 1999 12:59:45 -0700
Received: from joey by gumdrop.su.varesearch.com with local (Exim 3.03 #1 (Debian))
	id 11PAME-0008Gw-00; Thu, 09 Sep 1999 12:59:46 -0700
From: Joey Hess <joey@varesearch.com>
Subject: apt: Dpkg-Prexec broken
To: submit@bugs.debian.org
X-Mailer: bug 3.2.2
Message-Id: <[🔎] E11PAME-0008Gw-00@gumdrop.su.varesearch.com>
Date: Thu, 09 Sep 1999 12:59:46 -0700

Package: apt
Version: 0.3.12
Severity: normal

root@gumdrop:/home/joey>apt-get install acct
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  acct 
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 packages not fully installed or removed.
Need to get 0B/89.2kB of archives. After unpacking 197kB will be used.
/bin/sh: /bin/sh: cannot execute binary file
E: Write error - write (32 Broken pipe)
root@gumdrop:/home/joey>cat /etc/apt/apt.conf
// Pre-configure all packages before they are installed.
DPkg::Pre-Install-Pkgs {"/tmp/foo";};
joey@gumdrop:~>cat /tmp/foo
#!/usr/bin/perl
while (<>) {
	print STDERR "got: $_\n";
}
	
Strace shows /bin/sh trying to open an ELF executable. Here's a patch, you
aren't supposed to call execv with a dupliacted first argument, like you do
with some exec's.

--- dpkgpm.cc~	Fri Sep  3 09:03:48 1999
+++ dpkgpm.cc	Thu Sep  9 12:37:00 1999
@@ -178,10 +178,9 @@
 	 
 	 const char *Args[5];
 	 Args[0] = "/bin/sh";
-	 Args[1] = "/bin/sh";
-	 Args[2] = "-c";
-	 Args[3] = Opts->Value.c_str();
-	 Args[4] = 0;
+	 Args[1] = "-c";
+	 Args[2] = Opts->Value.c_str();
+	 Args[3] = 0;
 	 execv(Args[0],(char **)Args);
 	 _exit(100);

The next problem is that your the for loop in the same function as the above
code doesn't increment, so it loops endlessly, feeding the same package name
in over and over. Line 199 of dpkgmm.cc needs to be:

      for (vector<Item>::iterator I = List.begin(); I != List.end(); I++)

Looks like the new feature works ok with these two patches.

-- System Information
Debian Release: potato
Kernel Version: Linux gumdrop 2.2.10 #1 SMP Thu Jun 24 12:25:56 PDT 1999 i686 unknown

Versions of the packages apt depends on:
ii  libc6           2.1.2-1        GNU C Library: Shared libraries and timezone
ii  libstdc++2.10   2.95.1-2       The GNU stdc++ library
---------------------------------------
Received: (at 44706-done) by bugs.debian.org; 25 Sep 1999 01:52:16 +0000
Received: (qmail 6117 invoked from network); 25 Sep 1999 01:52:15 -0000
Received: from async20-1.remote.ualberta.ca (HELO localhost) (mail@129.128.237.74)
  by master.debian.org with SMTP; 25 Sep 1999 01:52:15 -0000
Received: from localhost [127.0.0.1] (jgg)
	by localhost with smtp (Exim 2.11 #1)
	id 11Uh0U-00022Z-00 (Debian); Fri, 24 Sep 1999 19:52:10 -0600
Date: Fri, 24 Sep 1999 19:52:10 -0600 (MDT)
From: Jason Gunthorpe <jgg@ualberta.ca>
X-Sender: jgg@localhost
To: 44996-done@bugs.debian.org, 45392-done@bugs.debian.org, 
    45389-done@bugs.debian.org, 44706-done@bugs.debian.org, 
    45050-done@bugs.debian.org, 45176-done@bugs.debian.org
Subject: Closed
Message-ID: <Pine.LNX.3.96.990924194530.2349J-100000@localhost>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


These bugs are all fixed in the latest 0.3.13 release.

Jason


Reply to: