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