diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-10-01 11:20:33 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-01 11:20:48 +0200 |
commit | 0aa73ba1c4e1ad1d51a29e0df95ccd9f746918b6 (patch) | |
tree | f0714ddcd02812b4fbe3b5405df9e4068f5587e2 /net/rxrpc/ar-security.c | |
parent | 925936ebf35a95c290e010b784c962164e6728f3 (diff) | |
parent | 33974093c024f08caadd2fc71a83bd811ed1831d (diff) |
Merge branch 'tracing/urgent' into tracing/core
Merge reason: Pick up latest fixes and update to latest upstream.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/rxrpc/ar-security.c')
-rw-r--r-- | net/rxrpc/ar-security.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/rxrpc/ar-security.c b/net/rxrpc/ar-security.c index dc62920ee19..49b3cc31ee1 100644 --- a/net/rxrpc/ar-security.c +++ b/net/rxrpc/ar-security.c @@ -16,6 +16,7 @@ #include <linux/crypto.h> #include <net/sock.h> #include <net/af_rxrpc.h> +#include <keys/rxrpc-type.h> #include "ar-internal.h" static LIST_HEAD(rxrpc_security_methods); @@ -122,6 +123,7 @@ EXPORT_SYMBOL_GPL(rxrpc_unregister_security); */ int rxrpc_init_client_conn_security(struct rxrpc_connection *conn) { + struct rxrpc_key_token *token; struct rxrpc_security *sec; struct key *key = conn->key; int ret; @@ -135,7 +137,11 @@ int rxrpc_init_client_conn_security(struct rxrpc_connection *conn) if (ret < 0) return ret; - sec = rxrpc_security_lookup(key->type_data.x[0]); + if (!key->payload.data) + return -EKEYREJECTED; + token = key->payload.data; + + sec = rxrpc_security_lookup(token->security_index); if (!sec) return -EKEYREJECTED; conn->security = sec; |