diff options
Diffstat (limited to 'fs/ecryptfs/keystore.c')
-rw-r--r-- | fs/ecryptfs/keystore.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index b1f6858a5223..c1436cff6f2d 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c | |||
@@ -59,7 +59,7 @@ static int process_request_key_err(long err_code) | |||
59 | break; | 59 | break; |
60 | default: | 60 | default: |
61 | ecryptfs_printk(KERN_WARNING, "Unknown error code: " | 61 | ecryptfs_printk(KERN_WARNING, "Unknown error code: " |
62 | "[0x%.16x]\n", err_code); | 62 | "[0x%.16lx]\n", err_code); |
63 | rc = -EINVAL; | 63 | rc = -EINVAL; |
64 | } | 64 | } |
65 | return rc; | 65 | return rc; |
@@ -130,7 +130,7 @@ int ecryptfs_write_packet_length(char *dest, size_t size, | |||
130 | } else { | 130 | } else { |
131 | rc = -EINVAL; | 131 | rc = -EINVAL; |
132 | ecryptfs_printk(KERN_WARNING, | 132 | ecryptfs_printk(KERN_WARNING, |
133 | "Unsupported packet size: [%d]\n", size); | 133 | "Unsupported packet size: [%zd]\n", size); |
134 | } | 134 | } |
135 | return rc; | 135 | return rc; |
136 | } | 136 | } |
@@ -1672,7 +1672,7 @@ decrypt_passphrase_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, | |||
1672 | auth_tok->session_key.decrypted_key_size); | 1672 | auth_tok->session_key.decrypted_key_size); |
1673 | crypt_stat->flags |= ECRYPTFS_KEY_VALID; | 1673 | crypt_stat->flags |= ECRYPTFS_KEY_VALID; |
1674 | if (unlikely(ecryptfs_verbosity > 0)) { | 1674 | if (unlikely(ecryptfs_verbosity > 0)) { |
1675 | ecryptfs_printk(KERN_DEBUG, "FEK of size [%d]:\n", | 1675 | ecryptfs_printk(KERN_DEBUG, "FEK of size [%zd]:\n", |
1676 | crypt_stat->key_size); | 1676 | crypt_stat->key_size); |
1677 | ecryptfs_dump_hex(crypt_stat->key, | 1677 | ecryptfs_dump_hex(crypt_stat->key, |
1678 | crypt_stat->key_size); | 1678 | crypt_stat->key_size); |
@@ -1754,7 +1754,7 @@ int ecryptfs_parse_packet_set(struct ecryptfs_crypt_stat *crypt_stat, | |||
1754 | if (ECRYPTFS_SIG_SIZE != tag_11_contents_size) { | 1754 | if (ECRYPTFS_SIG_SIZE != tag_11_contents_size) { |
1755 | ecryptfs_printk(KERN_ERR, "Expected " | 1755 | ecryptfs_printk(KERN_ERR, "Expected " |
1756 | "signature of size [%d]; " | 1756 | "signature of size [%d]; " |
1757 | "read size [%d]\n", | 1757 | "read size [%zd]\n", |
1758 | ECRYPTFS_SIG_SIZE, | 1758 | ECRYPTFS_SIG_SIZE, |
1759 | tag_11_contents_size); | 1759 | tag_11_contents_size); |
1760 | rc = -EIO; | 1760 | rc = -EIO; |
@@ -1787,8 +1787,8 @@ int ecryptfs_parse_packet_set(struct ecryptfs_crypt_stat *crypt_stat, | |||
1787 | goto out_wipe_list; | 1787 | goto out_wipe_list; |
1788 | break; | 1788 | break; |
1789 | default: | 1789 | default: |
1790 | ecryptfs_printk(KERN_DEBUG, "No packet at offset " | 1790 | ecryptfs_printk(KERN_DEBUG, "No packet at offset [%zd] " |
1791 | "[%d] of the file header; hex value of " | 1791 | "of the file header; hex value of " |
1792 | "character is [0x%.2x]\n", i, src[i]); | 1792 | "character is [0x%.2x]\n", i, src[i]); |
1793 | next_packet_is_auth_tok_packet = 0; | 1793 | next_packet_is_auth_tok_packet = 0; |
1794 | } | 1794 | } |
@@ -1864,8 +1864,8 @@ found_matching_auth_tok: | |||
1864 | "session key for authentication token with sig " | 1864 | "session key for authentication token with sig " |
1865 | "[%.*s]; rc = [%d]. Removing auth tok " | 1865 | "[%.*s]; rc = [%d]. Removing auth tok " |
1866 | "candidate from the list and searching for " | 1866 | "candidate from the list and searching for " |
1867 | "the next match.\n", candidate_auth_tok_sig, | 1867 | "the next match.\n", ECRYPTFS_SIG_SIZE_HEX, |
1868 | ECRYPTFS_SIG_SIZE_HEX, rc); | 1868 | candidate_auth_tok_sig, rc); |
1869 | list_for_each_entry_safe(auth_tok_list_item, | 1869 | list_for_each_entry_safe(auth_tok_list_item, |
1870 | auth_tok_list_item_tmp, | 1870 | auth_tok_list_item_tmp, |
1871 | &auth_tok_list, list) { | 1871 | &auth_tok_list, list) { |
@@ -2168,7 +2168,7 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes, | |||
2168 | if (encrypted_session_key_valid) { | 2168 | if (encrypted_session_key_valid) { |
2169 | ecryptfs_printk(KERN_DEBUG, "encrypted_session_key_valid != 0; " | 2169 | ecryptfs_printk(KERN_DEBUG, "encrypted_session_key_valid != 0; " |
2170 | "using auth_tok->session_key.encrypted_key, " | 2170 | "using auth_tok->session_key.encrypted_key, " |
2171 | "where key_rec->enc_key_size = [%d]\n", | 2171 | "where key_rec->enc_key_size = [%zd]\n", |
2172 | key_rec->enc_key_size); | 2172 | key_rec->enc_key_size); |
2173 | memcpy(key_rec->enc_key, | 2173 | memcpy(key_rec->enc_key, |
2174 | auth_tok->session_key.encrypted_key, | 2174 | auth_tok->session_key.encrypted_key, |
@@ -2198,7 +2198,7 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes, | |||
2198 | if (rc < 1 || rc > 2) { | 2198 | if (rc < 1 || rc > 2) { |
2199 | ecryptfs_printk(KERN_ERR, "Error generating scatterlist " | 2199 | ecryptfs_printk(KERN_ERR, "Error generating scatterlist " |
2200 | "for crypt_stat session key; expected rc = 1; " | 2200 | "for crypt_stat session key; expected rc = 1; " |
2201 | "got rc = [%d]. key_rec->enc_key_size = [%d]\n", | 2201 | "got rc = [%d]. key_rec->enc_key_size = [%zd]\n", |
2202 | rc, key_rec->enc_key_size); | 2202 | rc, key_rec->enc_key_size); |
2203 | rc = -ENOMEM; | 2203 | rc = -ENOMEM; |
2204 | goto out; | 2204 | goto out; |
@@ -2209,7 +2209,7 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes, | |||
2209 | ecryptfs_printk(KERN_ERR, "Error generating scatterlist " | 2209 | ecryptfs_printk(KERN_ERR, "Error generating scatterlist " |
2210 | "for crypt_stat encrypted session key; " | 2210 | "for crypt_stat encrypted session key; " |
2211 | "expected rc = 1; got rc = [%d]. " | 2211 | "expected rc = 1; got rc = [%d]. " |
2212 | "key_rec->enc_key_size = [%d]\n", rc, | 2212 | "key_rec->enc_key_size = [%zd]\n", rc, |
2213 | key_rec->enc_key_size); | 2213 | key_rec->enc_key_size); |
2214 | rc = -ENOMEM; | 2214 | rc = -ENOMEM; |
2215 | goto out; | 2215 | goto out; |
@@ -2224,7 +2224,7 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes, | |||
2224 | goto out; | 2224 | goto out; |
2225 | } | 2225 | } |
2226 | rc = 0; | 2226 | rc = 0; |
2227 | ecryptfs_printk(KERN_DEBUG, "Encrypting [%d] bytes of the key\n", | 2227 | ecryptfs_printk(KERN_DEBUG, "Encrypting [%zd] bytes of the key\n", |
2228 | crypt_stat->key_size); | 2228 | crypt_stat->key_size); |
2229 | rc = crypto_blkcipher_encrypt(&desc, dst_sg, src_sg, | 2229 | rc = crypto_blkcipher_encrypt(&desc, dst_sg, src_sg, |
2230 | (*key_rec).enc_key_size); | 2230 | (*key_rec).enc_key_size); |
@@ -2235,7 +2235,7 @@ write_tag_3_packet(char *dest, size_t *remaining_bytes, | |||
2235 | } | 2235 | } |
2236 | ecryptfs_printk(KERN_DEBUG, "This should be the encrypted key:\n"); | 2236 | ecryptfs_printk(KERN_DEBUG, "This should be the encrypted key:\n"); |
2237 | if (ecryptfs_verbosity > 0) { | 2237 | if (ecryptfs_verbosity > 0) { |
2238 | ecryptfs_printk(KERN_DEBUG, "EFEK of size [%d]:\n", | 2238 | ecryptfs_printk(KERN_DEBUG, "EFEK of size [%zd]:\n", |
2239 | key_rec->enc_key_size); | 2239 | key_rec->enc_key_size); |
2240 | ecryptfs_dump_hex(key_rec->enc_key, | 2240 | ecryptfs_dump_hex(key_rec->enc_key, |
2241 | key_rec->enc_key_size); | 2241 | key_rec->enc_key_size); |