|
|
25e938 |
diff -up ecryptfs-utils-90/src/utils/ecryptfs-mount-private.autoload ecryptfs-utils-90/src/utils/ecryptfs-mount-private
|
|
|
25e938 |
--- ecryptfs-utils-90/src/utils/ecryptfs-mount-private.autoload 2011-08-31 12:06:39.561319897 +0200
|
|
|
25e938 |
+++ ecryptfs-utils-90/src/utils/ecryptfs-mount-private 2011-08-31 12:06:39.589319941 +0200
|
|
|
25e938 |
@@ -33,6 +33,9 @@ if /sbin/mount.ecryptfs_private >/dev/nu
|
|
|
25e938 |
exit 0
|
|
|
25e938 |
fi
|
|
|
25e938 |
|
|
|
25e938 |
+#load kernel module if it's missing, FNE support check would fail otherwise
|
|
|
25e938 |
+[ ! -e /sys/fs/ecryptfs/version ] && modinfo ecryptfs >/dev/null 2>&1 && /sbin/mount.ecryptfs_private --loadmodule
|
|
|
25e938 |
+
|
|
|
25e938 |
# Otherwise, interactively prompt for the user's password
|
|
|
25e938 |
if [ -f "$WRAPPED_PASSPHRASE_FILE" -a -f "$MOUNT_PASSPHRASE_SIG_FILE" ]; then
|
|
|
25e938 |
tries=0
|
|
|
25e938 |
diff -up ecryptfs-utils-90/src/utils/ecryptfs-setup-private.autoload ecryptfs-utils-90/src/utils/ecryptfs-setup-private
|
|
|
25e938 |
--- ecryptfs-utils-90/src/utils/ecryptfs-setup-private.autoload 2011-08-10 15:35:11.000000000 +0200
|
|
|
25e938 |
+++ ecryptfs-utils-90/src/utils/ecryptfs-setup-private 2011-08-31 12:04:57.344158953 +0200
|
|
|
2c1ecd |
@@ -101,6 +101,7 @@ random_passphrase () {
|
|
|
2c1ecd |
}
|
|
|
2c1ecd |
|
|
|
2c1ecd |
filename_encryption_available() {
|
|
|
25e938 |
+ [ ! -e /sys/fs/ecryptfs/version ] && modinfo ecryptfs >/dev/null 2>&1 && /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
|
|
|
25e938 |
diff -up ecryptfs-utils-90/src/utils/mount.ecryptfs_private.c.autoload ecryptfs-utils-90/src/utils/mount.ecryptfs_private.c
|
|
|
25e938 |
--- ecryptfs-utils-90/src/utils/mount.ecryptfs_private.c.autoload 2011-08-31 12:00:46.109786923 +0200
|
|
|
25e938 |
+++ ecryptfs-utils-90/src/utils/mount.ecryptfs_private.c 2011-08-31 12:00:46.116786934 +0200
|
|
|
25e938 |
@@ -484,6 +484,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.
|