mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 10:44:14 +08:00
integrity: include keyring name for unknown key request
Depending on the IMA policy rule a key may be searched for in multiple keyrings (e.g. .ima and .platform) and possibly not found. This patch improves feedback by including the keyring "description" (name) in the error message. Signed-off-by: Bruno Meneguele <bmeneg@redhat.com> [zohar@linux.ibm.com: updated commit message] Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
parent
e4d7e2df3a
commit
8c2f516c99
@ -55,8 +55,14 @@ static struct key *request_asymmetric_key(struct key *keyring, uint32_t keyid)
|
||||
}
|
||||
|
||||
if (IS_ERR(key)) {
|
||||
pr_err_ratelimited("Request for unknown key '%s' err %ld\n",
|
||||
name, PTR_ERR(key));
|
||||
if (keyring)
|
||||
pr_err_ratelimited("Request for unknown key '%s' in '%s' keyring. err %ld\n",
|
||||
name, keyring->description,
|
||||
PTR_ERR(key));
|
||||
else
|
||||
pr_err_ratelimited("Request for unknown key '%s' err %ld\n",
|
||||
name, PTR_ERR(key));
|
||||
|
||||
switch (PTR_ERR(key)) {
|
||||
/* Hide some search errors */
|
||||
case -EACCES:
|
||||
|
Loading…
Reference in New Issue
Block a user