KEYS: testing wrong bit for KEY_FLAG_REVOKED
The test for "if (cred->request_key_auth->flags & KEY_FLAG_REVOKED) {" should actually testing that the (1 << KEY_FLAG_REVOKED) bit is set. The current code actually checks for KEY_FLAG_DEAD. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <james.l.morris@oracle.com>
This commit is contained in:
parent
df91e49477
commit
f67dabbdde
1 changed files with 2 additions and 1 deletions
|
@ -657,7 +657,8 @@ try_again:
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
down_read(&cred->request_key_auth->sem);
|
down_read(&cred->request_key_auth->sem);
|
||||||
if (cred->request_key_auth->flags & KEY_FLAG_REVOKED) {
|
if (test_bit(KEY_FLAG_REVOKED,
|
||||||
|
&cred->request_key_auth->flags)) {
|
||||||
key_ref = ERR_PTR(-EKEYREVOKED);
|
key_ref = ERR_PTR(-EKEYREVOKED);
|
||||||
key = NULL;
|
key = NULL;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue