When cryptmount mounts a filesystem, the path names for
the device and mount point that go into /etc/mtab are
canonicalized. When unmounting, is_mounted() compares
the original paths stored in configuration to the
canonicalized versions in mtab; if the two are
different, then unmounting fails.
See support request 1543189
for more details on this issue.
The attached patch against cryptmount-1.1 canonicalizes
all paths in configuration while loading it. If any
errors are encountered while canonicalizing (the path
doesn't exist, it can't be accessed, etc.), then the
offending configuration entry will be deleted. Besides
the 'dev' and 'dir' configuration entries, I also
canonicalize the 'loop' and 'keyfile' paths, just in
case there are any related issues hiding in there.
The patched version works on my system (Fedora Core 5
Linux, running kernel 2.6.17-1.2174_FC5 with SELinux
disabled on an AthlonXP), but I have not checked it for
portability, nor have I made any attempt to
internationalize the error messages.