2 * Copyright (c) 2003 SkyRope, LLC
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
8 * - Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 * - Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 * - Neither the name of Skyrope, LLC nor the names of its contributors may be
14 * used to endorse or promote products derived from this software without
15 * specific prior written permission from Skyrope, LLC.
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
20 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
21 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 #include <afs/cellconfig.h>
41 #define MAXCELLCHARS 64
42 #define MAXHOSTCHARS 64
43 #define MAXHOSTSPERCELL 8
44 #define TRANSARCAFSDAEMON "TransarcAFSDaemon"
46 void KFW_initialize(void);
47 void KFW_cleanup(void);
48 int KFW_is_available(void);
49 int KFW_AFS_destroy_tickets_for_cell(char *);
50 int KFW_AFS_renew_expiring_tokens(void);
51 int KFW_AFS_get_cred( char * username,
58 int KFW_AFS_renew_token_for_cell(char * cell);
59 int KFW_AFS_renew_tokens_for_all_cells(void);
60 BOOL KFW_AFS_wait_for_service_start(void);
61 BOOL KFW_probe_kdc(struct afsconf_cell *);
62 int KFW_AFS_get_cellconfig(char *, struct afsconf_cell *, char *);
63 void KFW_import_windows_lsa(void);
65 /* From afs/krb_prot.h */
66 /* values for kerb error codes */
68 #define KERB_ERR_NAME_EXP 1
69 #define KERB_ERR_SERVICE_EXP 2
70 #define KERB_ERR_AUTH_EXP 3
71 #define KERB_ERR_PKT_VER 4
72 #define KERB_ERR_NAME_MAST_KEY_VER 5
73 #define KERB_ERR_SERV_MAST_KEY_VER 6
74 #define KERB_ERR_BYTE_ORDER 7
75 #define KERB_ERR_PRINCIPAL_UNKNOWN 8
76 #define KERB_ERR_PRINCIPAL_NOT_UNIQUE 9
77 #define KERB_ERR_NULL_KEY 10
80 #define RD_AP_TIME 37 /* delta_t too big */
81 #define INTK_BADPW 62 /* Incorrect password */
83 #define PROBE_USERNAME "OPENAFS-KDC-PROBE"
84 #define PROBE_PASSWORD_LEN 16