grub/tests
Eric Biggers 734668238f Allow GRUB to mount ext2/3/4 filesystems that have the encryption feature.
On such a filesystem, inodes may have EXT4_ENCRYPT_FLAG set.
For a regular file, this means its contents are encrypted; for a
directory, this means the filenames in its directory entries are
encrypted; and for a symlink, this means its target is encrypted.  Since
GRUB cannot decrypt encrypted contents or filenames, just issue an error
if it would need to do so.  This is sufficient to allow unencrypted boot
files to co-exist with encrypted files elsewhere on the filesystem.

(Note that encrypted regular files and symlinks will not normally be
encountered outside an encrypted directory; however, it's possible via
hard links, so they still need to be handled.)

Tested by booting from an ext4 /boot partition on which I had run
'tune2fs -O encrypt'.  I also verified that the expected error messages
are printed when trying to access encrypted directories, files, and
symlinks from the GRUB command line.  Also ran 'sudo ./grub-fs-tester
ext4_encrypt'; note that this requires e2fsprogs v1.43+ and Linux v4.1+.

Signed-off-by: Eric Biggers <ebiggers@google.com>
2017-06-29 13:29:53 +00:00
..
file_filter * tests/file_filter/file: Really add missing file. 2015-01-23 19:46:02 +01:00
lib * include/grub/test.h (grub_unit_test_init): Add missing prototype. 2012-02-12 22:04:55 +01:00
syslinux tests: remove hardcoded paths from syslinux_test 2015-02-16 22:24:05 +03:00
util Allow GRUB to mount ext2/3/4 filesystems that have the encryption feature. 2017-06-29 13:29:53 +00:00
ahci_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
btrfs_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
cdboot_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
cmp_unit_test.c * tests/cmp_unit_test.c: Add missing failure message. 2012-05-30 13:54:30 +02:00
core_compress_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
cpio_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
date_unit_test.c * tests/date_unit_test.c: New test. 2013-10-26 02:48:19 +02:00
dfly-mbr-mbexample.dfly.img.gz * grub-core/partmap/dfly.c: New partition map. 2013-05-15 17:26:49 +02:00
dfly-mbr-mbexample.mbr.img.gz * grub-core/partmap/dfly.c: New partition map. 2013-05-15 17:26:49 +02:00
ehci_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
example_grub_script_test.in minor cleanups 2010-08-19 17:50:05 +05:30
example_scripted_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
example_unit_test.c * tests/cmp_unit_test.c: Add missing failure message. 2012-05-30 13:54:30 +02:00
exfat_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
ext234_test.in Allow GRUB to mount ext2/3/4 filesystems that have the encryption feature. 2017-06-29 13:29:53 +00:00
fat_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
fddboot_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
file_filter_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
gettext_strings_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_cmd_date.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_cmd_echo.in suppress shell expansion inside quoted strings 2010-11-07 16:13:14 +05:30
grub_cmd_regexp.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_cmd_set_date.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_cmd_sleep.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_cmd_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_cmd_tr.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_func_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_script_blanklines.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_script_blockarg.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_script_break.in break command support 2010-05-05 15:34:26 +05:30
grub_script_comments.in added few more test cases 2010-05-01 15:39:59 +05:30
grub_script_continue.in continue command support 2010-05-05 16:19:31 +05:30
grub_script_dollar.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_script_echo1.in Fix wildcard escaping. 2012-06-08 22:54:21 +02:00
grub_script_echo_keywords.in lexer-rewrite rebase commit 2010-01-22 19:07:27 +05:30
grub_script_escape_comma.in Add few new tests. 2013-04-29 12:25:57 +02:00
grub_script_eval.in * tests/grub_script_eval.in: Really add the eval test. 2013-06-15 17:39:45 +02:00
grub_script_expansion.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_script_final_semicolon.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_script_for1.in for loop support to grub script 2010-01-23 11:03:41 +05:30
grub_script_functions.in few more testcases added 2010-05-12 13:53:50 +05:30
grub_script_gettext.in Add variable parsing in $"..." and fix several mismatches with bash. 2012-03-11 14:46:48 +01:00
grub_script_if.in added elif patch from Deepak Vankadaru 2010-03-21 10:27:21 +05:30
grub_script_leading_whitespace.in * grub-core/script/argv.c (grub_script_argv_split_append): Skip leading 2012-03-19 13:29:43 +01:00
grub_script_no_commands.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
grub_script_not.in not command (!) support 2010-09-05 14:57:28 +05:30
grub_script_return.in return command for functions 2010-08-25 19:35:52 +05:30
grub_script_setparams.in setparams command to set positional parameters 2010-08-15 12:02:33 +05:30
grub_script_shift.in few more testcases 2010-05-12 17:46:49 +05:30
grub_script_strcmp.in * grub-core/kern/misc.c (grub_strcmp): Use unsigned comparison as 2012-05-04 12:08:22 +02:00
grub_script_test.in Fix test -a and -o precedence. 2013-05-04 13:38:59 +02:00
grub_script_vars1.in rewrote arglist to argv conversion and added $@, $* support 2010-05-12 10:19:12 +05:30
grub_script_while1.in new testcase for while and until loops 2010-01-26 12:32:47 +05:30
gzcompress_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
hddboot_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
help_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
hfs_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
hfsplus_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
iso9660_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
jfs_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
lzocompress_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
minixfs_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
netboot_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
nilfs2_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
ntfs_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
ohci_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
partmap_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
pata_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
printf_unit_test.c printf: Fix and test %% behaviour in presence of subsequenbt args. 2016-02-12 12:33:41 +01:00
priority_queue_unit_test.cc * tests/priority_queue_unit_test.cc: New test. 2013-05-07 11:30:48 +02:00
pseries_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
reiserfs_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
romfs_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
squashfs_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
syslinux_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
tar_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
test_sha512sum.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
test_unset.in * tests/test_unset.in: New test. 2013-10-26 14:52:54 +02:00
udf_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
uhci_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
xfs_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
xzcompress_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00
zfs_test.in Fix shebang for termux. 2017-05-03 12:49:31 +02:00