Blame ecryptfs-utils-87-autoload.patch
|
|
2c1ecd |
diff -up ecryptfs-utils-87/src/utils/ecryptfs-setup-private.autoload ecryptfs-utils-87/src/utils/ecryptfs-setup-private
|
|
|
2c1ecd |
--- ecryptfs-utils-87/src/utils/ecryptfs-setup-private.autoload 2011-05-26 15:03:03.716014960 +0200
|
|
|
2c1ecd |
+++ ecryptfs-utils-87/src/utils/ecryptfs-setup-private 2011-05-26 15:03:03.676014684 +0200
|
|
|
2c1ecd |
@@ -101,6 +101,7 @@ random_passphrase () {
|
|
|
2c1ecd |
}
|
|
|
2c1ecd |
|
|
|
2c1ecd |
filename_encryption_available() {
|
|
|
2c1ecd |
+ [ ! -e /sys/fs/ecryptfs/version ] && ! lsmod | grep -q ecryptfs && /sbin/mount.ecryptfs_private --loadmodule
|
|
|
2c1ecd |
version=$(cat /sys/fs/ecryptfs/version 2>/dev/null)
|
|
|
2c1ecd |
[ -z "$version" ] && error "$(gettext 'Cannot get ecryptfs version, ecryptfs kernel module not loaded?')"
|
|
|
2c1ecd |
[ $(($version & 0x100)) -eq 0 ] && return 1
|
|
|
2c1ecd |
diff -up ecryptfs-utils-87/src/utils/mount.ecryptfs_private.c.autoload ecryptfs-utils-87/src/utils/mount.ecryptfs_private.c
|
|
|
2c1ecd |
--- ecryptfs-utils-87/src/utils/mount.ecryptfs_private.c.autoload 2011-05-26 13:35:41.364468265 +0200
|
|
|
2c1ecd |
+++ ecryptfs-utils-87/src/utils/mount.ecryptfs_private.c 2011-05-26 13:39:34.887345368 +0200
|
|
|
2c1ecd |
@@ -387,6 +387,13 @@ int main(int argc, char *argv[]) {
|
|
|
2c1ecd |
char *sig, *sig_fnek;
|
|
|
2c1ecd |
FILE *fh_counter = NULL;
|
|
|
2c1ecd |
|
|
|
2c1ecd |
+ if (argc == 2 && !strcmp(argv[1],"--loadmodule"))
|
|
|
2c1ecd |
+ {
|
|
|
2c1ecd |
+ execl("/sbin/modprobe","modprobe","ecryptfs",NULL);
|
|
|
2c1ecd |
+ perror("Unable to load ecryptfs module");
|
|
|
2c1ecd |
+ return -1;
|
|
|
2c1ecd |
+ }
|
|
|
2c1ecd |
+
|
|
|
2c1ecd |
uid = getuid();
|
|
|
2c1ecd |
/* Non-privileged effective uid is sufficient for all but the code
|
|
|
2c1ecd |
* that mounts, unmounts, and updates /etc/mtab.
|