kernel_optimize_test/fs/ext4
Theodore Ts'o d9cdc90331 ext4 crypto: enforce context consistency
Enforce the following inheritance policy:

1) An unencrypted directory may contain encrypted or unencrypted files
or directories.

2) All files or directories in a directory must be protected using the
same key as their containing directory.

As a result, assuming the following setup:

mke2fs -t ext4 -Fq -O encrypt /dev/vdc
mount -t ext4 /dev/vdc /vdc
mkdir /vdc/a /vdc/b /vdc/c
echo foo | e4crypt add_key /vdc/a
echo bar | e4crypt add_key /vdc/b
for i in a b c ; do cp /etc/motd /vdc/$i/motd-$i ; done

Then we will see the following results:

cd /vdc
mv a b			# will fail; /vdc/a and /vdc/b have different keys
mv b/motd-b a		# will fail, see above
ln a/motd-a b		# will fail, see above
mv c a	    		# will fail; all inodes in an encrypted directory
   	  		#	must be encrypted
ln c/motd-c b		# will fail, see above
mv a/motd-a c		# will succeed
mv c/motd-a a		# will succeed

Signed-off-by: Michael Halcrow <mhalcrow@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-04-12 00:55:08 -04:00
..
acl.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
acl.h
balloc.c ext4: remove unnecessary lock/unlock of i_block_reservation_lock 2015-04-03 00:02:53 -04:00
bitmap.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
block_validity.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
crypto_key.c ext4 crypto: add encryption key management facilities 2015-04-12 00:55:06 -04:00
crypto_policy.c ext4 crypto: add ext4 encryption facilities 2015-04-12 00:43:56 -04:00
crypto.c ext4 crypto: add ext4 encryption facilities 2015-04-12 00:43:56 -04:00
dir.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
ext4_crypto.h ext4 crypto: add encryption key management facilities 2015-04-12 00:55:06 -04:00
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
ext4.h ext4 crypto: add encryption key management facilities 2015-04-12 00:55:06 -04:00
extents_status.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
extents_status.h
extents.c ext4: don't release reserved space for previously allocated cluster 2015-04-03 00:17:31 -04:00
file.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
fsync.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
hash.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
ialloc.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
indirect.c Ext4 bug fixes for 3.20. We also reserved code points for encryption 2015-02-22 18:05:13 -08:00
inline.c ext4: fix transposition typo in format string 2015-04-02 16:42:43 -04:00
inode.c ext4 crypto: add ext4_mpage_readpages() 2015-04-08 00:00:32 -04:00
ioctl.c ext4 crypto: add encryption policy and password salt support 2015-04-11 07:48:01 -04:00
Kconfig ext4 crypto: add ext4 encryption Kconfig 2015-04-11 07:46:47 -04:00
Makefile ext4 crypto: add encryption key management facilities 2015-04-12 00:55:06 -04:00
mballoc.c
mballoc.h
migrate.c
mmp.c
move_extent.c
namei.c ext4 crypto: enforce context consistency 2015-04-12 00:55:08 -04:00
page-io.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
readpage.c ext4 crypto: add ext4_mpage_readpages() 2015-04-08 00:00:32 -04:00
resize.c ext4: prevent online resize with backup superblock 2014-12-26 23:58:21 -05:00
super.c ext4 crypto: add ext4 encryption facilities 2015-04-12 00:43:56 -04:00
symlink.c ext4: remove unused header files 2015-04-02 23:47:42 -04:00
truncate.h
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c ext4: remove useless condition in if statement. 2015-04-02 23:50:48 -04:00
xattr.h ext4 crypto: add encryption xattr support 2015-04-11 07:47:00 -04:00