~rlaager/ecryptfs/fix-lp-1574174

Viewing all changes in revision 881.

  • Committer: Richard Laager
  • Date: 2016-04-25 17:54:44 UTC
  • Revision ID: rlaager@wiktel.com-20160425175444-8524ax0toxb4yotb
Fix improper "already mounted" errors with ZFS

The obvious approach for using ZFS and ecryptfs together involves
creating a dataset like this:
zfs create -o mountpoint=/home/.ecryptfs/USER rpool/home/USER

As a result, /proc/mounts looks like this:
rpool/home/USER /home/.ecryptfs/USER zfs rw,xattr 0 0

ecryptfs-setup-private checked for existing mount points using a grep
which was effectively left-anchored.  Unfortunately, this can match the
device column.  A space at the beginning of the pattern corrects this.

I applied the same fix to the CRYPTDIR for consistency and correctness,
though I do not believe it was a practical problem in the same way.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: