Your message dated Fri, 16 Oct 2009 10:17:42 +0000
with message-id <[email protected]>
and subject line Bug#550098: fixed in amanda 1:2.6.1p1-2
has caused the Debian Bug report #550098,
regarding amanda-server: Bug in server-src/diskfile.c breaks multiple scripts
per dle
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.)
--
550098: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550098
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: amanda-server
Version: 1:2.6.1p1-1
Severity: normal
Tags: patch
Including multiple scripts in a dumptype will cause (at least) amcheck to
send syntactically invalid request packets. The issue has been reported to
upstream and is fixed in SVN commit 2164. I am including the original
report for details.
Sincerely,
Ralph Rößner
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-1-686 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages amanda-server depends on:
ii amanda-common 1:2.6.1p1-1 Advanced Maryland Automatic Networ
ii bsd-mailx [mailx] 8.1.2-0.20090911cvs-1 simple mail user agent
ii libc6 2.9-25 GNU C Library: Shared libraries
ii libglib2.0-0 2.22.0-1 The GLib library of C routines
ii libncurses5 5.7+20090803-2 shared libraries for terminal hand
ii libreadline5 5.2-6 GNU readline and history libraries
ii mailx 1:20081101-2 Transitional package for mailx ren
amanda-server recommends no packages.
Versions of packages amanda-server suggests:
ii amanda-client 1:2.6.1p1-1 Advanced Maryland Automatic Networ
ii cpio 2.10-1 GNU cpio -- a program to manage ar
ii gnuplot 4.2.5-3 A command-line driven interactive
ii perl [perl5] 5.10.0-25 Larry Wall's Practical Extraction
-- no debconf information
-- Original report to amanda-hackers:
Hi!
Using a dumptype with more than one script defined causes amcheck (and
probably others) to fail, citing a format error in the request packet as
the reason. This has been encountered in 2.6.1p1 and verified to persist
in SVN revision 2162.
* Example dumptype
define dumptype normal-snapshot {
normal
script "create-lvm-snapshots"
script "remove-lvm-snapshots"
}
* Example invocation:
bac...@keldon:~$ amcheck -c CAPCom
Amanda Backup Client Hosts Check
--------------------------------
ERROR: keldon: [FORMAT ERROR IN REQUEST PACKET Error on line 1 char 459:
Element 'dle' was closed, but the currently open element is 'script']
ERROR: keldon: service /usr/lib/amanda/selfcheck failed: pid 10527 exited with
code 1
Client check: 14 hosts checked in 2.125 seconds. 2 problems found.
(brought to you by Amanda 2.6.1p1)
* Analysis
Monitoring the communication shows that in the request packet the second
script block is indeed missing its closing tag. The first script block is
syntactically correct.
Encoding of the script data is done in xml_scripts() in diskfile.c . The
</script> closing tag is added in #1940 by call to vstrextend(), which
treats its second to last argument as a variable argument list. A NULL
pointer passed to vstrextend() thus terminates the argument list,
regardless of any following non-NULL arguments.
The last argument before the closing tag is xml_app.result, which is
allocated in #1840, outside the for-all-scripts loop, but freed in #1942,
inside the same loop. So for all passes through the loop after the first
one, xml_app.result will be NULL and the closing tag will be ignored by
vstrextend().
Besides breaking the script encoding, other bad things might happen if
code inside the loop assumes that xml_app.result is initialized.
* Suggested Fix
Initialize xml_app.result inside the loop body. Proposed patch (unidiff):
--- diskfile.c.orig 2009-10-07 11:53:08.000000000 +0200
+++ diskfile.c 2009-10-07 12:56:06.000000000 +0200
@@ -1837,7 +1837,7 @@
xml_app_t xml_app;
xml_app.features = their_features;
- xml_app.result = stralloc("");
+/* xml_app.result initialized in loop */
xml_scr = stralloc("");
for (pp_iter = pp_scriptlist; pp_iter != NULL;
@@ -1850,6 +1850,7 @@
xml_scr1 = vstralloc(" <script>\n",
" ", b64plugin, "\n",
NULL);
+ xml_app.result = stralloc("");
execute_where = pp_script_get_execute_where(pp_script);
switch (execute_where) {
A 2162 revision modified in this way does not reproduce the error.
--- End Message ---
--- Begin Message ---
Source: amanda
Source-Version: 1:2.6.1p1-2
We believe that the bug you reported is fixed in the latest version of
amanda, which is due to be installed in the Debian FTP archive:
amanda-client_2.6.1p1-2_i386.deb
to pool/main/a/amanda/amanda-client_2.6.1p1-2_i386.deb
amanda-common_2.6.1p1-2_i386.deb
to pool/main/a/amanda/amanda-common_2.6.1p1-2_i386.deb
amanda-server_2.6.1p1-2_i386.deb
to pool/main/a/amanda/amanda-server_2.6.1p1-2_i386.deb
amanda_2.6.1p1-2.diff.gz
to pool/main/a/amanda/amanda_2.6.1p1-2.diff.gz
amanda_2.6.1p1-2.dsc
to pool/main/a/amanda/amanda_2.6.1p1-2.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.
Bdale Garbee <[email protected]> (supplier of updated amanda 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: SHA512
Format: 1.8
Date: Fri, 16 Oct 2009 02:10:52 -0600
Source: amanda
Binary: amanda-common amanda-server amanda-client
Architecture: source i386
Version: 1:2.6.1p1-2
Distribution: unstable
Urgency: low
Maintainer: Bdale Garbee <[email protected]>
Changed-By: Bdale Garbee <[email protected]>
Description:
amanda-client - Advanced Maryland Automatic Network Disk Archiver (Client)
amanda-common - Advanced Maryland Automatic Network Disk Archiver (Libs)
amanda-server - Advanced Maryland Automatic Network Disk Archiver (Server)
Closes: 506397 535214 550098 551156
Changes:
amanda (1:2.6.1p1-2) unstable; urgency=low
.
* calcsize needs to be setuid, closes: #551156
* patch from upstream to fix init of xml_app.result in diskfile.c,
closes: #550098
* add note to server package README.Debian regarding mtio operations that
take too long putting noise in dmesg, closes: #506397
* merge Finnish translation of the debconf templates, closes: #535214
Checksums-Sha1:
fafa1328554818bdb46f16a237a6be9d46551067 1860 amanda_2.6.1p1-2.dsc
8ccdbca4867bd8c54f2a6861f1a55b64db9c4dc5 37226 amanda_2.6.1p1-2.diff.gz
c426fa0c7644b48c34e9dc34803b6b883e889699 1505410
amanda-common_2.6.1p1-2_i386.deb
bfbb64995e28292f3cf457c3267967c49815c861 436580
amanda-server_2.6.1p1-2_i386.deb
ef853383e1dd3603443bd99f2b6706f5bced183c 191836
amanda-client_2.6.1p1-2_i386.deb
Checksums-Sha256:
239ca2ccb315256b54a1984c946c53965a03b35698c1f821136ea7a684e29d7c 1860
amanda_2.6.1p1-2.dsc
34b625c6b2f242d20d1224aa12ce31735f9899b2c2e50dda649d8212cab7ad10 37226
amanda_2.6.1p1-2.diff.gz
218e9ff3e5d2ec83b337f445cc977c648323bb708e0567d26c8e671363432eb9 1505410
amanda-common_2.6.1p1-2_i386.deb
6eec972785693ef97f84df0f17378946e19315a93e9a3251b789fffd5f97fa84 436580
amanda-server_2.6.1p1-2_i386.deb
783ccacdc061b0c669570a97af60a4d12d8e8e02850add04d0d4bfb19133bcdc 191836
amanda-client_2.6.1p1-2_i386.deb
Files:
1fde816ec85fe3044bcb2823a342aac8 1860 utils optional amanda_2.6.1p1-2.dsc
b49879fbabb3502f944ca3488dc8abbe 37226 utils optional amanda_2.6.1p1-2.diff.gz
3a747e3005937d56f05ed034db13c8fc 1505410 utils optional
amanda-common_2.6.1p1-2_i386.deb
c00d3a5c820b428227aa20ceb4daf9e1 436580 utils optional
amanda-server_2.6.1p1-2_i386.deb
5644b9eac99454c2d892d1005aa74301 191836 utils optional
amanda-client_2.6.1p1-2_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQIVAwUBStgxUjqTYZbAldlBAQohfw/9Foa5SgyG0AV3YHsJPmhe9idzA8Iv7FXi
AhAqZmEmWsWhiyVd9zKA/OR++965AGV4GupxEEsRc5v8lOdvIAsyIAuLFXVoAoQX
Zk7GsPh7CnRoePYi77fAelBfPznDh0XudR1rkDQHrbj7yboN7EmviaxpH9TxoEvY
7kX+wuUwY3hB5uOACk2O4ZJoQbDb12/PHcdowVuJ0DXtC0iFdn7G5nB2EZJOorSB
I5t7DC1e8ZaSCJQS9yCGrBd4SC7VyKLYfhh0VFQlunkF75nzskiRJdnOsqVm7O7V
dcW/rF96pYGAHGUum5hwoZW1WofF9t1/MpDAtxFz25NFn79L62i4fb5cFiKS5TBI
K1hc9wdYVkXwtM2fKVqj5tOR5N8HB65dSQ4lged4hEjictqf+WL4zkXZV9QmoFjt
SrsWFOz885lKhlBuyzF4KHT6rRPTb3Nebf/jBvASDpKujTA+aAbOyxEoPFTzqRPn
JZVXWMikJ+8f83pienUoo7Qz4vsvbWuv3sFibFHBWdSxjcEtY1AGGTJAxt1KQibC
uO0FakbsZkunhI2gnxgddB/GXI4Ah/R5bWZFKAEvqvPOQoqhUOmC3jCHW1VPipUz
DJAMjrt8cLZlyi5pED9/Z1T91FSlpBuejjpsOYDGNkCKXpPKKm7hCFPIip4CjGDO
1Jtw/HuZ1Nw=
=zpMD
-----END PGP SIGNATURE-----
--- End Message ---