Better support for ecryptfs
ecryptfs is one of the most popular encryption tools for single directories.
When I use baobab on a disk that contains an encrypted folder it doesn't give me very useful information. The way ecryptfs works is that you have some encrypted data in a .Private folder that is decrypted and presented under a separate mount point.
To my understanding baobab excludes all mount points which leads to the problem that the decrypted data is not analysed. On top of that baobab does try to analyse the encrypted data which gives a lot of cryptic folder names and a warning message that "Permission [to these folders was] denied". You can inspect all ecryptfs mounts by searching for the ecryptfs filesystem:
$ cat /proc/self/mountinfo | grep ecryptfs
375 26 0:49 / /home/cedric rw,nosuid,nodev,relatime shared:209 - ecryptfs /home/cedric/.Private rw,ecryptfs_fnek_sig=***,ecryptfs_sig=***,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs
As you can see the device path points to the encrypted data. So why not just exclude the device path instead of the mount point for ecryptfs folders?
if (ScanFlags.EXCLUDE_MOUNTS in flags) {
foreach (unowned UnixMountEntry mount in UnixMountEntry.get (null)) {
if (mount.get_fs_type () == "ecryptfs") {
excluded_locations.add (File.new_for_path (mount.get_device_path ()));
} else {
excluded_locations.add (File.new_for_path (mount.get_mount_path ()));
}
}
}
(Btw. I have no clue about vala. So if there are any mistakes please excuse me.)
I know that I could also just scan that specific folder if I wanted to get its analysis. But that is not very intuitive. Given that many people use this kind of encryption including unexperienced users this would be quite helpful.