2 * Copyright (c) 2006 Secure Endpoints Inc.
4 * Permission is hereby granted, free of charge, to any person
5 * obtaining a copy of this software and associated documentation
6 * files (the "Software"), to deal in the Software without
7 * restriction, including without limitation the rights to use, copy,
8 * modify, merge, publish, distribute, sublicense, and/or sell copies
9 * of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be
13 * included in all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33 This message is typically sent when the AFS plug-in can't determine
34 the authentication method that was used to obtain a specific token.
36 When the AFS plug-in starts, it attempts to list the AFS tokens
37 that belong to the user. During this process, the plug-in has to
38 determine the authentication method and identity corresponding to
39 each token for the purpose of handling token renewals and
40 acquisitions. If the plug-in is unable to do so, it will query any
41 registered extensions using this message. If you handle this
42 message, and are able to determine the authentication method used
43 to obtain the token specified in prt->token, then you should set
44 prt->ident and prt->method members to the identity and method for
45 the token and return KHM_ERROR_SUCCESS.
48 handle_AFS_MSG_RESOLVE_TOKEN(afs_msg_resolve_token * prt)
50 /* TODO: Implement this */
51 return KHM_ERROR_NOT_IMPLEMENTED;
54 /* Handle a klog message
56 This message is sent when the AFS plug-in is attempting to obtain a
57 token using this authentication method, or if it is attempting to
58 obtain a token using the 'AUTO' method and none of the stock
59 authentication methods were successful.
61 If you handle this message and successfully obtain a token, you
62 should return KHM_ERROR_SUCCESS. Any other return value will cause
63 the AFS plug-in to either report a failure or continue down the
64 list of authentication method extensions.
68 handle_AFS_MSG_KLOG(afs_msg_klog * pklog)
71 /* TODO: Implement this */
73 return KHM_ERROR_NOT_IMPLEMENTED;
76 /* Handle AFS_MSG messages
78 These are the messages that the AFS plug-in uses to communicate
79 with its extensions. This function just dispatches the messages to
80 the appropriate handler defined above.
83 handle_AFS_MSG(khm_int32 msg_type,
84 khm_int32 msg_subtype,
88 switch (msg_subtype) {
89 case AFS_MSG_RESOLVE_TOKEN:
90 return handle_AFS_MSG_RESOLVE_TOKEN((afs_msg_resolve_token *) vparam);
93 return handle_AFS_MSG_KLOG((afs_msg_klog *) vparam);
96 return KHM_ERROR_NOT_IMPLEMENTED;