diff options
author | Zheng Da <zhengda1936@gmail.com> | 2009-12-06 05:26:23 +0100 |
---|---|---|
committer | Zheng Da <zhengda1936@gmail.com> | 2009-12-06 05:26:23 +0100 |
commit | 8a6d48c0542876eb3acfc0970c0ab7872db08d5f (patch) | |
tree | 496e78bc728317ea779781b92f897d16936ee231 /libdde_linux26/contrib/include/keys | |
parent | b4bffcfcdf3ab7a55d664e9aa5907f88da503f38 (diff) |
check in the original version of dde linux26.
Diffstat (limited to 'libdde_linux26/contrib/include/keys')
9 files changed, 358 insertions, 0 deletions
diff --git a/libdde_linux26/contrib/include/keys/.svn/all-wcprops b/libdde_linux26/contrib/include/keys/.svn/all-wcprops new file mode 100644 index 00000000..b8c503c4 --- /dev/null +++ b/libdde_linux26/contrib/include/keys/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 71 +/repos/tudos/!svn/ver/455/trunk/l4/pkg/dde/linux26/contrib/include/keys +END +rxrpc-type.h +K 25 +svn:wc:ra_dav:version-url +V 84 +/repos/tudos/!svn/ver/455/trunk/l4/pkg/dde/linux26/contrib/include/keys/rxrpc-type.h +END +user-type.h +K 25 +svn:wc:ra_dav:version-url +V 83 +/repos/tudos/!svn/ver/174/trunk/l4/pkg/dde/linux26/contrib/include/keys/user-type.h +END +keyring-type.h +K 25 +svn:wc:ra_dav:version-url +V 86 +/repos/tudos/!svn/ver/455/trunk/l4/pkg/dde/linux26/contrib/include/keys/keyring-type.h +END diff --git a/libdde_linux26/contrib/include/keys/.svn/entries b/libdde_linux26/contrib/include/keys/.svn/entries new file mode 100644 index 00000000..f47976b2 --- /dev/null +++ b/libdde_linux26/contrib/include/keys/.svn/entries @@ -0,0 +1,130 @@ +9 + +dir +465 +http://svn.tudos.org/repos/tudos/trunk/l4/pkg/dde/linux26/contrib/include/keys +http://svn.tudos.org/repos/tudos + + + +2009-05-20T14:32:55.606606Z +455 +l4check + + +svn:special svn:externals svn:needs-lock + + + + + + + + + + + +a704ac0b-3a55-4d43-a2a9-7be6f07c34fb + +rxrpc-type.h +file + + + + +2009-11-15T17:16:24.000000Z +1e84e211cba735be84caf82cf4144b8e +2009-05-20T14:32:55.606606Z +455 +l4check + + + + + + + + + + + + + + + + + + + + + +630 + +user-type.h +file + + + + +2009-11-15T17:16:24.000000Z +c520f00b9a1b0215d83983ed9cde06c8 +2007-09-08T19:44:13.897747Z +174 +l4check + + + + + + + + + + + + + + + + + + + + + +1721 + +keyring-type.h +file + + + + +2009-11-15T17:16:24.000000Z +a400b3cbcdd5115da5e7bafb1752663c +2009-05-20T14:32:55.606606Z +455 +l4check + + + + + + + + + + + + + + + + + + + + + +903 + diff --git a/libdde_linux26/contrib/include/keys/.svn/format b/libdde_linux26/contrib/include/keys/.svn/format new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/libdde_linux26/contrib/include/keys/.svn/format @@ -0,0 +1 @@ +9 diff --git a/libdde_linux26/contrib/include/keys/.svn/text-base/keyring-type.h.svn-base b/libdde_linux26/contrib/include/keys/.svn/text-base/keyring-type.h.svn-base new file mode 100644 index 00000000..843f872a --- /dev/null +++ b/libdde_linux26/contrib/include/keys/.svn/text-base/keyring-type.h.svn-base @@ -0,0 +1,31 @@ +/* Keyring key type + * + * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@redhat.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef _KEYS_KEYRING_TYPE_H +#define _KEYS_KEYRING_TYPE_H + +#include <linux/key.h> +#include <linux/rcupdate.h> + +/* + * the keyring payload contains a list of the keys to which the keyring is + * subscribed + */ +struct keyring_list { + struct rcu_head rcu; /* RCU deletion hook */ + unsigned short maxkeys; /* max keys this list can hold */ + unsigned short nkeys; /* number of keys currently held */ + unsigned short delkey; /* key to be unlinked by RCU */ + struct key *keys[0]; +}; + + +#endif /* _KEYS_KEYRING_TYPE_H */ diff --git a/libdde_linux26/contrib/include/keys/.svn/text-base/rxrpc-type.h.svn-base b/libdde_linux26/contrib/include/keys/.svn/text-base/rxrpc-type.h.svn-base new file mode 100644 index 00000000..76093655 --- /dev/null +++ b/libdde_linux26/contrib/include/keys/.svn/text-base/rxrpc-type.h.svn-base @@ -0,0 +1,24 @@ +/* RxRPC key type + * + * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@redhat.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef _KEYS_RXRPC_TYPE_H +#define _KEYS_RXRPC_TYPE_H + +#include <linux/key.h> + +/* + * key type for AF_RXRPC keys + */ +extern struct key_type key_type_rxrpc; + +extern struct key *rxrpc_get_null_key(const char *); + +#endif /* _KEYS_RXRPC_TYPE_H */ diff --git a/libdde_linux26/contrib/include/keys/.svn/text-base/user-type.h.svn-base b/libdde_linux26/contrib/include/keys/.svn/text-base/user-type.h.svn-base new file mode 100644 index 00000000..c37c3427 --- /dev/null +++ b/libdde_linux26/contrib/include/keys/.svn/text-base/user-type.h.svn-base @@ -0,0 +1,47 @@ +/* user-type.h: User-defined key type + * + * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@redhat.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef _KEYS_USER_TYPE_H +#define _KEYS_USER_TYPE_H + +#include <linux/key.h> +#include <linux/rcupdate.h> + +/*****************************************************************************/ +/* + * the payload for a key of type "user" + * - once filled in and attached to a key: + * - the payload struct is invariant may not be changed, only replaced + * - the payload must be read with RCU procedures or with the key semaphore + * held + * - the payload may only be replaced with the key semaphore write-locked + * - the key's data length is the size of the actual data, not including the + * payload wrapper + */ +struct user_key_payload { + struct rcu_head rcu; /* RCU destructor */ + unsigned short datalen; /* length of this data */ + char data[0]; /* actual data */ +}; + +extern struct key_type key_type_user; + +extern int user_instantiate(struct key *key, const void *data, size_t datalen); +extern int user_update(struct key *key, const void *data, size_t datalen); +extern int user_match(const struct key *key, const void *criterion); +extern void user_revoke(struct key *key); +extern void user_destroy(struct key *key); +extern void user_describe(const struct key *user, struct seq_file *m); +extern long user_read(const struct key *key, + char __user *buffer, size_t buflen); + + +#endif /* _KEYS_USER_TYPE_H */ diff --git a/libdde_linux26/contrib/include/keys/keyring-type.h b/libdde_linux26/contrib/include/keys/keyring-type.h new file mode 100644 index 00000000..843f872a --- /dev/null +++ b/libdde_linux26/contrib/include/keys/keyring-type.h @@ -0,0 +1,31 @@ +/* Keyring key type + * + * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@redhat.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef _KEYS_KEYRING_TYPE_H +#define _KEYS_KEYRING_TYPE_H + +#include <linux/key.h> +#include <linux/rcupdate.h> + +/* + * the keyring payload contains a list of the keys to which the keyring is + * subscribed + */ +struct keyring_list { + struct rcu_head rcu; /* RCU deletion hook */ + unsigned short maxkeys; /* max keys this list can hold */ + unsigned short nkeys; /* number of keys currently held */ + unsigned short delkey; /* key to be unlinked by RCU */ + struct key *keys[0]; +}; + + +#endif /* _KEYS_KEYRING_TYPE_H */ diff --git a/libdde_linux26/contrib/include/keys/rxrpc-type.h b/libdde_linux26/contrib/include/keys/rxrpc-type.h new file mode 100644 index 00000000..76093655 --- /dev/null +++ b/libdde_linux26/contrib/include/keys/rxrpc-type.h @@ -0,0 +1,24 @@ +/* RxRPC key type + * + * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@redhat.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef _KEYS_RXRPC_TYPE_H +#define _KEYS_RXRPC_TYPE_H + +#include <linux/key.h> + +/* + * key type for AF_RXRPC keys + */ +extern struct key_type key_type_rxrpc; + +extern struct key *rxrpc_get_null_key(const char *); + +#endif /* _KEYS_RXRPC_TYPE_H */ diff --git a/libdde_linux26/contrib/include/keys/user-type.h b/libdde_linux26/contrib/include/keys/user-type.h new file mode 100644 index 00000000..c37c3427 --- /dev/null +++ b/libdde_linux26/contrib/include/keys/user-type.h @@ -0,0 +1,47 @@ +/* user-type.h: User-defined key type + * + * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@redhat.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef _KEYS_USER_TYPE_H +#define _KEYS_USER_TYPE_H + +#include <linux/key.h> +#include <linux/rcupdate.h> + +/*****************************************************************************/ +/* + * the payload for a key of type "user" + * - once filled in and attached to a key: + * - the payload struct is invariant may not be changed, only replaced + * - the payload must be read with RCU procedures or with the key semaphore + * held + * - the payload may only be replaced with the key semaphore write-locked + * - the key's data length is the size of the actual data, not including the + * payload wrapper + */ +struct user_key_payload { + struct rcu_head rcu; /* RCU destructor */ + unsigned short datalen; /* length of this data */ + char data[0]; /* actual data */ +}; + +extern struct key_type key_type_user; + +extern int user_instantiate(struct key *key, const void *data, size_t datalen); +extern int user_update(struct key *key, const void *data, size_t datalen); +extern int user_match(const struct key *key, const void *criterion); +extern void user_revoke(struct key *key); +extern void user_destroy(struct key *key); +extern void user_describe(const struct key *user, struct seq_file *m); +extern long user_read(const struct key *key, + char __user *buffer, size_t buflen); + + +#endif /* _KEYS_USER_TYPE_H */ |