Commit e77cc8d243f9f1e1d3f0799e23cc14e837ccc8c6

Authored by Tyler Hicks
1 parent 13a791b4e6

eCryptfs: Remove ecryptfs_unlink_sigs warnings

A feature was added to the eCryptfs umount helper to automatically
unlink the keys used for an eCryptfs mount from the kernel keyring upon
umount.  This patch keeps the unrecognized mount option warnings for
ecryptfs_unlink_sigs out of the logs.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>

Showing 3 changed files with 8 additions and 1 deletions Side-by-side Diff

fs/ecryptfs/ecryptfs_kernel.h
... ... @@ -269,6 +269,7 @@
269 269 #define ECRYPTFS_ENCRYPT_FILENAMES 0x00000800
270 270 #define ECRYPTFS_ENCFN_USE_MOUNT_FNEK 0x00001000
271 271 #define ECRYPTFS_ENCFN_USE_FEK 0x00002000
  272 +#define ECRYPTFS_UNLINK_SIGS 0x00004000
272 273 u32 flags;
273 274 unsigned int file_version;
274 275 size_t iv_bytes;
... ... @@ -208,7 +208,7 @@
208 208 ecryptfs_opt_passthrough, ecryptfs_opt_xattr_metadata,
209 209 ecryptfs_opt_encrypted_view, ecryptfs_opt_fnek_sig,
210 210 ecryptfs_opt_fn_cipher, ecryptfs_opt_fn_cipher_key_bytes,
211   - ecryptfs_opt_err };
  211 + ecryptfs_opt_unlink_sigs, ecryptfs_opt_err };
212 212  
213 213 static const match_table_t tokens = {
214 214 {ecryptfs_opt_sig, "sig=%s"},
... ... @@ -222,6 +222,7 @@
222 222 {ecryptfs_opt_fnek_sig, "ecryptfs_fnek_sig=%s"},
223 223 {ecryptfs_opt_fn_cipher, "ecryptfs_fn_cipher=%s"},
224 224 {ecryptfs_opt_fn_cipher_key_bytes, "ecryptfs_fn_key_bytes=%u"},
  225 + {ecryptfs_opt_unlink_sigs, "ecryptfs_unlink_sigs"},
225 226 {ecryptfs_opt_err, NULL}
226 227 };
227 228  
... ... @@ -401,6 +402,9 @@
401 402 mount_crypt_stat->global_default_fn_cipher_key_bytes =
402 403 fn_cipher_key_bytes;
403 404 fn_cipher_key_bytes_set = 1;
  405 + break;
  406 + case ecryptfs_opt_unlink_sigs:
  407 + mount_crypt_stat->flags |= ECRYPTFS_UNLINK_SIGS;
404 408 break;
405 409 case ecryptfs_opt_err:
406 410 default:
... ... @@ -189,6 +189,8 @@
189 189 seq_printf(m, ",ecryptfs_xattr_metadata");
190 190 if (mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_VIEW_ENABLED)
191 191 seq_printf(m, ",ecryptfs_encrypted_view");
  192 + if (mount_crypt_stat->flags & ECRYPTFS_UNLINK_SIGS)
  193 + seq_printf(m, ",ecryptfs_unlink_sigs");
192 194  
193 195 return 0;
194 196 }