]> git.baikalelectronics.ru Git - kernel.git/commit
keys, trusted: fix: *do not* allow duplicate key options
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Sat, 12 Dec 2015 11:19:52 +0000 (13:19 +0200)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Sun, 20 Dec 2015 13:27:12 +0000 (15:27 +0200)
commitedbe649a8d25636101e563970f2e07202a61d9fe
treefebbe0ce8683938eeebd0321bc5476ea987c0a3d
parentc5abb6438a6727f4520b5d73ad78f1417f8b74fb
keys, trusted: fix: *do not* allow duplicate key options

The trusted keys option parsing allows specifying the same option
multiple times. The last option value specified is used.

This is problematic because:

* No gain.
* This makes complicated to specify options that are dependent on other
  options.

This patch changes the behavior in a way that option can be specified
only once.

Reported-by: James Morris James Morris <jmorris@namei.org>
Reviewed-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Acked-by: Peter Huewe <peterhuewe@gmx.de>
security/keys/trusted.c