diff options
author | Tyler Hicks <tyhicks@canonical.com> | 2012-01-14 16:46:46 +0100 |
---|---|---|
committer | Tyler Hicks <tyhicks@canonical.com> | 2012-01-25 14:43:40 -0600 |
commit | 48399c0b0e6172888a2e2e36df1595ab1e049ba8 (patch) | |
tree | 7fb94f7ce80de13fd419e69322d9e6b157a49f91 /fs/ecryptfs/ecryptfs_kernel.h | |
parent | 7f133504249afa48618becac546ce3c35c9f0185 (diff) | |
download | linux-48399c0b0e6172888a2e2e36df1595ab1e049ba8.tar.gz linux-48399c0b0e6172888a2e2e36df1595ab1e049ba8.tar.bz2 linux-48399c0b0e6172888a2e2e36df1595ab1e049ba8.zip |
eCryptfs: Replace miscdev read/write magic numbers
ecryptfs_miscdev_read() and ecryptfs_miscdev_write() contained many
magic numbers for specifying packet header field sizes and offsets. This
patch defines those values and replaces the magic values.
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Diffstat (limited to 'fs/ecryptfs/ecryptfs_kernel.h')
-rw-r--r-- | fs/ecryptfs/ecryptfs_kernel.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h index a9f29b12fbf2..a2362df58ae8 100644 --- a/fs/ecryptfs/ecryptfs_kernel.h +++ b/fs/ecryptfs/ecryptfs_kernel.h @@ -151,6 +151,11 @@ ecryptfs_get_key_payload_data(struct key *key) * dentry name */ #define ECRYPTFS_TAG_73_PACKET_TYPE 0x49 /* FEK-encrypted filename as * metadata */ +#define ECRYPTFS_MIN_PKT_LEN_SIZE 1 /* Min size to specify packet length */ +#define ECRYPTFS_MAX_PKT_LEN_SIZE 2 /* Pass at least this many bytes to + * ecryptfs_parse_packet_length() and + * ecryptfs_write_packet_length() + */ /* Constraint: ECRYPTFS_FILENAME_MIN_RANDOM_PREPEND_BYTES >= * ECRYPTFS_MAX_IV_BYTES */ #define ECRYPTFS_FILENAME_MIN_RANDOM_PREPEND_BYTES 16 |