/usr/include/afs/kautils.h is in libopenafs-dev 1.6.15-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | /*
* kautils.h:
* This file is automatically generated; please do not edit it.
*/
/* Including ./kautils.p.h at beginning of kautils.h file. */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
*
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
/*
* Revision 2.2 1990/09/27 13:51:37
* Declare (char *) returning function ka_timestr().
* Cleanups.
*
* Revision 2.1 90/08/07 19:11:51
* Start with clean version to sync test and dev trees.
* */
#ifndef __KAUTILS__
#define __KAUTILS__
#include <des.h>
#include <afs/auth.h>
#ifndef KAMAJORVERSION
/* just to be on the safe side, get these two first */
#include <sys/types.h>
#include <rx/xdr.h>
/* get installed .h file only if not included already from local dir */
#ifndef _RXGEN_KAUTH_
#include <afs/kauth.h>
#endif
#endif
#include <ubik.h>
#include <afs/cellconfig.h>
#include <afs/afsutil.h>
#define KA_TIMESTR_LEN 30
#define Date afs_uint32
/*
* Public function prototypes
*/
extern afs_int32 ka_GetAuthToken(char *name, char *instance, char *cell,
struct ktc_encryptionKey *key,
afs_int32 lifetime, afs_int32 * pwexpires);
extern afs_int32 ka_GetServerToken(char *name, char *instance, char *cell,
Date lifetime, struct ktc_token *token,
int newer, int dosetpag);
extern afs_int32 ka_GetAdminToken(char *name, char *instance, char *cell,
struct ktc_encryptionKey *key,
afs_int32 lifetime, struct ktc_token *token,
int newer);
extern afs_int32 ka_VerifyUserToken(char *name, char *instance, char *cell,
struct ktc_encryptionKey *key);
extern void ka_ExplicitCell(char *cell, afs_uint32 serverList[]
);
extern afs_int32 ka_GetServers(char *cell, struct afsconf_cell *cellinfo);
extern afs_int32 ka_GetSecurity(int service, struct ktc_token *token,
struct rx_securityClass **scP, int *siP);
extern afs_int32 ka_SingleServerConn(char *cell, char *server, int service,
struct ktc_token *token,
struct ubik_client **conn);
extern afs_int32 ka_AuthSpecificServersConn(int service,
struct ktc_token *token,
struct afsconf_cell *cellinfo,
struct ubik_client **conn);
extern afs_int32 ka_AuthServerConn(char *cell, int service,
struct ktc_token *token,
struct ubik_client **conn);
extern afs_int32 ka_Authenticate(char *name, char *instance, char *cell,
struct ubik_client *conn, int service,
struct ktc_encryptionKey *key, Date start,
Date end, struct ktc_token *token,
afs_int32 * pwexpires);
extern afs_int32 ka_GetToken(char *name, char *instance, char *cell,
char *cname, char *cinst,
struct ubik_client *conn, Date start, Date end,
struct ktc_token *auth_token, char *auth_domain,
struct ktc_token *token);
extern afs_int32 ka_ChangePassword(char *name, char *instance,
struct ubik_client *conn,
struct ktc_encryptionKey *oldkey,
struct ktc_encryptionKey *newkey);
extern void ka_StringToKey(char *str, char *cell,
struct ktc_encryptionKey *key);
extern afs_int32 ka_ReadPassword(char *prompt, int verify, char *cell,
struct ktc_encryptionKey *key);
extern afs_int32 ka_ParseLoginName(char *login, char name[MAXKTCNAMELEN],
char inst[MAXKTCNAMELEN],
char cell[MAXKTCREALMLEN]
);
#ifdef _MFC_VER
extern "C" {
#endif /* _MFC_VER */
extern afs_int32 ka_Init(int flags);
#ifdef _MFC_VER
}
#endif /* _MFC_VER */
extern int ka_CellConfig(const char *dir);
extern char *ka_LocalCell(void
);
extern int ka_ExpandCell(char *cell, char *fullCell, int *alocal);
extern int ka_CellToRealm(char *cell, char *realm, int *local);
extern void ka_PrintUserID(char *prefix, char *name, char *instance,
char *postfix);
extern void ka_PrintBytes(char bs[], int bl);
extern int ka_ConvertBytes(char *ascii, int alen, char bs[], int bl);
extern int ka_ReadBytes(char *ascii, char *binary, int blen);
extern int umin(afs_uint32 a, afs_uint32 b);
extern afs_int32 ka_KeyCheckSum(char *key, afs_uint32 * cksumP);
extern int ka_KeyIsZero(char *akey, int alen);
extern void ka_timestr(afs_int32 time, char *tstr, afs_int32 tlen);
extern void ka_debugKeyCache(struct ka_debugInfo *info);
extern void save_principal(char *p, char *n, char *i, char *c);
extern afs_int32 ka_GetAFSTicket(char *name, char *instance, char *realm,
Date lifetime, afs_int32 flags);
extern afs_int32 ka_UserAuthenticateGeneral(afs_int32 flags, char *name,
char *instance, char *realm,
char *password, Date lifetime,
afs_int32 * password_expires,
afs_int32 spare2, char **reasonP);
extern afs_int32 ka_UserAuthenticateGeneral2(afs_int32 flags, char *name,
char *instance, char *realm,
char *password, char *smbname,
Date lifetime,
afs_int32 * password_expires,
afs_int32 spare2,
char **reasonP);
extern afs_int32 ka_UserAuthenticate(char *name, char *instance, char *realm,
char *password, int doSetPAG,
char **reasonP);
extern afs_int32 ka_UserReadPassword(char *prompt, char *password, int plen,
char **reasonP);
extern afs_int32 ka_VerifyUserPassword(afs_int32 version, char *name,
char *instance, char *realm,
char *password, int spare,
char **reasonP);
#define KA_USERAUTH_VERSION 1
#define KA_USERAUTH_VERSION_MASK 0x00ffff
#define KA_USERAUTH_DOSETPAG 0x010000
#define KA_USERAUTH_DOSETPAG2 0x020000
#define KA_USERAUTH_ONLY_VERIFY 0x040000
#define KA_USERAUTH_AUTHENT_LOGON 0x100000
#define ka_UserAuthenticate(n,i,r,p,d,rP) \
ka_UserAuthenticateGeneral \
(KA_USERAUTH_VERSION + ((d) ? KA_USERAUTH_DOSETPAG : 0), \
n,i,r,p, /*lifetime*/0, /*spare1,2*/0,0, rP)
#define ka_UserAuthenticateLife(f,n,i,r,p,l,rP) \
ka_UserAuthenticateGeneral \
(KA_USERAUTH_VERSION + (f), n,i,r,p,l, /*spare1,2*/0,0, rP)
#define KA_REUSEPW 1
#define KA_NOREUSEPW 2
#define KA_ISLOCKED 4
#define KA_AUTHENTICATION_SERVICE 731
#define KA_TICKET_GRANTING_SERVICE 732
#define KA_MAINTENANCE_SERVICE 733
#define RX_SCINDEX_NULL 0 /* No security */
#define RX_SCINDEX_VAB 1 /* vice tokens, with bcrypt */
#define RX_SCINDEX_KAD 2 /* Kerberos/DES */
#define KA_TGS_NAME "krbtgt"
/* realm is TGS instance */
#define KA_ADMIN_NAME "AuthServer"
#define KA_ADMIN_INST "Admin"
#define KA_LABELSIZE 4
#define KA_GETTGT_REQ_LABEL "gTGS"
#define KA_GETTGT_ANS_LABEL "tgsT"
#define KA_GETADM_REQ_LABEL "gADM"
#define KA_GETADM_ANS_LABEL "admT"
#define KA_CPW_REQ_LABEL "CPWl"
#define KA_CPW_ANS_LABEL "Pass"
#define KA_GETTICKET_ANS_LABEL "gtkt"
struct ka_gettgtRequest { /* format of request */
Date time; /* time of request */
char label[KA_LABELSIZE]; /* label to verify correct decrypt */
};
/* old interface: see ka_ticketAnswer instead */
struct ka_gettgtAnswer { /* format of response */
Date time; /* the time of the request plus one */
struct ktc_encryptionKey
sessionkey; /* the session key in the ticket */
afs_int32 kvno; /* version # of tkt encrypting key */
afs_int32 ticket_len; /* the ticket's length */
char ticket[MAXKTCTICKETLEN]; /* the ticket itself (no padding) */
char label[KA_LABELSIZE]; /* label to verify correct decrypt */
};
struct ka_ticketAnswer { /* format of response */
afs_int32 cksum; /* function to be defined */
Date challenge; /* the time of the request plus one */
struct ktc_encryptionKey
sessionKey; /* the session key in the ticket */
Date startTime;
Date endTime;
afs_int32 kvno; /* version of ticket encrypting key */
afs_int32 ticketLen; /* the ticket's length */
char name[MAXKTCNAMELEN];
char instance[MAXKTCNAMELEN];
char cell[MAXKTCNAMELEN];
char sname[MAXKTCNAMELEN];
char sinstance[MAXKTCNAMELEN];
char ticket[MAXKTCTICKETLEN]; /* the ticket (no extra chars) */
char label[KA_LABELSIZE]; /* for detecting decryption errors */
};
struct ka_cpwRequest { /* format of request */
Date time; /* time of request */
struct ktc_encryptionKey
newpw; /* new key */
afs_int32 kvno; /* version number of key */
afs_int32 spare; /* must be zero */
char label[KA_LABELSIZE]; /* label to verify correct decrypt */
};
struct ka_cpwAnswer { /* format of response */
Date time; /* the time of the request plus one */
char label[KA_LABELSIZE]; /* label to verify correct decrypt */
};
struct ka_getTicketTimes {
Date start;
Date end;
};
/* old interface: see ka_ticketAnswer instead */
struct ka_getTicketAnswer {
struct ktc_encryptionKey sessionKey;
Date startTime;
Date endTime;
afs_int32 kvno;
afs_int32 ticketLen;
char name[MAXKTCNAMELEN];
char instance[MAXKTCNAMELEN];
char cell[MAXKTCNAMELEN];
char sname[MAXKTCNAMELEN];
char sinstance[MAXKTCNAMELEN];
char ticket[MAXKTCTICKETLEN];
};
#ifndef ERROR_TABLE_BASE_KA
#define ka_ErrorString afs_error_message
#undef KAMINERROR
#define KAMINERROR ERROR_TABLE_BASE_KA
#define KAMAXERROR (KAMINERROR+255)
#endif
#endif
/* End of prolog file ./kautils.p.h. */
#define KADATABASEINCONSISTENT (180480L)
#define KAEXIST (180481L)
#define KAIO (180482L)
#define KACREATEFAIL (180483L)
#define KANOENT (180484L)
#define KAEMPTY (180485L)
#define KABADNAME (180486L)
#define KABADINDEX (180487L)
#define KANOAUTH (180488L)
#define KAANSWERTOOLONG (180489L)
#define KABADREQUEST (180490L)
#define KAOLDINTERFACE (180491L)
#define KABADARGUMENT (180492L)
#define KABADCMD (180493L)
#define KANOKEYS (180494L)
#define KAREADPW (180495L)
#define KABADKEY (180496L)
#define KAUBIKINIT (180497L)
#define KAUBIKCALL (180498L)
#define KABADPROTOCOL (180499L)
#define KANOCELLS (180500L)
#define KANOCELL (180501L)
#define KATOOMANYUBIKS (180502L)
#define KATOOMANYKEYS (180503L)
#define KABADTICKET (180504L)
#define KAUNKNOWNKEY (180505L)
#define KAKEYCACHEINVALID (180506L)
#define KABADSERVER (180507L)
#define KABADUSER (180508L)
#define KABADCPW (180509L)
#define KABADCREATE (180510L)
#define KANOTICKET (180511L)
#define KAASSOCUSER (180512L)
#define KANOTSPECIAL (180513L)
#define KACLOCKSKEW (180514L)
#define KANORECURSE (180515L)
#define KARXFAIL (180516L)
#define KANULLPASSWORD (180517L)
#define KAINTERNALERROR (180518L)
#define KAPWEXPIRED (180519L)
#define KAREUSED (180520L)
#define KATOOSOON (180521L)
#define KALOCKED (180522L)
extern void initialize_KA_error_table(void);
#define ERROR_TABLE_BASE_KA (180480L)
/* for compatibility with older versions... */
#define init_KA_err_tbl initialize_KA_error_table
#define KA_err_base ERROR_TABLE_BASE_KA
/* for compatibility with other users... */
#define ERROR_TABLE_BASE_ka (180480L)
#define init_ka_err_tbl initialize_KA_error_table
#define initialize_ka_error_table initialize_KA_error_table
#define ka_err_base ERROR_TABLE_BASE_ka
|