[buildd-tools-devel] Bug#589889: schroot: session names being inconsistently restricted

Zach Carter z.carter at f5.com
Wed Jul 21 22:41:12 UTC 2010


Package: schroot
Version: 1.4.7
Severity: important

schroot allows me to create a persistent session with a particular name, such as "zcarter-catalan-build-cb67j4yZoS-16646".   

However, when I attempt to access it later on, it fails like this:

$  /usr/bin/schroot -p -v -r -c zcarter-catalan-build-cb67j4yZoS-16646 -- uname -a
E: zcarter-catalan-build-cb67j4yZoS-16646: Chroot not found

I traced it down to the is_valid_filename() function defined in sbuild-util.cc

When schroot scans all the files in the session directory, it is skipping those that don't match certain regex restrictions, even though they are valid filenames, and were created by the same version of 
schroot.

This is a regression from behaviour not present in the 1.2 series.

I see two solutions, either:
- enforce the same restrictions when the chroot session is first created.
- loosen the restrictions, since the run-parts() restrictions do not seem appropriate to restrict session names.

My vote would be for the latter solution.  

I'm attaching a patch that works for me.

thanks!

-Zach

-------------- next part --------------
A non-text attachment was scrubbed...
Name: schroot-session-filename-validation.patch
Type: text/x-patch
Size: 1619 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100721/51ab5235/attachment-0001.bin>


More information about the Buildd-tools-devel mailing list