RxRPC: Allow key payloads to be passed in XDR form

Allow add_key() and KEYCTL_INSTANTIATE to accept key payloads in XDR form as
described by openafs-1.4.10/src/auth/afs_token.xg.  This provides a way of
passing kaserver, Kerberos 4, Kerberos 5 and GSSAPI keys from userspace, and
allows for future expansion.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David Howells
2009-09-14 01:17:35 +00:00
committed by David S. Miller
parent 8b815477f3
commit 339412841d
5 changed files with 353 additions and 75 deletions

View File

@@ -401,22 +401,6 @@ struct rxrpc_call {
__be32 call_id; /* call ID on connection */
};
/*
* RxRPC key for Kerberos (type-2 security)
*/
struct rxkad_key {
u16 security_index; /* RxRPC header security index */
u16 ticket_len; /* length of ticket[] */
u32 expiry; /* time at which expires */
u32 kvno; /* key version number */
u8 session_key[8]; /* DES session key */
u8 ticket[0]; /* the encrypted ticket */
};
struct rxrpc_key_payload {
struct rxkad_key k;
};
/*
* locally abort an RxRPC call
*/