diff options
author | Tyler Hicks <tyhicks@canonical.com> | 2012-01-14 10:46:46 -0500 |
---|---|---|
committer | Tyler Hicks <tyhicks@canonical.com> | 2012-01-25 15:43:40 -0500 |
commit | 48399c0b0e6172888a2e2e36df1595ab1e049ba8 (patch) | |
tree | 7fb94f7ce80de13fd419e69322d9e6b157a49f91 /fs/ecryptfs/ecryptfs_kernel.h | |
parent | 7f133504249afa48618becac546ce3c35c9f0185 (diff) |
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) | |||
151 | * dentry name */ | 151 | * dentry name */ |
152 | #define ECRYPTFS_TAG_73_PACKET_TYPE 0x49 /* FEK-encrypted filename as | 152 | #define ECRYPTFS_TAG_73_PACKET_TYPE 0x49 /* FEK-encrypted filename as |
153 | * metadata */ | 153 | * metadata */ |
154 | #define ECRYPTFS_MIN_PKT_LEN_SIZE 1 /* Min size to specify packet length */ | ||
155 | #define ECRYPTFS_MAX_PKT_LEN_SIZE 2 /* Pass at least this many bytes to | ||
156 | * ecryptfs_parse_packet_length() and | ||
157 | * ecryptfs_write_packet_length() | ||
158 | */ | ||
154 | /* Constraint: ECRYPTFS_FILENAME_MIN_RANDOM_PREPEND_BYTES >= | 159 | /* Constraint: ECRYPTFS_FILENAME_MIN_RANDOM_PREPEND_BYTES >= |
155 | * ECRYPTFS_MAX_IV_BYTES */ | 160 | * ECRYPTFS_MAX_IV_BYTES */ |
156 | #define ECRYPTFS_FILENAME_MIN_RANDOM_PREPEND_BYTES 16 | 161 | #define ECRYPTFS_FILENAME_MIN_RANDOM_PREPEND_BYTES 16 |