Skip to content

Commit 237fead

Browse files
Michael HalcrowLinus Torvalds
authored andcommitted
[PATCH] ecryptfs: fs/Makefile and fs/Kconfig
eCryptfs is a stacked cryptographic filesystem for Linux. It is derived from Erez Zadok's Cryptfs, implemented through the FiST framework for generating stacked filesystems. eCryptfs extends Cryptfs to provide advanced key management and policy features. eCryptfs stores cryptographic metadata in the header of each file written, so that encrypted files can be copied between hosts; the file will be decryptable with the proper key, and there is no need to keep track of any additional information aside from what is already in the encrypted file itself. [[email protected]: updates for ongoing API changes] [[email protected]: cleanups] [[email protected]: alpha build fix] [[email protected]: cleanups] [[email protected]: inode-diet updates] [[email protected]: generic_file_*_read/write() interface updates] [[email protected]: printk format fixes] [[email protected]: make slab creation and teardown table-driven] Signed-off-by: Phillip Hellewell <[email protected]> Signed-off-by: Michael Halcrow <[email protected]> Signed-off-by: Erez Zadok <[email protected]> Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Stephan Mueller <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]> Signed-off-by: Badari Pulavarty <[email protected]> Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent f7aa263 commit 237fead

File tree

15 files changed

+6852
-0
lines changed

15 files changed

+6852
-0
lines changed

Documentation/ecryptfs.txt

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
eCryptfs: A stacked cryptographic filesystem for Linux
2+
3+
eCryptfs is free software. Please see the file COPYING for details.
4+
For documentation, please see the files in the doc/ subdirectory. For
5+
building and installation instructions please see the INSTALL file.
6+
7+
Maintainer: Phillip Hellewell
8+
Lead developer: Michael A. Halcrow <[email protected]>
9+
Developers: Michael C. Thompson
10+
Kent Yoder
11+
Web Site: http://ecryptfs.sf.net
12+
13+
This software is currently undergoing development. Make sure to
14+
maintain a backup copy of any data you write into eCryptfs.
15+
16+
eCryptfs requires the userspace tools downloadable from the
17+
SourceForge site:
18+
19+
http://sourceforge.net/projects/ecryptfs/
20+
21+
Userspace requirements include:
22+
- David Howells' userspace keyring headers and libraries (version
23+
1.0 or higher), obtainable from
24+
http://people.redhat.com/~dhowells/keyutils/
25+
- Libgcrypt
26+
27+
28+
NOTES
29+
30+
In the beta/experimental releases of eCryptfs, when you upgrade
31+
eCryptfs, you should copy the files to an unencrypted location and
32+
then copy the files back into the new eCryptfs mount to migrate the
33+
files.
34+
35+
36+
MOUNT-WIDE PASSPHRASE
37+
38+
Create a new directory into which eCryptfs will write its encrypted
39+
files (i.e., /root/crypt). Then, create the mount point directory
40+
(i.e., /mnt/crypt). Now it's time to mount eCryptfs:
41+
42+
mount -t ecryptfs /root/crypt /mnt/crypt
43+
44+
You should be prompted for a passphrase and a salt (the salt may be
45+
blank).
46+
47+
Try writing a new file:
48+
49+
echo "Hello, World" > /mnt/crypt/hello.txt
50+
51+
The operation will complete. Notice that there is a new file in
52+
/root/crypt that is at least 12288 bytes in size (depending on your
53+
host page size). This is the encrypted underlying file for what you
54+
just wrote. To test reading, from start to finish, you need to clear
55+
the user session keyring:
56+
57+
keyctl clear @u
58+
59+
Then umount /mnt/crypt and mount again per the instructions given
60+
above.
61+
62+
cat /mnt/crypt/hello.txt
63+
64+
65+
NOTES
66+
67+
eCryptfs version 0.1 should only be mounted on (1) empty directories
68+
or (2) directories containing files only created by eCryptfs. If you
69+
mount a directory that has pre-existing files not created by eCryptfs,
70+
then behavior is undefined. Do not run eCryptfs in higher verbosity
71+
levels unless you are doing so for the sole purpose of debugging or
72+
development, since secret values will be written out to the system log
73+
in that case.
74+
75+
76+
Mike Halcrow
77+

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,13 @@ L: [email protected]
977977
W: http://ebtables.sourceforge.net/
978978
S: Maintained
979979

980+
ECRYPT FILE SYSTEM
981+
P: Mike Halcrow, Phillip Hellewell
982+
983+
984+
W: http://ecryptfs.sourceforge.net/
985+
S: Supported
986+
980987
EDAC-CORE
981988
P: Doug Thompson
982989

fs/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,18 @@ config AFFS_FS
995995
To compile this file system support as a module, choose M here: the
996996
module will be called affs. If unsure, say N.
997997

998+
config ECRYPT_FS
999+
tristate "eCrypt filesystem layer support (EXPERIMENTAL)"
1000+
depends on EXPERIMENTAL && KEYS && CRYPTO
1001+
help
1002+
Encrypted filesystem that operates on the VFS layer. See
1003+
<file:Documentation/ecryptfs.txt> to learn more about
1004+
eCryptfs. Userspace components are required and can be
1005+
obtained from <http://ecryptfs.sf.net>.
1006+
1007+
To compile this file system support as a module, choose M here: the
1008+
module will be called ecryptfs.
1009+
9981010
config HFS_FS
9991011
tristate "Apple Macintosh file system support (EXPERIMENTAL)"
10001012
depends on BLOCK && EXPERIMENTAL

fs/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ obj-$(CONFIG_BFS_FS) += bfs/
7575
obj-$(CONFIG_ISO9660_FS) += isofs/
7676
obj-$(CONFIG_HFSPLUS_FS) += hfsplus/ # Before hfs to find wrapped HFS+
7777
obj-$(CONFIG_HFS_FS) += hfs/
78+
obj-$(CONFIG_ECRYPT_FS) += ecryptfs/
7879
obj-$(CONFIG_VXFS_FS) += freevxfs/
7980
obj-$(CONFIG_NFS_FS) += nfs/
8081
obj-$(CONFIG_EXPORTFS) += exportfs/

fs/ecryptfs/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# Makefile for the Linux 2.6 eCryptfs
3+
#
4+
5+
obj-$(CONFIG_ECRYPT_FS) += ecryptfs.o
6+
7+
ecryptfs-objs := dentry.o file.o inode.o main.o super.o mmap.o crypto.o keystore.o debug.o

0 commit comments

Comments
 (0)