Hi Steven,

Thanks for getting back to me and for providing a minimalistic call of
mondoarchive. I have now been able to reproduce and can thus confirm
this bug.

The issue is indeed that special characters in filenames are not
escaped. The place this happens is the call to getfattr to get a list of
extended attributes in libmondo-filelist.c in function gen_aux_list().

To illustrate the wrong behaviour, I attach a little test program
backquote_test.c. (This is mainly so that I remember what the problem
is.)

In case you are not using extended attributes, you can remove the attr
package which I believe will make the program go away.

I have to think about how to properly escape characters in filenames
before they are being used in a shell command. (If you have any ideas,
please let me know.) At the moment I believe that a generic function
should be written that handles this type of thing consistently in mondo.
I would hope that such a function already exists somewhere and I can
just nick it. We'll see.

Best regards,
Andree

On Thu, 2006-07-27 at 22:20 -0400, Steven M. Robbins wrote:
> Quoting Andree Leidenfrost <[EMAIL PROTECTED]>:
> 
> > Could you send a screenshot of the terminal window with mondoarchive
> > running when this appears. I have unsuccessfully tried to reproduce
> > this, maybe if I see where/when exactly it occurs that could help me.
> 
> Well, in the "graphical" mode, the error shows up in the middle of  
> screen and it is not clear what's going on at the time.  Acting on  
> your further suggestion to provide a command-line invocation, however,  
> makes this feasible.
> 
> I created the directory /tmp/bogus as described in the initial bug  
> report.  Then run "mondoarchive -W -O -i -d . -I /tmp/bogus" as root.   
> The output is as follows:
> 
> [EMAIL PROTECTED] -W -O -i -d . -I /tmp/bogus
> Initializing...
> See /var/log/mondo-archive.log for details of backup run.
> Checking sanity of your Linux distribution
> Done.
> Warning - you have opted for non-bootable backup
> BusyBox's sources are available from http://www.busybox.net
> Making catalog of files to be backed up
> Done.
> Dividing filelist into sets
> Dividing filelist into sets. Please wait.
> Your backup will probably occupy a single ISO. Maybe two.
> Done.
> Copying Mondo's core files to the scratch directory
> Done.
> Calling MINDI to create boot+data disks
> Your boot loader is unknown and it boots from
> /backup/tmp.mondo.2260/tmp.mondo.30326
> Boot+data disks were created OK
> Done.
> Preparing to archive your data
> Done.
> Archiving regular files to media
> Archiving regular files
> ---progress-form---1--- I am backing up your live filesystem now.
> ---progress-form---2--- Please wait. This may take a couple of hours.
> ---progress-form---3--- Working...
> ---progress-form---E---
> ---progress-form---4--- TASK:  [*...................]   1% done;  0:00 to go
> sh: -c: line 0: unexpected EOF while looking for matching ``'
> sh: -c: line 1: syntax error: unexpected end of file
> ---progress-form---1--- I am backing up your live filesystem now.
> ---progress-form---2--- ISO 1: [....................] 0% used
> ---progress-form---3--- Please wait. This may take a couple of hours.
> ---progress-form---E---
> ---progress-form---4--- TASK:  [*...................]   1% done;  8:20 to go
> Your regular files have been archived successfully.
> Done.
> Archiving large files to media
> Done.
> Writing any remaining data to media
> Please be patient. Do not be alarmed by on-screen inactivity.
> Call to mkisofs to make ISO (ISO #1) ...OK
> Done.
> Done.
> Writing boot+data floppy images to disk
> ---promptpopup---1--- Since you opted for a nonbootable backup, no  
> boot floppies were created.
> ---promptpopup---Q--- [OK] ---
> -->
> Backup and/or verify ran to completion. Everything appears to be fine.
> /root/images/mindi/mondorescue.iso, a boot/utility CD, is available if  
> you want
> Data archived OK.
> Mondoarchive ran OK.
> See /var/log/mondo-archive.log for details of backup run.
> 
> 
> I hope you can home in on the bug with this.
> 
> -Steve
> 
-- 
Andree Leidenfrost
@ Debian Developer
Sydney - Australia

#include <stdlib.h>

int main() {

  system("getfattr --en=hex -P -d \"/tmp/bogus/a silly `filename\"");

  return 0;

}

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to