ecryptfs_unlocked_ioctl gets passed the (higher) target file struct as the first argument, the command as the second, and the source file descriptor as the third argument. It looks like the source file descriptor has already been converted to the lower file if it is associated with a higher file inside an ecryptfs mount. This makes it harder to compare the mountpoints of the source and target to see if the clone should be allowed - you'd need to figure out if the source file descriptor is associated with a higher file then compare that higher file with the (higher) target file to see if they have the same mountpoint. I'm not sure how to do that - there aren't many comments in the ecryptfs code.
-- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1305335 Title: Cutting or copying files on btrfs to ecryptfs results in data loss Status in eCryptfs: Confirmed Status in The Linux Kernel: Unknown Status in linux package in Ubuntu: Confirmed Status in nautilus package in Ubuntu: Invalid Bug description: I've installed a fresh copy of 14.04 beta 2 on a brand-new SSD. I used btrfs as the filesystem. I set up a Private folder usying ecryptfs-setup-private. I copied a few folders into the Private folder, and the entire directory structure and subfolders are copied, including the files themselves, yet every file contains 0 bytes. However, I can create and save new files in the Private directory. Also, folders and files can be correctly copied if I use the command line cp -R. Thanks, Damon ProblemType: Bug DistroRelease: Ubuntu 14.04 Package: nautilus 1:3.10.1-0ubuntu8 ProcVersionSignature: Ubuntu 3.13.0-23.45-generic 3.13.8 Uname: Linux 3.13.0-23-generic x86_64 ApportVersion: 2.14.1-0ubuntu1 Architecture: amd64 CurrentDesktop: Unity Date: Wed Apr 9 18:12:56 2014 EcryptfsInUse: Yes GsettingsChanges: b'org.gnome.nautilus.list-view' b'default-column-order' b"['name', 'size', 'type', 'date_modified', 'date_accessed', 'owner', 'group', 'permissions', 'mime_type', 'where']" InstallationDate: Installed on 2014-04-05 (4 days ago) InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Beta amd64 (20140326) ProcEnviron: LANGUAGE=en_CA:en PATH=(custom, no user) XDG_RUNTIME_DIR=<set> LANG=en_CA.UTF-8 SHELL=/bin/bash SourcePackage: nautilus UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ecryptfs/+bug/1305335/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp