diff options
-rw-r--r-- | fs/ecryptfs/keystore.c | 16 | ||||
-rw-r--r-- | fs/ecryptfs/main.c | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index 190e2a01d8bd..778bdf9e0502 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c | |||
@@ -554,7 +554,7 @@ parse_tag_1_packet(struct ecryptfs_crypt_stat *crypt_stat, | |||
554 | goto out_free; | 554 | goto out_free; |
555 | } | 555 | } |
556 | if (unlikely(body_size < (ECRYPTFS_SIG_SIZE + 2))) { | 556 | if (unlikely(body_size < (ECRYPTFS_SIG_SIZE + 2))) { |
557 | printk(KERN_WARNING "Invalid body size ([%d])\n", body_size); | 557 | printk(KERN_WARNING "Invalid body size ([%td])\n", body_size); |
558 | rc = -EINVAL; | 558 | rc = -EINVAL; |
559 | goto out_free; | 559 | goto out_free; |
560 | } | 560 | } |
@@ -687,7 +687,7 @@ parse_tag_3_packet(struct ecryptfs_crypt_stat *crypt_stat, | |||
687 | goto out_free; | 687 | goto out_free; |
688 | } | 688 | } |
689 | if (unlikely(body_size < (ECRYPTFS_SALT_SIZE + 5))) { | 689 | if (unlikely(body_size < (ECRYPTFS_SALT_SIZE + 5))) { |
690 | printk(KERN_WARNING "Invalid body size ([%d])\n", body_size); | 690 | printk(KERN_WARNING "Invalid body size ([%td])\n", body_size); |
691 | rc = -EINVAL; | 691 | rc = -EINVAL; |
692 | goto out_free; | 692 | goto out_free; |
693 | } | 693 | } |
@@ -833,7 +833,7 @@ parse_tag_11_packet(unsigned char *data, unsigned char *contents, | |||
833 | goto out; | 833 | goto out; |
834 | } | 834 | } |
835 | if (body_size < 14) { | 835 | if (body_size < 14) { |
836 | printk(KERN_WARNING "Invalid body size ([%d])\n", body_size); | 836 | printk(KERN_WARNING "Invalid body size ([%td])\n", body_size); |
837 | rc = -EINVAL; | 837 | rc = -EINVAL; |
838 | goto out; | 838 | goto out; |
839 | } | 839 | } |
@@ -1409,7 +1409,7 @@ encrypted_session_key_set: | |||
1409 | + key_rec->enc_key_size); /* Encrypted key size */ | 1409 | + key_rec->enc_key_size); /* Encrypted key size */ |
1410 | if (max_packet_size > (*remaining_bytes)) { | 1410 | if (max_packet_size > (*remaining_bytes)) { |
1411 | printk(KERN_ERR "Packet length larger than maximum allowable; " | 1411 | printk(KERN_ERR "Packet length larger than maximum allowable; " |
1412 | "need up to [%d] bytes, but there are only [%d] " | 1412 | "need up to [%td] bytes, but there are only [%td] " |
1413 | "available\n", max_packet_size, (*remaining_bytes)); | 1413 | "available\n", max_packet_size, (*remaining_bytes)); |
1414 | rc = -EINVAL; | 1414 | rc = -EINVAL; |
1415 | goto out; | 1415 | goto out; |
@@ -1449,7 +1449,7 @@ out: | |||
1449 | * Returns zero on success; non-zero on error. | 1449 | * Returns zero on success; non-zero on error. |
1450 | */ | 1450 | */ |
1451 | static int | 1451 | static int |
1452 | write_tag_11_packet(char *dest, int *remaining_bytes, char *contents, | 1452 | write_tag_11_packet(char *dest, size_t *remaining_bytes, char *contents, |
1453 | size_t contents_length, size_t *packet_length) | 1453 | size_t contents_length, size_t *packet_length) |
1454 | { | 1454 | { |
1455 | size_t packet_size_length; | 1455 | size_t packet_size_length; |
@@ -1468,7 +1468,7 @@ write_tag_11_packet(char *dest, int *remaining_bytes, char *contents, | |||
1468 | + contents_length); /* Literal data */ | 1468 | + contents_length); /* Literal data */ |
1469 | if (max_packet_size > (*remaining_bytes)) { | 1469 | if (max_packet_size > (*remaining_bytes)) { |
1470 | printk(KERN_ERR "Packet length larger than maximum allowable; " | 1470 | printk(KERN_ERR "Packet length larger than maximum allowable; " |
1471 | "need up to [%d] bytes, but there are only [%d] " | 1471 | "need up to [%td] bytes, but there are only [%td] " |
1472 | "available\n", max_packet_size, (*remaining_bytes)); | 1472 | "available\n", max_packet_size, (*remaining_bytes)); |
1473 | rc = -EINVAL; | 1473 | rc = -EINVAL; |
1474 | goto out; | 1474 | goto out; |
@@ -1658,8 +1658,8 @@ encrypted_session_key_set: | |||
1658 | + 1 /* Hash iterations */ | 1658 | + 1 /* Hash iterations */ |
1659 | + key_rec->enc_key_size); /* Encrypted key size */ | 1659 | + key_rec->enc_key_size); /* Encrypted key size */ |
1660 | if (max_packet_size > (*remaining_bytes)) { | 1660 | if (max_packet_size > (*remaining_bytes)) { |
1661 | printk(KERN_ERR "Packet too large; need up to [%d] bytes, but " | 1661 | printk(KERN_ERR "Packet too large; need up to [%td] bytes, but " |
1662 | "there are only [%d] available\n", max_packet_size, | 1662 | "there are only [%td] available\n", max_packet_size, |
1663 | (*remaining_bytes)); | 1663 | (*remaining_bytes)); |
1664 | rc = -EINVAL; | 1664 | rc = -EINVAL; |
1665 | goto out; | 1665 | goto out; |
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 0387f0d73cd0..71a9c4c36707 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -359,7 +359,7 @@ static int ecryptfs_parse_options(struct super_block *sb, char *options) | |||
359 | NULL, mount_crypt_stat->global_default_cipher_name, | 359 | NULL, mount_crypt_stat->global_default_cipher_name, |
360 | mount_crypt_stat->global_default_cipher_key_size))) { | 360 | mount_crypt_stat->global_default_cipher_key_size))) { |
361 | printk(KERN_ERR "Error attempting to initialize cipher with " | 361 | printk(KERN_ERR "Error attempting to initialize cipher with " |
362 | "name = [%s] and key size = [%d]; rc = [%d]\n", | 362 | "name = [%s] and key size = [%td]; rc = [%d]\n", |
363 | mount_crypt_stat->global_default_cipher_name, | 363 | mount_crypt_stat->global_default_cipher_name, |
364 | mount_crypt_stat->global_default_cipher_key_size, rc); | 364 | mount_crypt_stat->global_default_cipher_key_size, rc); |
365 | rc = -EINVAL; | 365 | rc = -EINVAL; |