--exclude-if-present and --exclude-other-filesystems causes crash with inaccessible other fs

Bug #1039001 reported by az
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

this is a forward of debian bug #685352, which lives over there: http://bugs.debian.org/685352

the original submitter has a fuse filesystem mounted (=inaccessible to anybody else, incl. root)
and a symlink pointing to it, and wants to back stuff up as root - except the inaccessible stuff of course,
so he uses --exclude-other-filesystems.

this works fine if only --exclude-other-filesystems is specified, but if --exclude-if-present is also active,
then the backup crashes because duplicity checks for the presence of the testfile in the symlinked
dir (=inaccessible), and doesn't properly deal with the error code (line 504 in path.py covers only enodir, enoent, but not eaccess).

to reproduce:
mkdir testdir && cd testdir
touch bla
ln -s /root # or any other dir that has no x perms for you, and is on a different fs

duplicity --exclude-if-present .whatever --exclude-other-filesystems file:///tmp/testme

regards
az

Related branches

Revision history for this message
az (az-debian) wrote :

i've tracked down the root cause and have a fix for it:

if --exclude-if-present is used, then the path to check is run through path.append which creates a new
path object which in turn uses setdata which in turn follows links. the rest of path.py is careful not
to follow any symlinks, but the constructor isn't.

Changed in duplicity:
status: New → Fix Committed
importance: Undecided → Medium
milestone: none → 0.6.20
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.