From 65e3be9af4434785adb87be87c9cafb6bfdbb65e Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 2 Oct 2018 14:21:34 +0200 Subject: fs: ubifs: optionally allow to mount UBIFS images with encrypted files Currently we do not support the UBIFS file encryption feature. Nevertheless we can allow read clear files from UBIFS to be able to boot an unencrypted kernel. This differs from the Kernel behaviour, so add a globalvar to make that configurable. Signed-off-by: Sascha Hauer --- fs/ubifs/sb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/ubifs/sb.c') diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index 48bfb24955..a13f092eb0 100644 --- a/fs/ubifs/sb.c +++ b/fs/ubifs/sb.c @@ -357,7 +357,7 @@ int ubifs_read_superblock(struct ubifs_info *c) } #ifndef CONFIG_UBIFS_FS_ENCRYPTION - if (c->encrypted) { + if (c->encrypted && !ubifs_allow_encrypted) { ubifs_err(c, "file system contains encrypted files but UBIFS" " was built without crypto support."); err = -EINVAL; -- cgit v1.2.3