aboutsummaryrefslogtreecommitdiffstats
path: root/security/keys/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-04-29 04:01:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:16 -0400
commit4a38e122e2cc6294779021ff4ccc784a3997059e (patch)
tree84b401b44e0550b04f831d98a91eacfd7cffb51d /security/keys/internal.h
parentdceba9944181b1fd5993417b5c8fa0e3dda38f8d (diff)
keys: allow the callout data to be passed as a blob rather than a string
Allow the callout data to be passed as a blob rather than a string for internal kernel services that call any request_key_*() interface other than request_key(). request_key() itself still takes a NUL-terminated string. The functions that change are: request_key_with_auxdata() request_key_async() request_key_async_with_auxdata() Signed-off-by: David Howells <dhowells@redhat.com> Cc: Paul Moore <paul.moore@hp.com> Cc: Chris Wright <chrisw@sous-sol.org> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: James Morris <jmorris@namei.org> Cc: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security/keys/internal.h')
-rw-r--r--security/keys/internal.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/security/keys/internal.h b/security/keys/internal.h
index 7d894ef70370..3cc04c2afe1c 100644
--- a/security/keys/internal.h
+++ b/security/keys/internal.h
@@ -109,7 +109,8 @@ extern int install_process_keyring(struct task_struct *tsk);
109 109
110extern struct key *request_key_and_link(struct key_type *type, 110extern struct key *request_key_and_link(struct key_type *type,
111 const char *description, 111 const char *description,
112 const char *callout_info, 112 const void *callout_info,
113 size_t callout_len,
113 void *aux, 114 void *aux,
114 struct key *dest_keyring, 115 struct key *dest_keyring,
115 unsigned long flags); 116 unsigned long flags);
@@ -120,13 +121,15 @@ extern struct key *request_key_and_link(struct key_type *type,
120struct request_key_auth { 121struct request_key_auth {
121 struct key *target_key; 122 struct key *target_key;
122 struct task_struct *context; 123 struct task_struct *context;
123 char *callout_info; 124 void *callout_info;
125 size_t callout_len;
124 pid_t pid; 126 pid_t pid;
125}; 127};
126 128
127extern struct key_type key_type_request_key_auth; 129extern struct key_type key_type_request_key_auth;
128extern struct key *request_key_auth_new(struct key *target, 130extern struct key *request_key_auth_new(struct key *target,
129 const char *callout_info); 131 const void *callout_info,
132 size_t callout_len);
130 133
131extern struct key *key_get_instantiation_authkey(key_serial_t target_id); 134extern struct key *key_get_instantiation_authkey(key_serial_t target_id);
132 135