X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Faklog%2Faklog.h;h=2984441f4a5eab53053c1aa686ecc8836828cb74;hp=9d84d2f5af63bfe2fbe13626029df62526b9536a;hb=233b7043ce22a120e52b2d1194a2603c659de735;hpb=bcdb5a184ee597244fe1c7a8c708ee6bf796d07a diff --git a/src/aklog/aklog.h b/src/aklog/aklog.h index 9d84d2f..2984441 100644 --- a/src/aklog/aklog.h +++ b/src/aklog/aklog.h @@ -13,7 +13,6 @@ static char *rcsid_aklog_h = "$Id$"; #endif /* lint || SABER */ #include -#include #include "linked_list.h" #include @@ -23,20 +22,56 @@ static char *rcsid_aklog_h = "$Id$"; #define ARGS(x) () #endif /* __STDC__ */ -typedef struct { - int (*readlink)ARGS((char *, char *, size_t)); - int (*isdir)ARGS((char *, unsigned char *)); - char *(*getwd)ARGS((char *)); - int (*get_cred)ARGS((krb5_context, char *, char *, char *, CREDENTIALS *, - krb5_creds **)); - int (*get_user_realm)ARGS((krb5_context, char *)); - void (*pstderr)ARGS((char *)); - void (*pstdout)ARGS((char *)); - void (*exitprog)ARGS((char)); -} aklog_params; - -void aklog ARGS((int, char *[], aklog_params *)); -void aklog_init_params ARGS((aklog_params *)); +void aklog ARGS((int, char *[])); + +/* + * If we have krb.h, use the definition of CREDENTIAL from there. Otherwise, + * inline it. When we inline it we're using the inline definition from the + * Heimdal sources (since Heimdal doesn't include a definition of struct + * credentials with the sources + */ + +#ifdef HAVE_KERBEROSIV_KRB_H +#include +#else /* HAVE_KERBEROSIV_KRB_H */ + +#ifndef MAX_KTXT_LEN +#define MAX_KTXT_LEN 1250 +#endif /* MAX_KTXT_LEN */ +#ifndef ANAME_SZ +#define ANAME_SZ 40 +#endif /* ANAME_SZ */ +#ifndef REALM_SZ +#define REALM_SZ 40 +#endif /* REALM_SZ */ +#ifndef SNAME_SZ +#define SNAME_SZ 40 +#endif /* SNAME_SZ */ +#ifndef INST_SZ +#define INST_SZ 40 +#endif /* INST_SZ */ + +struct ktext { + unsigned int length; + unsigned char dat[MAX_KTXT_LEN]; + u_int32_t mbz; +}; + +struct credentials { + char service[ANAME_SZ]; + char instance[INST_SZ]; + char realm[REALM_SZ]; + char session[8]; + int lifetime; + int kvno; + struct ktext ticket_st; + int32_t issue_date; + char pname[ANAME_SZ]; + char pinst[INST_SZ]; +}; + +typedef struct credentials CREDENTIALS; +#endif /* ! HAVE_KERBEROSIV_KRB_H */ #ifdef WINDOWS /*