Your message dated Sun, 15 Feb 2009 13:59:09 +0000
with message-id <[email protected]>
and subject line Bug#514936: fixed in cpio 2.9-15
has caused the Debian Bug report #514936,
regarding cpio does not use error codes on exit
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
514936: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514936
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cpio
Version: 2.9-14
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu jaunty ubuntu-patch
It seems that cpio does not actually use the error codes it sets while
running, and always exits with 0. This will break anything that expects
cpio to fail if it encounter problems (like, say, mkinitramfs).
All the error handling code is in paxlib, which includes the "pax_exit()"
function. src/main.c's main should call pax_exit, not "exit (0)" like it
currently does.
Example:
$ cd /tmp/busticated
$ ls -lR
.:
total 4
drwxr-xr-x 2 kees kees 4096 Feb 12 00:27 sbin
./sbin:
total 0
lrwxrwxrwx 1 kees kees 20 Feb 12 00:27 no-such-binary -> /sbin/no-such-binary
What current happens with failures:
$ find . | cpio -L -o > /tmp/archive.cpio
cpio: ./sbin/no-such-binary: No such file or directory
1 block
$ echo $?
0
I would expect this instead:
$ find . | cpio -L -o > /tmp/archive.cpio
cpio: ./sbin/no-such-binary: No such file or directory
1 block
$ echo $?
2
Attached trivial patch changes the behavior...
-Kees
--
Kees Cook @debian.org
diff -u cpio-2.9/src/main.c cpio-2.9/src/main.c
--- cpio-2.9/src/main.c
+++ cpio-2.9/src/main.c
@@ -801,3 +801,3 @@
- exit (0);
+ pax_exit ();
}
--- End Message ---
--- Begin Message ---
Source: cpio
Source-Version: 2.9-15
We believe that the bug you reported is fixed in the latest version of
cpio, which is due to be installed in the Debian FTP archive:
cpio-win32_2.9-15_all.deb
to pool/main/c/cpio/cpio-win32_2.9-15_all.deb
cpio_2.9-15.diff.gz
to pool/main/c/cpio/cpio_2.9-15.diff.gz
cpio_2.9-15.dsc
to pool/main/c/cpio/cpio_2.9-15.dsc
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Clint Adams <[email protected]> (supplier of updated cpio package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Sat, 14 Feb 2009 13:55:42 -0500
Source: cpio
Binary: cpio cpio-win32
Architecture: source all
Version: 2.9-15
Distribution: unstable
Urgency: medium
Maintainer: Clint Adams <[email protected]>
Changed-By: Clint Adams <[email protected]>
Description:
cpio - GNU cpio -- a program to manage archives of files
cpio-win32 - GNU cpio -- a program to manage archives of files (win32 build)
Closes: 514936
Changes:
cpio (2.9-15) unstable; urgency=medium
.
* Apply patch from Kees Cook to return proper exit codes. closes:
#514936.
Checksums-Sha1:
f85bb65fb341f357f2cd298dd03818cddaf701dd 1078 cpio_2.9-15.dsc
8a93550a506dbbc848276d4c275b9e24e23ea72a 107614 cpio_2.9-15.diff.gz
477c10ec7821b7880fae4d130dcbf7f077cf2b26 74186 cpio-win32_2.9-15_all.deb
Checksums-Sha256:
8db0299565bcb018dd225d7479d3462546529b595da330e4f8c4fc76c1fa5b05 1078
cpio_2.9-15.dsc
ee705c5802aff5d6b0bce172aba5c790eb6b6ce727067f748380042601d512d6 107614
cpio_2.9-15.diff.gz
9b43a3e1fb29e51e61b31db7f5c4b3dc2878c9f9d3325157acb2d28356ec7d98 74186
cpio-win32_2.9-15_all.deb
Files:
0247c8954c2dd5b2f53c3ee7ac10eb59 1078 utils important cpio_2.9-15.dsc
d7acccdeaed92949882641c051bff63d 107614 utils important cpio_2.9-15.diff.gz
683d3e2dcf189d48a2b6e5d666ea437f 74186 utils extra cpio-win32_2.9-15_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Debian!
iD8DBQFJlxch5m0u66uWM3ARAuiEAJ4xMffa58CQAUrBxj/jg+PDzVIPkwCffepf
ig1YZsPEQsoIDA+mM8enOGs=
=SzAQ
-----END PGP SIGNATURE-----
--- End Message ---