macos-move-afssettings-20060801
[openafs.git] / src / dauth / adkint.xg
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /*
11  * adkint.xg -- interface definition for AFS/DFS DCE KDC ticket service.
12  */
13
14 package ADK_
15 statindex 5
16
17 /*
18  * For our simplified Kerberos V5 ticket granting service, we add
19  * another service to the file service port (rather than having to risk
20  * using yet another public port).
21  */
22 const ADK_PORT = 7000;
23 const ADK_SERVICE = 2;
24
25 typedef opaque adk_code<2000>;  /* Encoded byte strings */
26 typedef string adk_string<2000>;/* Normal, null terminated strings */
27
28 /*
29  * This structure is returned on a DCE error, since the local system
30  * has no hope of interpreting the error code otherwise.
31  */
32 struct adk_error {
33     afs_int32 code;             /* Both the call error code AND this must be checked */
34     adk_string data;    /* Interpreted error code string */
35 };
36
37 struct adk_reply {
38     afs_int32 unix_id;  /* DCE Id of user (info only; not secured) */
39     adk_string salt;    /* Salt to use for string_to_key on password */
40     afs_int32 tktype;   /* Ticket type, from rxkad.p.h */
41     adk_code ticket;    /* The Kerberos V5 PAC-less ticket */
42     adk_code private;   /* Secured reply information from DCE KTC. Decrypt
43                            this with key derived from user password and salt */
44 };
45
46 /*
47  * Can only pass pointers to structures, if they need to be deallocated.
48  * This is an rxgen restriction.
49  */
50 typedef struct adk_reply *adk_reply_ptr;
51 typedef struct adk_error *adk_error_ptr;
52
53 GetTicket
54     (IN adk_string name,
55      afs_int32 nonce,
56      afs_int32 lifetime,
57      OUT adk_error_ptr *error_p,        /* Not if there is a reply */
58      OUT adk_reply_ptr *reply_p) = 1;   /* Only if no error */