Krb5-1.9/0000775000076400007640000000000011320243424010601 5ustar jeffjeffKrb5-1.9/MANIFEST0000644000076400007640000000022410022653511011726 0ustar jeffjeffCOPYRIGHT Changes Krb5.pm Krb5.xs krb5_constants.c MANIFEST Makefile.PL README sample_client sample_server simple_client simple_server typemap TODO Krb5-1.9/Makefile.PL0000644000076400007640000000201010767232746012565 0ustar jeffjeffuse ExtUtils::MakeMaker; ##### CHANGE THESE ACCORDING TO YOUR CONFIGURATION ##### # location of Kerberos 5 libraries my $KRB5_LIBDIR = '/usr/lib'; # any extra libraries? # add -lresolv here if you get errors like the following (usually on linux): # undefined symbol: __res_search my $KRB5_EXTRALIBS = '-lresolv'; # location of Kerberos 5 includes my $KRB5_INCDIR = '/usr/include'; # any extra include flags? my $KRB5_EXTRAINCS = ''; ##### DO NOT CHANGE ANYTHING BELOW HERE ##### # check for libk5crypto -- only in krb5-1.1 and above print "Checking for libk5crypto..."; my $cryptolib; if ( -r "${KRB5_LIBDIR}/libk5crypto.a" || -r "${KRB5_LIBDIR}/libk5crypto.so" ) { print "yes\n"; $cryptolib = '-lk5crypto'; } else { print "no. I'll use libcrypto instead.\n"; $cryptolib = '-lcrypto'; } WriteMakefile( 'NAME' => 'Authen::Krb5', 'VERSION_FROM' => 'Krb5.pm', 'LIBS' => ["-L${KRB5_LIBDIR} -lkrb5 ${cryptolib} -lcom_err $KRB5_EXTRALIBS"], 'DEFINE' => '', 'INC' => "-I${KRB5_INCDIR} $KRB5_EXTRAINCS" ); Krb5-1.9/Krb5.pm0000644000076400007640000003716611320243262011755 0ustar jeffjeffpackage Authen::Krb5; use strict; use Carp; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD); require 5.004; require Exporter; require DynaLoader; require AutoLoader; @ISA = qw(Exporter DynaLoader); @EXPORT = qw( ADDRTYPE_ADDRPORT ADDRTYPE_CHAOS ADDRTYPE_DDP ADDRTYPE_INET ADDRTYPE_IPPORT ADDRTYPE_ISO ADDRTYPE_XNS AP_OPTS_MUTUAL_REQUIRED AP_OPTS_RESERVED AP_OPTS_USE_SESSION_KEY AP_OPTS_USE_SUBKEY AP_OPTS_WIRE_MASK KDC_OPT_ALLOW_POSTDATE KDC_OPT_ENC_TKT_IN_SKEY KDC_OPT_FORWARDABLE KDC_OPT_FORWARDED KDC_OPT_POSTDATED KDC_OPT_PROXIABLE KDC_OPT_PROXY KDC_OPT_RENEW KDC_OPT_RENEWABLE KDC_OPT_RENEWABLE_OK KDC_OPT_VALIDATE KRB5_AUTH_CONTEXT_DO_SEQUENCE KRB5_AUTH_CONTEXT_DO_TIME KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR KRB5_AUTH_CONTEXT_RET_SEQUENCE KRB5_AUTH_CONTEXT_RET_TIME KRB5_NT_PRINCIPAL KRB5_NT_SRV_HST KRB5_NT_SRV_INST KRB5_NT_SRV_XHST KRB5_NT_UID KRB5_NT_UNKNOWN KRB5_TGS_NAME ); $VERSION = '1.9'; sub KRB5_TGS_NAME() { return "krbtgt"; } bootstrap Authen::Krb5 $VERSION; # Preloaded methods go here. sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() # XS function. If a constant is not found then control is passed # to the AUTOLOAD in AutoLoader. my $constname; ($constname = $AUTOLOAD) =~ s/.*:://; my $val = constant($constname, @_ ? $_[0] : 0); if ($! != 0) { if ($! =~ /Invalid/) { $AutoLoader::AUTOLOAD = $AUTOLOAD; goto &AutoLoader::AUTOLOAD; } else { croak "Your vendor has not defined Krb5 macro $constname"; } } eval "sub $AUTOLOAD { $val }"; goto &$AUTOLOAD; } # Autoload methods go after =cut, and are processed by the autosplit program. 1; __END__ =head1 NAME Authen::Krb5 - Perl extension for Kerberos 5 =head1 SYNOPSIS use Authen::Krb5; Authen::Krb5::init_context(); =head1 DESCRIPTION Authen::Krb5 is an object oriented interface to the Kerberos 5 API. Both the implementation and documentation are nowhere near complete, and may require previous experience with Kerberos 5 programming. Most of the functions here are documented in detail in the Kerberos 5 API documentation. =head2 FUNCTIONS =over 4 =item error(n) Returns the error code from the most recent Authen::Krb5 call. If provided with an error code 'n', this function will return a textual description of the error. =item init_context() Initializes a context for the application. Returns a Authen::Krb5::Context object, or undef if there was an error. =item init_ets() (DEPRECATED) Initializes the Kerberos error tables. Should be called along with init_context at the beginning of a script. =item get_default_realm() Returns the default realm of your host. =item get_host_realm(host) Returns the realm of the specified host. =item get_krbhst(realm) Returns a list of the Kerberos servers from the specified realm. =item build_principal_ext(p) Not like the actual krb5_build_principal_ext. This is legacy code from Malcolm's code, which I'll probably change in future releases. In any case, it creates a 'server' principal for use in getting a TGT. Pass it the principal for which you would like a TGT. =item parse_name(name) Converts a string representation of a principal to a principal object. You can use this to create a principal from your username. =item sname_to_principal(hostname,sname,type) Generates a server principal from the given hostname, service, and type. Type can be one of the following: NT_UNKNOWN, NT_PRINCIPAL, NT_SRV_INST, NT_SRV_HST, NT_SRV_XHST, NT_UID. See the Kerberos documentation for details. =item cc_resolve(name) Returns a credentials cache identifier which corresponds to the given name. 'name' must be in the form TYPE:RESIDUAL. See the Kerberos documentation for more information. =item cc_default_name() Returns the name of the default credentials cache, which may be equivalent to KRB5CCACHE. =item cc_default() Returns a Authen::Krb5::Ccache object representing the default credentials cache. =item kt_resolve(name) Returns a Authen::Krb5::Keytab object representing the specified keytab name. =item kt_default_name() Returns a sting containing the default keytab name. =item kt_default() Returns an Authen::Krb5::Keytab object representing the default keytab. =item kt_read_service_key(name, principal[, kvno, enctype]) Searches the keytab specified by I (the default keytab if I is undef) for a key matching I (and optionally I and I) and returns the key in the form of an Authen::Krb5::Keyblock object. =item get_init_creds_password(client, password[, service]) Attempt to get an initial ticket for the client. 'client' is a principal object for which you want an initial ticket. 'password' is the password for the client. 'service', if given, is the string representation (not a principal object) for the ticket to acquire. If not given, it defaults to krbtgt/REALM@REALM for the local realm. Returns an Authen::Krb5::Creds object or undef on failure. =item get_init_creds_keytab(client, keytab[, service]) Attempt to get an inintial ticket for the client using a keytab. 'client' is a principal object for which you want an initial ticket. 'keytab' is a keytab object created with kt_resolve. 'service', if given, is the string representation (not a principal object) for the ticket to acquire. If not given, it defaults to krbtgt/REALM@REALM for the local realm. Returns an Authen::Krb5::Creds object or undef on failure. =item get_in_tkt_with_password(client,server,password,cc) Attempt to get an initial ticket for the client. 'client' is a principal object for which you want an initial ticket. 'server' is a principal object for the service (usually krbtgt/REALM@REALM). 'password' is the password for the client, and 'cc' is a Authen::Krb5::Ccache object representing the current credentials cache. Returns a Kerberos error code. Although this interface is deprecated in the Kerberos C libraries, it's supported in the Perl module. In this module, it's implemented in terms of krb5_get_init_creds_password, krb5_cc_initialize, and krb5_cc_store_cred. =item get_in_tkt_with_keytab(client,server,keytab,cc) Obtain an initial ticket for the client using a keytab. 'client' is a principal object for which you want an initial ticket. 'server' is a principal object for the service (usually krbtgt/REALM@REALM). 'keytab' is a keytab object createed with kt_resolve. 'cc' is a Authen::Krb5::Ccache object representing the current credentials cache. Returns a Kerberos error code. Although this interface is deprecated in the Kerberos C libraries, it's supported in the Perl module. In this module, it's implemented in terms of krb5_get_init_creds_keytab, krb5_cc_initialize, and krb5_cc_store_cred. =item mk_req(auth_context,ap_req_options,service,hostname,in,cc) Obtains a ticket for a specified service and returns a KRB_AP_REQ message suitable for passing to rd_req. 'auth_context' is the Authen::Krb5::AuthContext object you want to use for this connection, 'ap_req_options' is an OR'ed representation of the possible options (see Kerberos docs), 'service' is the name of the service for which you want a ticket (like 'host'), hostname is the hostname of the server, 'in' can be any user-specified data that can be verified at the server end, and 'cc' is your credentials cache object. =item rd_req(auth_context,in,server,keytab) Parses a KRB_AP_REQ message and returns its contents in a Authen::Krb5::Ticket object. 'auth_context' is the connection's Authen::Krb5::AuthContext object, 'in' is the KRB_AP_REQ message (usually from mk_req), and server is the expected server's name for the ticket. 'keytab' is a Authen::Krb5::Keytab object for the keytab you want to use. Specify 'undef' or leave off to use the default keytab. =item mk_priv(auth_context,in) Encrypts 'in' using parameters specified in auth_context, and returns the encrypted data. Requires use of a replay cache. =item rd_priv(auth_context,in) Decrypts 'in' using parameters specified in auth_context, and returns the decrypted data. =item sendauth(auth_context,fh,version,client,server,options,in,in_creds,cc) Obtains and sends an authenticated ticket from a client program to a server program using the filehandle 'fh'. 'version' is an application-defined version string that recvauth compares to its own version string. 'client' is the client principal, e.g. username@REALM. 'server' is the service principal to which you are authenticating, e.g. service.hostname@REALM. The only useful option right now is AP_OPTS_MUTUAL_REQUIRED, which forces sendauth to perform mutual authentication with the server. 'in' is a string that will be received by recvauth and verified by the server--it's up to the application. 'in_creds' is not yet supported, so just use 'undef' here. 'cc' should be set to the current credentials cache. sendauth returns true on success and undefined on failure. =item recvauth(auth_context,fh,version,server,keytab) Receives authentication data from a client using the sendauth function through the filehandle 'fh'. 'version' is as described in the sendauth section. 'server' is the server principal to which the client will be authenticating. 'keytab' is a Authen::Krb5::Keytab object specifying the keytab to use for this service. recvauth returns a Authen::Krb5::Ticket object on success or undefined on failure. =item genaddrs(auth_context,fh,flags) Uses the open socket filehandle 'fh' to generate local and remote addresses for auth_context. Flags should be one of the following, depending on the type of address you want to generate (flags can be OR'ed): KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR =item gen_portaddr(addr,port) Generates a local port address that can be used to name a replay cache. 'addr' is a Authen::Krb5::Address object, and port is a port number in network byte order. For generateing a replay cache name, you should supply the local address of the client and the socket's local port number. Returns a Authen::Krb5::Address object containing the address. =item gen_replay_name(addr,string) Generate a unique replay cache name. 'addr' is a Authen::Krb5::Address object created by gen_portaddr. 'string' is used as a unique identifier for the replay cache. Returns the replay cache name. =item get_server_rcache(name) Returns a Authen::Krb5::Rcache object using the replay cache name 'name.' =back =head2 CLASSES & METHODS =over 4 =item Authen::Krb5::Principal Kerberos 5 princpal object. =over 4 =item o realm Returns the realm of the principal. =item o type Returns the type of the principal. =item o data Returns a list containing the components of the principal (everything before the realm). =back =item Authen::Krb5::Ccache Kerberos 5 credentials cache object. =over 4 =item o initialize(p) Creates/refreshes a credentials cache for the primary principal 'p'. If the cache already exists, its contents are destroyed. =item o store_cred(creds) Stores the given credentials, which should be an Authen::Krb5::Creds object as returned from get_init_creds_password() or get_init_creds_keytab(), in the cache. =item o get_name Returns the name of the credentials cache. =item o get_principal Returns the primary principal of the credentials cache. =item o destroy Destroys the credentials cache and releases all resources it used. =item o start_seq_get() Returns a cursor that can be passed to I to read in turn every credential in the cache. =item o next_cred(cursor) Returns the next credential in the cache as an Authen::Krb5::Creds object. =item o end_seq_get(cursor) Perform cleanup opreations after I and invalidates I. =back =item Authen::Krb5::KeyBlock Kerberos 5 keyblock object. =over 4 =item o enctype() Returns the encryption type ID. =item o enctype_string() Returns a text description of the encryption type. =item o length() Returns the length of the session key. =item o contents() Returns the actual contents of the keyblock (the session key). =back =item Authen::Krb5::AuthContext Kerberos 5 auth_context object. =over 4 =item o new Allocates memory for a new Authen::Krb5::AuthContext object and returns it. =item o setaddrs(localaddr,remoteaddr) Sets the local and remote addresses for the AuthContext object. 'localaddr' and 'remoteaddr' are Authen::Krb5::Address objects, usually of type ADDRTYPE_INET. =item o getaddrs() Returns a list containing the local and the remote address of the AuthContext object. =item o setrcache(rc) Sets the replay cache for auth_context. 'rc' is a Authen::Krb5::Rcache object generated by get_server_rcache. =item o getkey() Retrieves the session key as an Authen::Krb5::KeyBlock object. =back =item Authen::Krb5::Ticket Kerberos 5 ticket object. =over 4 =item o server Returns the server stored in the ticket. =item o enc_part2 Returns a Authen::Krb5::EncTktPart object representation of the ticket data. See below. =back =item Authen::Krb5::EncTktPart Object representation of the krb5_enc_tkt_part structure. =over 4 =item o client The client principal contained in the ticket. =back =item Authen::Krb5::Keyblock Object representation of the krb5_keyblock structure. =over 4 =item o enctype The integral enctype of the key. =item o length Length of the key. =item o contents Contents of the key itself, as a string. =back =item Authen::Krb5::Keytab =over 4 =item o add_entry(entry) Adds I to the keytab. =item o remove_entry(entry) Removes I from the keytab. =item o get_name() Returns the name of the keytab. =item o get_entry(principal[, kvno, enctype]) Returns an Authen::Krb5::KeytabEntry object representing an entry in the keytab matching I and optionally I and I. =item o start_seq_get() Returns a cursor that can be passed to I to read in turn every key in the keytab. =item o next_entry(cursor) Returns the next entry in the keytab as an Authen::Krb5::KeytabEntry object. =item o end_seq_get(cursor) Perform cleanup opreations after I and invalidates I. =back =item Authen::Krb5::KeytabEntry =over 4 =item o new(principal, kvno, keyblock) Create a new Authen::Krb5::KeytabEntry object from an Authen::Krb5::Principal object, a key version number, and an Authen::Krb5::Keyblock object. =item o principal An Authen::Krb5::Principal object representing the principal contained in the entry. =item o timestamp The timestamp of the entry. =item o kvno The key version number of the key contained in the entry. =item o key An Authen::Krb5::Keyblock object representing a copy of the keyblock contained in the entry. =back =item Authen::Krb5::Creds Object representing a credential. =over 4 =item o starttime() Returns the starttime time property of the credential. =item o authtime() Returns the authtime time property of the credential. =item o endtime() Returns the endtime time property of the credential. =item o renew_till() Returns the renew_till time property of the credential. =item o server() Returns the name of the service principal the credential is for. =item o client() Returns the client principal name (will usually be identical for all credentials in a credential cache). =item o ticket() Returns the Authen::Krb5::Ticket for this credential. =item o keyblock() Returns the keyblock of the credential. =back =head1 AUTHOR Jeff Horwitz (jeff@smashing.org) =head1 ACKNOWLEDGEMENTS Based on the original work by Doug MacEachern and Malcolm Beattie. Code contributions from Scott Hutton (shutton@indiana.edu). =head1 SEE ALSO perl(1), kerberos(1). =cut Krb5-1.9/simple_client0000755000076400007640000000271410443042312013356 0ustar jeffjeff#!/usr/local/bin/perl # simple_client # uses mk_req & mk_priv to send an authenticated and encrypted message use blib; # remove if not in module build directory use IO::Socket; use Authen::Krb5 (ADDRTYPE_INET,ADDRTYPE_IPPORT); # replace with your own stuff $SERVICE = "sample"; $SERVER = "server.domain.edu"; Authen::Krb5::init_context(); $ac = new Authen::Krb5::AuthContext; $s = new IO::Socket::INET( PeerAddr => $SERVER, PeerPort => 12345, Proto => 'tcp' ); defined $s or die $!; $cc = Authen::Krb5::cc_default(); $d = Authen::Krb5::mk_req($ac,0,$SERVICE,$SERVER,'testing',$cc); unless ($d) { print "mk_req error: ",Authen::Krb5::error(),"\n"; exit(1); } # set local and remote addresses, using network byte order $addr = new Authen::Krb5::Address(ADDRTYPE_INET,pack("N",$s->sockaddr())); $ports = new Authen::Krb5::Address(ADDRTYPE_IPPORT,pack("n",$s->sockport())); $ac->setaddrs($addr,undef); $ac->setports($ports,undef); # create the replay cache ($l,$r) = $ac->getaddrs(); $lap = Authen::Krb5::gen_portaddr($l,$s->sockport()); $rcn = Authen::Krb5::gen_replay_name($lap,"foobar"); $rc = Authen::Krb5::get_server_rcache($rcn); $ac->setrcache($rc); #encrypt the message $enc = Authen::Krb5::mk_priv($ac,"There's more than one way to do it."); unless ($enc) { print "mk_priv error: ",Authen::Krb5::error(),"\n"; exit(1); } print $s $d."__END\n".$enc."__END\n"; print "Sent authentication info and encrypted message.\n"; close($s); Authen::Krb5::free_context(); Krb5-1.9/TODO0000644000076400007640000000031110022655201011260 0ustar jeffjeffStill to do: o write some test code for make test o implement mk_safe & rd_safe o investigate net_read & net_write -- does Perl really need them? o finalize exported constants o support Win2K clients Krb5-1.9/Krb5.xs0000644000076400007640000006553011320242157011771 0ustar jeffjeff#ifdef __cplusplus extern "C" { #endif #include "EXTERN.h" #include "perl.h" #include "XSUB.h" /* We currently provide some private functions and probably shouldn't. */ #define KRB5_PRIVATE 1 #include /* Recent versions of Kerberos include com_err on their own. Uncomment if you * have an older version and the complier complains about missing headers. */ /* #include */ #include #include "krb5_constants.c" #ifdef __cplusplus } #endif /* change this if 10 hours doesn't suit you */ #define KRB5_DEFAULT_LIFE 60*60*10 typedef krb5_ccache Authen__Krb5__Ccache; typedef krb5_principal Authen__Krb5__Principal; typedef krb5_auth_context Authen__Krb5__AuthContext; typedef krb5_rcache Authen__Krb5__Rcache; typedef krb5_creds *Authen__Krb5__Creds; typedef krb5_ap_rep_enc_part *Authen__Krb5__ApRepEncPart; typedef krb5_ticket *Authen__Krb5__Ticket; typedef krb5_keytab Authen__Krb5__Keytab; typedef krb5_enc_tkt_part *Authen__Krb5__EncTktPart; typedef krb5_error *Authen__Krb5__Error; typedef krb5_address *Authen__Krb5__Address; typedef krb5_keyblock *Authen__Krb5__Keyblock; typedef krb5_keytab_entry *Authen__Krb5__KeytabEntry; typedef krb5_kt_cursor *Authen__Krb5__KeytabCursor; typedef krb5_cc_cursor *Authen__Krb5__CcacheCursor; typedef krb5_keyblock *Authen__Krb5__KeyBlock; static krb5_context context = NULL; static krb5_error_code err; static krb5_keytab_entry keytab_entry_init; /* * These are internal Kerberos library functions that aren't prototyped and * that we probably shouldn't be calling. Prototype them with the arguments * we expect and leave them for now pending an API cleanup. */ krb5_error_code krb5_free_krbhst(krb5_context, char * const *); krb5_error_code krb5_get_krbhst(krb5_context, const krb5_data *, char ***); /* * The following three routines implement a "safehouse" for nested Kerberos * data structures which shouldn't be freed before their parent data * structures are freed. Without this, "Bad free() ignored" errors as well * as core dumps could occur when the parent structures are eventually freed. * * If a method returns a newly allocated object, it calls can_free() to * register the object as "freeable," since the memory was not in use * beforehand. This module will only free objects that have been registered * with can_free(), and lets Kerberos free the others. * * Doing it the other way (registering objects which *shouldn't* be freed) * is more complicated than it first seems, so I did it this way. */ HV *free_hash = NULL; /* might as well take advantage of Perl! */ void can_free(SV *sv) { char key[80]; sprintf(key,"%p",sv); if (!free_hash) free_hash = newHV(); hv_store(free_hash,key,strlen(key),&PL_sv_yes,0); } int should_free(SV *sv) { char key[80]; if (!free_hash) return 0; sprintf(key,"%p",sv); return hv_exists(free_hash,key,strlen(key)); } void freed(SV *sv) { char key[80]; if (!free_hash) return; sprintf(key,"%p",sv); hv_delete(free_hash,key,strlen(key),G_DISCARD); } MODULE = Authen::Krb5 PACKAGE = Authen::Krb5 PREFIX = krb5_ double constant(name, arg) char *name int arg void krb5_error(e = 0) krb5_error_code e; CODE: if (e) { ST(0) = sv_2mortal(newSVpv((char *)error_message(e), 0)); } else { ST(0) = sv_2mortal(newSVpv((char *)error_message(err), 0)); (void) SvUPGRADE(ST(0), SVt_PVIV); SvIVX(ST(0)) = err; SvIOK_on(ST(0)); } void krb5_init_context() CODE: if (context) croak("Authen::Krb5 already initialized"); err = krb5_init_context(&context); if (err) XSRETURN_UNDEF; XSRETURN_YES; void krb5_free_context() CODE: if (!context) croak("Authen::Krb5 not yet initialized"); krb5_free_context(context); context = NULL; void krb5_init_ets() CODE: #if KRB5_DEPRECATED krb5_init_ets(context); #endif /* KRB5_DEPRECATED */ XSRETURN_YES; void krb5_get_default_realm() PREINIT: char *realm; PPCODE: err = krb5_get_default_realm(context,&realm); if (err || !realm) XSRETURN_UNDEF; XPUSHs(sv_2mortal(newSVpv(realm,strlen(realm)))); Safefree(realm); void krb5_get_host_realm(host) char *host PREINIT: char **realmlist; int i; PPCODE: err = krb5_get_host_realm(context,host,&realmlist); if (err || !realmlist) XSRETURN_UNDEF; for (i = 0; realmlist[i]; i++) { XPUSHs(sv_2mortal(newSVpv(realmlist[i], strlen(realmlist[i])))); } krb5_free_host_realm(context,realmlist); void krb5_get_krbhst(realm) char *realm PREINIT: krb5_data realm_data; char **hostlist; int i; PPCODE: realm_data.data = realm; realm_data.length = strlen(realm); err = krb5_get_krbhst(context,&realm_data,&hostlist); if (err || !hostlist) XSRETURN_UNDEF; for (i = 0; hostlist[i]; i++) { XPUSHs(sv_2mortal(newSVpv(hostlist[i], strlen(hostlist[i])))); } krb5_free_krbhst(context,hostlist); Authen::Krb5::Principal krb5_build_principal_ext(p) Authen::Krb5::Principal p CODE: err = krb5_build_principal_ext(context, &RETVAL, krb5_princ_realm(context, p)->length, krb5_princ_realm(context, p)->data, KRB5_TGS_NAME_SIZE, KRB5_TGS_NAME, krb5_princ_realm(context, p)->length, krb5_princ_realm(context, p)->data, 0); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL Authen::Krb5::Principal krb5_parse_name(name) char *name CODE: err = krb5_parse_name(context,name,&RETVAL); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL Authen::Krb5::Principal krb5_sname_to_principal(hostname,sname,type) char *hostname char *sname krb5_int32 type CODE: err = krb5_sname_to_principal(context,hostname,sname,type,&RETVAL); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL Authen::Krb5::Ccache krb5_cc_resolve(string_name) char *string_name CODE: err = krb5_cc_resolve(context, string_name, &RETVAL); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL char * krb5_cc_default_name() CODE: RETVAL = (char *)krb5_cc_default_name(context); OUTPUT: RETVAL Authen::Krb5::Ccache krb5_cc_default() CODE: err = krb5_cc_default(context, &RETVAL); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL Authen::Krb5::Keytab krb5_kt_resolve(string_name) char *string_name CODE: err = krb5_kt_resolve(context, string_name, &RETVAL); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL SV * krb5_kt_default_name() CODE: char name[BUFSIZ]; err = krb5_kt_default_name(context, name, sizeof name - 1); if (err) XSRETURN_UNDEF; name[sizeof name - 1] = '\0'; RETVAL = newSVpv(name, 0); OUTPUT: RETVAL Authen::Krb5::Keytab krb5_kt_default() CODE: err = krb5_kt_default(context, &RETVAL); if (err) XSRETURN_UNDEF; OUTPUT: RETVAL Authen::Krb5::Keyblock krb5_kt_read_service_key(name, principal, kvno = 0, enctype = 0) char *name Authen::Krb5::Principal principal krb5_kvno kvno krb5_enctype enctype CODE: err = krb5_kt_read_service_key(context, name, principal, kvno, enctype, &RETVAL); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL Authen::Krb5::Creds krb5_get_init_creds_password(client, password, service = NULL) Authen::Krb5::Principal client char *password char *service PREINIT: krb5_get_init_creds_opt opt; CODE: if (service != NULL && service[0] == '\0') service = NULL; RETVAL = calloc(1, sizeof(krb5_creds)); if (RETVAL == NULL) { err = errno; XSRETURN_UNDEF; } krb5_get_init_creds_opt_init(&opt); err = krb5_get_init_creds_password(context, RETVAL, client, password, NULL, NULL, 0, service, &opt); if (err) { free(RETVAL); XSRETURN_UNDEF; } can_free((SV *)RETVAL); OUTPUT: RETVAL Authen::Krb5::Creds krb5_get_init_creds_keytab(client, keytab, service = NULL) Authen::Krb5::Principal client Authen::Krb5::Keytab keytab char *service PREINIT: krb5_get_init_creds_opt opt; CODE: if (service != NULL && service[0] == '\0') service = NULL; RETVAL = calloc(1, sizeof(krb5_creds)); if (RETVAL == NULL) { err = errno; XSRETURN_UNDEF; } krb5_get_init_creds_opt_init(&opt); err = krb5_get_init_creds_keytab(context, RETVAL, client, keytab, 0, service, &opt); if (err) { free(RETVAL); XSRETURN_UNDEF; } can_free((SV *)RETVAL); OUTPUT: RETVAL # These are legacy interfaces which are deprecated in the current MIT # Kerberos. Reimplement them in terms of the new get_init_creds # interfaces rather than call the deprecated functions. void krb5_get_in_tkt_with_password(client, server, password, cc) Authen::Krb5::Principal client Authen::Krb5::Principal server char *password Authen::Krb5::Ccache cc PREINIT: krb5_creds cr; krb5_get_init_creds_opt opt; char *service; CODE: memset((char *)&cr,0,sizeof(krb5_creds)); krb5_get_init_creds_opt_init(&opt); err = krb5_unparse_name(context, server, &service); if (err) XSRETURN_UNDEF; err = krb5_get_init_creds_password(context, &cr, client, password, NULL, NULL, 0, service, &opt); free(service); if (err) XSRETURN_UNDEF; err = krb5_cc_initialize(context, cc, client); if (err) { krb5_free_cred_contents(context, &cr); XSRETURN_UNDEF; } err = krb5_cc_store_cred(context, cc, &cr); if (err) { krb5_free_cred_contents(context, &cr); XSRETURN_UNDEF; } krb5_free_cred_contents(context, &cr); XSRETURN_YES; void krb5_get_in_tkt_with_keytab(client, server, keytab, cc) Authen::Krb5::Principal client Authen::Krb5::Principal server Authen::Krb5::Keytab keytab Authen::Krb5::Ccache cc PREINIT: krb5_creds cr; krb5_get_init_creds_opt opt; char *service; CODE: memset(&cr,0,sizeof(krb5_creds)); krb5_get_init_creds_opt_init(&opt); err = krb5_unparse_name(context, server, &service); if (err) XSRETURN_UNDEF; err = krb5_get_init_creds_keytab(context, &cr, client, keytab, 0, service, &opt); free(service); if (err) XSRETURN_UNDEF; err = krb5_cc_initialize(context, cc, client); if (err) { krb5_free_cred_contents(context, &cr); XSRETURN_UNDEF; } err = krb5_cc_store_cred(context, cc, &cr); if (err) { krb5_free_cred_contents(context, &cr); XSRETURN_UNDEF; } krb5_free_cred_contents(context, &cr); XSRETURN_YES; SV * krb5_mk_req(auth_context, ap_req_options, service, hostname, in, cc) Authen::Krb5::AuthContext auth_context krb5_flags ap_req_options char *service char *hostname SV *in Authen::Krb5::Ccache cc PREINIT: krb5_data in_data, out_data; CODE: in_data.data = SvPV(in,in_data.length); err = krb5_mk_req(context,&auth_context,ap_req_options,service,hostname, &in_data,cc,&out_data); if (err) XSRETURN_UNDEF; RETVAL = newSVpv(out_data.data,out_data.length); OUTPUT: RETVAL Authen::Krb5::Ticket krb5_rd_req(auth_context,in,server,keytab=0) Authen::Krb5::AuthContext auth_context SV *in Authen::Krb5::Principal server Authen::Krb5::Keytab keytab PREINIT: krb5_data in_data; krb5_ticket *t; CODE: if (!New(0,t,1,krb5_ticket)) XSRETURN_UNDEF; in_data.data = SvPV(in,in_data.length); err = krb5_rd_req(context,&auth_context,&in_data,server,keytab, NULL,&t); if (err) XSRETURN_UNDEF; RETVAL = t; can_free((SV *)RETVAL); OUTPUT: RETVAL Authen::Krb5::Address gen_portaddr(addr,port) Authen::Krb5::Address addr unsigned short port CODE: err = krb5_gen_portaddr(context,addr,(krb5_pointer)&port,&RETVAL); if (err) XSRETURN_UNDEF; OUTPUT: RETVAL void genaddrs(auth_context,fh,flags) Authen::Krb5::AuthContext auth_context FILE *fh; krb5_flags flags PREINIT: int fd; CODE: fd = fileno(fh); err = krb5_auth_con_genaddrs(context,auth_context,fd,flags); if (err) XSRETURN_UNDEF; XSRETURN_YES; char * gen_replay_name(addr,uniq) Authen::Krb5::Address addr char *uniq CODE: err = krb5_gen_replay_name(context,addr,uniq,&RETVAL); if (err) XSRETURN_UNDEF; OUTPUT: RETVAL void krb5_mk_priv(auth_context,in) Authen::Krb5::AuthContext auth_context SV *in PREINIT: krb5_data in_data, out_data; PPCODE: in_data.data = SvPV(in,in_data.length); err = krb5_mk_priv(context,auth_context,&in_data,&out_data,NULL); if (err) XSRETURN_UNDEF; XPUSHs(sv_2mortal(newSVpv(out_data.data,out_data.length))); /* krb5_free_data(context,&out_data); */ void krb5_rd_priv(auth_context,in) Authen::Krb5::AuthContext auth_context SV *in PREINIT: krb5_data in_data, out_data; PPCODE: in_data.data = SvPV(in,in_data.length); err = krb5_rd_priv(context,auth_context,&in_data,&out_data,NULL); if (err) XSRETURN_UNDEF; XPUSHs(sv_2mortal(newSVpv(out_data.data,out_data.length))); Authen::Krb5::Rcache krb5_get_server_rcache(piece) SV *piece PREINIT: krb5_data rc_data; CODE: rc_data.data=SvPV(piece,rc_data.length); err = krb5_get_server_rcache(context,&rc_data,&RETVAL); if (err) XSRETURN_UNDEF; OUTPUT: RETVAL void krb5_sendauth(auth_context,fh,version,client,server,options,in,in_creds,cc) Authen::Krb5::AuthContext auth_context FILE *fh char *version Authen::Krb5::Principal client Authen::Krb5::Principal server int options SV *in Authen::Krb5::Creds in_creds Authen::Krb5::Ccache cc PREINIT: krb5_data in_data; krb5_creds *out_creds = NULL; int fd; PPCODE: fd = fileno(fh); in_data.data = SvPV(in,in_data.length); err = krb5_sendauth(context,&auth_context,&fd,version,client,server, options,&in_data,in_creds,cc,NULL,NULL,&out_creds); if (err) XSRETURN_UNDEF; XSRETURN_YES; void krb5_recvauth(auth_context,fh,version,server,keytab) Authen::Krb5::AuthContext auth_context FILE *fh char *version Authen::Krb5::Principal server Authen::Krb5::Keytab keytab PREINIT: krb5_ticket *ticket = NULL; int fd; PPCODE: fd = fileno(fh); err = krb5_recvauth(context,&auth_context,&fd,version,server,0, keytab,&ticket); if (err) XSRETURN_UNDEF; ST(0) = sv_newmortal(); sv_setref_pv(ST(0),"Authen::Krb5::Ticket",(void*)ticket); XSRETURN(1); MODULE = Authen::Krb5 PACKAGE = Authen::Krb5::Principal void realm(p) Authen::Krb5::Principal p CODE: ST(0) = sv_2mortal(newSVpv(p->realm.data,p->realm.length)); krb5_int32 type(p) Authen::Krb5::Principal p CODE: RETVAL = p->type; OUTPUT: RETVAL void data(p) Authen::Krb5::Principal p PPCODE: if (p->length > 0) { int len = p->length; krb5_data *data; EXTEND(sp,len); for (data = p->data; len--; data++) { PUSHs(sv_2mortal(newSVpv(data->data,data->length))); } } void DESTROY(p) Authen::Krb5::Principal p CODE: if (p && should_free((SV *)p)) { krb5_free_principal(context,p); freed((SV *)p); } MODULE = Authen::Krb5 PACKAGE = Authen::Krb5::Ccache void initialize(cc, p) Authen::Krb5::Ccache cc Authen::Krb5::Principal p CODE: err = krb5_cc_initialize(context, cc, p); if (err) XSRETURN_UNDEF; else { can_free((SV *)cc); XSRETURN_YES; } void store_cred(cc, creds) Authen::Krb5::Ccache cc Authen::Krb5::Creds creds CODE: err = krb5_cc_store_cred(context, cc, creds); if (err) XSRETURN_UNDEF; XSRETURN_YES; const char * get_name(cc) Authen::Krb5::Ccache cc CODE: RETVAL = krb5_cc_get_name(context, cc); OUTPUT: RETVAL Authen::Krb5::Principal get_principal(cc) Authen::Krb5::Ccache cc CODE: err = krb5_cc_get_principal(context, cc, &RETVAL); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL void destroy(cc) Authen::Krb5::Ccache cc CODE: if (!should_free((SV*)cc)) XSRETURN_UNDEF; err = krb5_cc_destroy(context, cc); if (err) { XSRETURN_UNDEF; } else { freed((SV*)cc); XSRETURN_YES; } krb5_cc_cursor * start_seq_get(cc) Authen::Krb5::Ccache cc CODE: if (!New(0, RETVAL, 1, krb5_cc_cursor)) XSRETURN_UNDEF; err = krb5_cc_start_seq_get(context, cc, RETVAL); if (err) XSRETURN_UNDEF; OUTPUT: RETVAL Authen::Krb5::Creds next_cred(cc, cursor) krb5_cc_cursor *cursor Authen::Krb5::Ccache cc CODE: if (!New(0, RETVAL, 1, krb5_creds)) XSRETURN_UNDEF; err = krb5_cc_next_cred(context, cc, cursor, RETVAL); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL void end_seq_get(cc, cursor) Authen::Krb5::Ccache cc krb5_cc_cursor *cursor CODE: err = krb5_cc_end_seq_get(context, cc, cursor); if (err) XSRETURN_UNDEF; XSRETURN_YES; void DESTROY(cc) Authen::Krb5::Ccache cc CODE: if (should_free((SV *)cc)) { krb5_cc_close(context, cc); freed((SV *)cc); } MODULE = Authen::Krb5 PACKAGE = Authen::Krb5::KeyBlock int length(kb) Authen::Krb5::KeyBlock kb CODE: RETVAL = kb->length; OUTPUT: RETVAL void contents(kb) Authen::Krb5::KeyBlock kb PPCODE: /* sv_2mortal here causes 'Attempt to free unreferenced scalar' later */ XPUSHs(newSVpvn((char*)(kb->contents), kb->length)); int enctype(kb) Authen::Krb5::KeyBlock kb CODE: RETVAL = (int)kb->enctype; OUTPUT: RETVAL void enctype_string(kb) Authen::Krb5::KeyBlock kb PREINIT: char buf[256]; PPCODE: err = krb5_enctype_to_string(kb->enctype, buf, 255); if (err) { XSRETURN_UNDEF; } XPUSHs(newSVpv(buf, 0)); void DESTROY(kb) Authen::Krb5::KeyBlock kb CODE: if (kb && should_free((SV *)kb)) { krb5_free_keyblock(context,kb); freed((SV *)kb); } MODULE = Authen::Krb5 PACKAGE = Authen::Krb5::AuthContext Authen::Krb5::AuthContext new(class) char *class CODE: err = krb5_auth_con_init(context, &RETVAL); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL int getflags(auth_context) Authen::Krb5::AuthContext auth_context PREINIT: krb5_int32 flags; CODE: err = krb5_auth_con_getflags(context,auth_context,&flags); RETVAL = (int)flags; OUTPUT: RETVAL void setflags(auth_context,flags) Authen::Krb5::AuthContext auth_context krb5_int32 flags CODE: err = krb5_auth_con_setflags(context,auth_context,flags); if(err) XSRETURN_UNDEF; XSRETURN_YES; Authen::Krb5::Rcache getrcache(auth_context) Authen::Krb5::AuthContext auth_context CODE: err = krb5_auth_con_getrcache(context,auth_context,&RETVAL); if (err) XSRETURN_UNDEF; OUTPUT: RETVAL void setrcache(auth_context,rc) Authen::Krb5::AuthContext auth_context Authen::Krb5::Rcache rc CODE: err = krb5_auth_con_setrcache(context,auth_context,rc); if (err) XSRETURN_UNDEF; XSRETURN_YES; void getaddrs(auth_context) Authen::Krb5::AuthContext auth_context PREINIT: krb5_address *local, *remote; CODE: err = krb5_auth_con_getaddrs(context,auth_context,&local,&remote); if (err) XSRETURN_EMPTY; ST(0) = sv_newmortal(); ST(1) = sv_newmortal(); sv_setref_pv(ST(0), "Authen::Krb5::Address", (void*)local); sv_setref_pv(ST(1), "Authen::Krb5::Address", (void*)remote); XSRETURN(2); void setaddrs(auth_context,laddr,raddr) Authen::Krb5::AuthContext auth_context Authen::Krb5::Address laddr Authen::Krb5::Address raddr CODE: if (!SvOK((SV*)ST(1))) laddr = NULL; if (!SvOK((SV*)ST(2))) raddr = NULL; err = krb5_auth_con_setaddrs(context,auth_context,laddr,raddr); if (err) XSRETURN_UNDEF; XSRETURN_YES; void setports(auth_context,laddr,raddr) Authen::Krb5::AuthContext auth_context Authen::Krb5::Address laddr Authen::Krb5::Address raddr CODE: if (!SvOK((SV*)ST(1))) laddr = NULL; if (!SvOK((SV*)ST(2))) raddr = NULL; err = krb5_auth_con_setports(context,auth_context,laddr,raddr); if (err) XSRETURN_UNDEF; XSRETURN_YES; Authen::Krb5::KeyBlock getkey(auth_context) Authen::Krb5::AuthContext auth_context; CODE: err = krb5_auth_con_getkey(context, auth_context, &RETVAL); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL void DESTROY(auth_context) Authen::Krb5::AuthContext auth_context; CODE: if (auth_context) { krb5_auth_con_free(context, auth_context); freed((SV *)auth_context); } MODULE = Authen::Krb5 PACKAGE = Authen::Krb5::Ticket Authen::Krb5::Principal server(t) Authen::Krb5::Ticket t CODE: RETVAL = t->server; OUTPUT: RETVAL Authen::Krb5::EncTktPart enc_part2(t) Authen::Krb5::Ticket t CODE: RETVAL = t->enc_part2; OUTPUT: RETVAL void DESTROY(t) Authen::Krb5::Ticket t CODE: if (t) { krb5_free_ticket(context,t); freed((SV *)t); } MODULE = Authen::Krb5 PACKAGE = Authen::Krb5::EncTktPart Authen::Krb5::Principal client(etp) Authen::Krb5::EncTktPart etp CODE: RETVAL = etp->client; OUTPUT: RETVAL void DESTROY(etp) Authen::Krb5::EncTktPart etp CODE: if (etp && should_free((SV *)etp)) { krb5_free_enc_tkt_part(context,etp); freed((SV *)etp); } MODULE = Authen::Krb5 PACKAGE = Authen::Krb5::Address Authen::Krb5::Address new(class,addrtype,contents) char *class unsigned int addrtype SV *contents CODE: if (!New(0,RETVAL,1,krb5_address)) XSRETURN_UNDEF; RETVAL->addrtype = addrtype; RETVAL->contents = (krb5_octet *)SvPV(contents,RETVAL->length); OUTPUT: RETVAL void DESTROY(addr) Authen::Krb5::Address addr CODE: if (addr && should_free((SV *)addr)) { krb5_free_address(context,addr); freed((SV *)addr); } MODULE = Authen::Krb5 PACKAGE = Authen::Krb5::Keyblock krb5_enctype enctype(keyblock) Authen::Krb5::Keyblock keyblock CODE: RETVAL = keyblock->enctype; OUTPUT: RETVAL unsigned int length(keyblock) Authen::Krb5::Keyblock keyblock CODE: RETVAL = keyblock->length; OUTPUT: RETVAL SV * contents(keyblock) Authen::Krb5::Keyblock keyblock CODE: if (keyblock->contents == NULL) XSRETURN_UNDEF; RETVAL = newSVpv((char *) keyblock->contents, keyblock->length); OUTPUT: RETVAL void DESTROY(keyblock) Authen::Krb5::Keyblock keyblock CODE: if (keyblock->contents) { memset(keyblock->contents, 0, keyblock->length); free(keyblock->contents); keyblock->contents = NULL; } MODULE = Authen::Krb5 PACKAGE = Authen::Krb5::Keytab void add_entry(keytab, entry) Authen::Krb5::Keytab keytab Authen::Krb5::KeytabEntry entry CODE: err = krb5_kt_add_entry(context, keytab, entry); if (err) XSRETURN_UNDEF; XSRETURN_YES; void end_seq_get(keytab, cursor) Authen::Krb5::Keytab keytab krb5_kt_cursor *cursor CODE: err = krb5_kt_end_seq_get(context, keytab, cursor); if (err) XSRETURN_UNDEF; XSRETURN_YES; Authen::Krb5::KeytabEntry get_entry(keytab, principal, vno = 0, enctype = 0) Authen::Krb5::Keytab keytab Authen::Krb5::Principal principal krb5_kvno vno krb5_enctype enctype CODE: if (!New(0, RETVAL, 1, krb5_keytab_entry)) XSRETURN_UNDEF; err = krb5_kt_get_entry(context, keytab, principal, vno, enctype, RETVAL); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL SV * get_name(keytab) Authen::Krb5::Keytab keytab PREINIT: char name[MAX_KEYTAB_NAME_LEN+1]; CODE: err = krb5_kt_get_name(context, keytab, name, MAX_KEYTAB_NAME_LEN); if (err) XSRETURN_UNDEF; RETVAL = sv_2mortal(newSVpv(name, 0)); can_free((SV *)RETVAL); OUTPUT: RETVAL Authen::Krb5::KeytabEntry next_entry(keytab, cursor) krb5_kt_cursor *cursor Authen::Krb5::Keytab keytab CODE: if (!New(0, RETVAL, 1, krb5_keytab_entry)) XSRETURN_UNDEF; err = krb5_kt_next_entry(context, keytab, RETVAL, cursor); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL void remove_entry(keytab, entry) Authen::Krb5::Keytab keytab Authen::Krb5::KeytabEntry entry CODE: err = krb5_kt_remove_entry(context, keytab, entry); if (err) XSRETURN_UNDEF; XSRETURN_YES; krb5_kt_cursor * start_seq_get(keytab) Authen::Krb5::Keytab keytab CODE: if (!New(0, RETVAL, 1, krb5_kt_cursor)) XSRETURN_UNDEF; err = krb5_kt_start_seq_get(context, keytab, RETVAL); if (err) XSRETURN_UNDEF; OUTPUT: RETVAL void DESTROY(keytab) Authen::Krb5::Keytab keytab CODE: if (keytab && should_free((SV *)keytab)) { krb5_kt_close(context, keytab); freed((SV *)keytab); } MODULE = Authen::Krb5 PACKAGE = Authen::Krb5::KeytabEntry Authen::Krb5::KeytabEntry new(class, principal, vno, key) char *class Authen::Krb5::Principal principal krb5_kvno vno Authen::Krb5::Keyblock key CODE: if (!New(0, RETVAL, 1, krb5_keytab_entry)) XSRETURN_UNDEF; *RETVAL = keytab_entry_init; RETVAL->principal = principal; RETVAL->vno = vno; RETVAL->key = *key; can_free((SV *)RETVAL); OUTPUT: RETVAL Authen::Krb5::Principal principal(entry) Authen::Krb5::KeytabEntry entry CODE: err = krb5_copy_principal(context, entry->principal, &RETVAL); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL krb5_timestamp timestamp(entry) Authen::Krb5::KeytabEntry entry CODE: RETVAL = entry->timestamp; OUTPUT: RETVAL krb5_kvno kvno(entry) Authen::Krb5::KeytabEntry entry CODE: RETVAL = entry->vno; OUTPUT: RETVAL Authen::Krb5::Keyblock key(entry) Authen::Krb5::KeytabEntry entry CODE: err = krb5_copy_keyblock(context, &entry->key, &RETVAL); if (err) XSRETURN_UNDEF; can_free((SV *)RETVAL); OUTPUT: RETVAL MODULE = Authen::Krb5 PACKAGE = Authen::Krb5::Creds krb5_timestamp starttime(cred) Authen::Krb5::Creds cred CODE: if (!cred->times.starttime) cred->times.starttime = cred->times.authtime; RETVAL = cred->times.starttime; OUTPUT: RETVAL krb5_timestamp authtime(cred) Authen::Krb5::Creds cred CODE: RETVAL = cred->times.authtime; OUTPUT: RETVAL krb5_timestamp endtime(cred) Authen::Krb5::Creds cred CODE: RETVAL = cred->times.endtime; OUTPUT: RETVAL krb5_timestamp renew_till(cred) Authen::Krb5::Creds cred CODE: RETVAL = cred->times.renew_till; OUTPUT: RETVAL char * server(cred) Authen::Krb5::Creds cred PREINIT: krb5_error_code retval; char *sname; CODE: retval = krb5_unparse_name(context, cred->server, &sname); if (retval) { com_err("Authen::Krb5::Creds", retval, "while unparsing server name"); return; } RETVAL = sname; OUTPUT: RETVAL char * client(cred) Authen::Krb5::Creds cred PREINIT: krb5_error_code retval; char *name; CODE: retval = krb5_unparse_name(context, cred->client, &name); if (retval) { com_err("Authen::Krb5::Creds", retval, "while unparsing client name"); return; } RETVAL = name; OUTPUT: RETVAL Authen::Krb5::Ticket ticket(cred) Authen::Krb5::Creds cred PREINIT: krb5_error_code retval; krb5_ticket *t; CODE: if (!New(0,t,1,krb5_ticket)) XSRETURN_UNDEF; retval = krb5_decode_ticket(&cred->ticket, &t); RETVAL = t; can_free((SV *)RETVAL); OUTPUT: RETVAL Authen::Krb5::Keyblock keyblock(cred) Authen::Krb5::Creds cred CODE: RETVAL = &cred->keyblock; can_free((SV *)RETVAL); OUTPUT: RETVAL # TODO: Authen::Krb5::Address # addresses(cred) void DESTROY(creds) Authen::Krb5::Creds creds CODE: if (creds && should_free((SV *)creds)) { krb5_free_cred_contents(context, creds); free(creds); freed((SV *)creds); } Krb5-1.9/COPYRIGHT0000644000076400007640000000027411320243040012067 0ustar jeffjeffCopyright (c) 2000-2010 Jeff Horwitz (jeff@smashing.org). All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Krb5-1.9/simple_server0000755000076400007640000000325610443042317013415 0ustar jeffjeff#!/usr/local/bin/perl # simple_server # uses rd_req & rd_priv to decrypt an authentic encrypted message use blib; # remove if not in module build directory use IO::Socket; use Sys::Hostname; use Authen::Krb5 (ADDRTYPE_INET,ADDRTYPE_IPPORT,KRB5_NT_SRV_HST); # replace with your own stuff $SERVICE = "sample"; $KEYTAB_FILE = "/etc/krb5.keytab"; chomp($SERVER = hostname()); Authen::Krb5::init_context(); $ac = new Authen::Krb5::AuthContext; $s = new IO::Socket::INET( LocalAddr => $SERVER, LocalPort => 12345, Proto => 'tcp', Reuse => 1, Listen => 5 ); defined $s or die $!; $ns = $s->accept(); # grab the client's address $addr = new Authen::Krb5::Address(ADDRTYPE_INET,pack("N",$ns->peeraddr())); $ports = new Authen::Krb5::Address(ADDRTYPE_IPPORT,pack("n",$ns->peerport())); # get authentication info while (defined($line = <$ns>)) { $d .= $line; if ($line =~ /__END$/) { chomp $d; $d =~ s/__END$//; last; } } # get encrypted message while (defined($line = <$ns>)) { $enc .= $line; if ($line =~ /__END$/) { chomp $enc; $enc =~ s/__END$//; last; } } $sprinc = Authen::Krb5::sname_to_principal($SERVER,$SERVICE,KRB5_NT_SRV_HST); $kt = Authen::Krb5::kt_resolve("FILE:$KEYTAB_FILE"); $t = Authen::Krb5::rd_req($ac,$d,$sprinc,$kt); unless ($t) { print "rd_req error: ",Authen::Krb5::error(),"\n"; exit(1); } $client = $t->enc_part2->client; print "Hello, ",$client->data,"\n"; # set the remote address $ac->setaddrs(undef,$addr); $ac->setports(undef,$ports); # decrypt the message $dec = Authen::Krb5::rd_priv($ac,$enc); unless ($dec) { print "rd_priv error: ",Authen::Krb5::error(),"\n"; exit(1); } print "Decrypted message is: '$dec'\n"; Authen::Krb5::free_context(); Krb5-1.9/README0000644000076400007640000000365711320242772011477 0ustar jeffjeffKrb5 provides an object oriented interface to the most commonly used functions included in the Kerberos 5 API. It was developed and tested using Perl 5.005_03 and MIT Kerberos 5 version 1.0.5 and 1.1.1. NOTE: This module is very out of date, though it should still work with recent Kerberos 5 libraries. Version 2.0 will be a well deserved, complete rewrite. Following version 1.9, only bug fixes will be released for the 1.x series. Your comments and bug reports are welcome. Please send them to me at jeff@smashing.org. REQUIREMENTS ------------ o Perl 5.004_04 or later (may work with 5.003). o Build, test and install MIT Kerberos 5 version 1.0.5 or later. BUILDING & INSTALLATION ----------------------- Krb5 is built and installed in the usual Perl module fashion: 1) edit Makefile.PL and change the variables in the top section according to your Kerberos 5 configuration. 2) perl Makefile.PL 3) make 4) make test (not implemented yet) 5) make install DOCUMENTATION ------------- 'make' should create man pages for Krb5 which will be installed upon a 'make install'. Perl POD documentation is supplied in Krb5.pm, which can be viewed by typing 'perldoc Krb5'. Take a look at the sample and simple clients and servers for some practical examples. NOTE: The documentation assumes familiarity with Kerberos 5 and Kerberos programming. Please see the Kerberos documentation for gory details. BUGS & PROBLEMS --------------- o The contents of a new Krb5::Address object needs to be converted to network byte order before being passed to Krb5::Address->new(). If this is not done, many functions like mk_priv and rd_priv will fail on little-endian platforms. I will try to make this automatic in a future version. ACKNOWLEDGEMENTS ---------------- Thanks to Doug MacEachern for handing off this module to me, although I'm sure he was glad to get it off his back! Valuable code contributions from Scott Hutton (shutton@indiana.edu). Krb5-1.9/typemap0000644000076400007640000000237310443035312012206 0ustar jeffjeffTYPEMAP Authen::Krb5::Ccache T_PTROBJ_NU Authen::Krb5::Principal T_PTROBJ_NU Authen::Krb5::AuthContext T_PTROBJ_NU Authen::Krb5::Rcache T_PTROBJ_NU Authen::Krb5::Creds T_PTROBJ_NU Authen::Krb5::ApRepEncPart T_PTROBJ_NU Authen::Krb5::Error T_PTROBJ_NU Authen::Krb5::Ticket T_PTROBJ_NU Authen::Krb5::Keytab T_PTROBJ_NU Authen::Krb5::EncTktPart T_PTROBJ_NU Authen::Krb5::Ccache T_PTROBJ_NU Authen::Krb5::Principal T_PTROBJ_NU Authen::Krb5::AuthContext T_PTROBJ_NU Authen::Krb5::Rcache T_PTROBJ_NU Authen::Krb5::Creds T_PTROBJ_NU Authen::Krb5::Address T_PTROBJ_NU Authen::Krb5::Keyblock T_PTROBJ_NU Authen::Krb5::KeytabEntry T_PTROBJ_NU Authen::Krb5::KeyBlock T_PTROBJ_NU struct in_addr * T_PTROBJ_NU krb5_error_code T_INT krb5_int32 T_INT krb5_flags T_INT krb5_timestamp T_INT krb5_ui_4 T_INT krb5_enctype T_INT krb5_kt_cursor * T_PTROBJ_NU krb5_cc_cursor * T_PTROBJ_NU krb5_kvno T_U_INT INPUT T_PTROBJ_NU if ($arg == &PL_sv_undef) { $var = 0; } else if (sv_isa($arg, \"${ntype}\")) { IV tmp = SvIV((SV*)SvRV($arg)); $var = ($type) tmp; } else { croak(\"$var is not of type ${ntype}\"); } OUTPUT T_PTROBJ_NU sv_setref_pv($arg, \"${ntype}\", (void*)$var); Krb5-1.9/krb5_constants.c0000644000076400007640000017765010767233246013741 0ustar jeffjeffstatic double constant(name, arg) char *name; int arg; { errno = 0; switch (*name) { case 'A': if (strEQ(name, "ADDRTYPE_ADDRPORT")) #ifdef ADDRTYPE_ADDRPORT return ADDRTYPE_ADDRPORT; #else goto not_there; #endif if (strEQ(name, "ADDRTYPE_CHAOS")) #ifdef ADDRTYPE_CHAOS return ADDRTYPE_CHAOS; #else goto not_there; #endif if (strEQ(name, "ADDRTYPE_DDP")) #ifdef ADDRTYPE_DDP return ADDRTYPE_DDP; #else goto not_there; #endif if (strEQ(name, "ADDRTYPE_INET")) #ifdef ADDRTYPE_INET return ADDRTYPE_INET; #else goto not_there; #endif if (strEQ(name, "ADDRTYPE_IPPORT")) #ifdef ADDRTYPE_IPPORT return ADDRTYPE_IPPORT; #else goto not_there; #endif if (strEQ(name, "ADDRTYPE_ISO")) #ifdef ADDRTYPE_ISO return ADDRTYPE_ISO; #else goto not_there; #endif if (strEQ(name, "ADDRTYPE_XNS")) #ifdef ADDRTYPE_XNS return ADDRTYPE_XNS; #else goto not_there; #endif if (strEQ(name, "AD_TYPE_EXTERNAL")) #ifdef AD_TYPE_EXTERNAL return AD_TYPE_EXTERNAL; #else goto not_there; #endif if (strEQ(name, "AD_TYPE_FIELD_TYPE_MASK")) #ifdef AD_TYPE_FIELD_TYPE_MASK return AD_TYPE_FIELD_TYPE_MASK; #else goto not_there; #endif if (strEQ(name, "AD_TYPE_INTERNAL_MASK")) #ifdef AD_TYPE_INTERNAL_MASK return AD_TYPE_INTERNAL_MASK; #else goto not_there; #endif if (strEQ(name, "AD_TYPE_REGISTERED")) #ifdef AD_TYPE_REGISTERED return AD_TYPE_REGISTERED; #else goto not_there; #endif if (strEQ(name, "AD_TYPE_RESERVED")) #ifdef AD_TYPE_RESERVED return AD_TYPE_RESERVED; #else goto not_there; #endif if (strEQ(name, "ANSI_STDIO")) #ifdef ANSI_STDIO return ANSI_STDIO; #else goto not_there; #endif if (strEQ(name, "AP_OPTS_MUTUAL_REQUIRED")) #ifdef AP_OPTS_MUTUAL_REQUIRED return AP_OPTS_MUTUAL_REQUIRED; #else goto not_there; #endif if (strEQ(name, "AP_OPTS_RESERVED")) #ifdef AP_OPTS_RESERVED return AP_OPTS_RESERVED; #else goto not_there; #endif if (strEQ(name, "AP_OPTS_USE_SESSION_KEY")) #ifdef AP_OPTS_USE_SESSION_KEY return AP_OPTS_USE_SESSION_KEY; #else goto not_there; #endif if (strEQ(name, "AP_OPTS_USE_SUBKEY")) #ifdef AP_OPTS_USE_SUBKEY return AP_OPTS_USE_SUBKEY; #else goto not_there; #endif if (strEQ(name, "AP_OPTS_WIRE_MASK")) #ifdef AP_OPTS_WIRE_MASK return AP_OPTS_WIRE_MASK; #else goto not_there; #endif if (strEQ(name, "ASN1_BAD_FORMAT")) #ifdef ASN1_BAD_FORMAT return ASN1_BAD_FORMAT; #else goto not_there; #endif if (strEQ(name, "ASN1_BAD_ID")) #ifdef ASN1_BAD_ID return ASN1_BAD_ID; #else goto not_there; #endif if (strEQ(name, "ASN1_BAD_LENGTH")) #ifdef ASN1_BAD_LENGTH return ASN1_BAD_LENGTH; #else goto not_there; #endif if (strEQ(name, "ASN1_BAD_TIMEFORMAT")) #ifdef ASN1_BAD_TIMEFORMAT return ASN1_BAD_TIMEFORMAT; #else goto not_there; #endif if (strEQ(name, "ASN1_MISPLACED_FIELD")) #ifdef ASN1_MISPLACED_FIELD return ASN1_MISPLACED_FIELD; #else goto not_there; #endif if (strEQ(name, "ASN1_MISSING_FIELD")) #ifdef ASN1_MISSING_FIELD return ASN1_MISSING_FIELD; #else goto not_there; #endif if (strEQ(name, "ASN1_OVERFLOW")) #ifdef ASN1_OVERFLOW return ASN1_OVERFLOW; #else goto not_there; #endif if (strEQ(name, "ASN1_OVERRUN")) #ifdef ASN1_OVERRUN return ASN1_OVERRUN; #else goto not_there; #endif if (strEQ(name, "ASN1_PARSE_ERROR")) #ifdef ASN1_PARSE_ERROR return ASN1_PARSE_ERROR; #else goto not_there; #endif if (strEQ(name, "ASN1_TYPE_MISMATCH")) #ifdef ASN1_TYPE_MISMATCH return ASN1_TYPE_MISMATCH; #else goto not_there; #endif break; case 'B': break; case 'C': if (strEQ(name, "CKSUMTYPE_CRC32")) #ifdef CKSUMTYPE_CRC32 return CKSUMTYPE_CRC32; #else goto not_there; #endif if (strEQ(name, "CKSUMTYPE_DESCBC")) #ifdef CKSUMTYPE_DESCBC return CKSUMTYPE_DESCBC; #else goto not_there; #endif if (strEQ(name, "CKSUMTYPE_HMAC_SHA")) #ifdef CKSUMTYPE_HMAC_SHA return CKSUMTYPE_HMAC_SHA; #else goto not_there; #endif if (strEQ(name, "CKSUMTYPE_NIST_SHA")) #ifdef CKSUMTYPE_NIST_SHA return CKSUMTYPE_NIST_SHA; #else goto not_there; #endif if (strEQ(name, "CKSUMTYPE_RSA_MD4")) #ifdef CKSUMTYPE_RSA_MD4 return CKSUMTYPE_RSA_MD4; #else goto not_there; #endif if (strEQ(name, "CKSUMTYPE_RSA_MD4_DES")) #ifdef CKSUMTYPE_RSA_MD4_DES return CKSUMTYPE_RSA_MD4_DES; #else goto not_there; #endif if (strEQ(name, "CKSUMTYPE_RSA_MD5")) #ifdef CKSUMTYPE_RSA_MD5 return CKSUMTYPE_RSA_MD5; #else goto not_there; #endif if (strEQ(name, "CKSUMTYPE_RSA_MD5_DES")) #ifdef CKSUMTYPE_RSA_MD5_DES return CKSUMTYPE_RSA_MD5_DES; #else goto not_there; #endif break; case 'D': break; case 'E': if (strEQ(name, "ENCTYPE_DES3_CBC_RAW")) #ifdef ENCTYPE_DES3_CBC_RAW return ENCTYPE_DES3_CBC_RAW; #else goto not_there; #endif if (strEQ(name, "ENCTYPE_DES3_CBC_SHA")) #ifdef ENCTYPE_DES3_CBC_SHA return ENCTYPE_DES3_CBC_SHA; #else goto not_there; #endif if (strEQ(name, "ENCTYPE_DES_CBC_CRC")) #ifdef ENCTYPE_DES_CBC_CRC return ENCTYPE_DES_CBC_CRC; #else goto not_there; #endif if (strEQ(name, "ENCTYPE_DES_CBC_MD4")) #ifdef ENCTYPE_DES_CBC_MD4 return ENCTYPE_DES_CBC_MD4; #else goto not_there; #endif if (strEQ(name, "ENCTYPE_DES_CBC_MD5")) #ifdef ENCTYPE_DES_CBC_MD5 return ENCTYPE_DES_CBC_MD5; #else goto not_there; #endif if (strEQ(name, "ENCTYPE_DES_CBC_RAW")) #ifdef ENCTYPE_DES_CBC_RAW return ENCTYPE_DES_CBC_RAW; #else goto not_there; #endif if (strEQ(name, "ENCTYPE_NULL")) #ifdef ENCTYPE_NULL return ENCTYPE_NULL; #else goto not_there; #endif if (strEQ(name, "ENCTYPE_UNKNOWN")) #ifdef ENCTYPE_UNKNOWN return ENCTYPE_UNKNOWN; #else goto not_there; #endif if (strEQ(name, "ENOMEM")) #ifdef ENOMEM return ENOMEM; #else goto not_there; #endif if (strEQ(name, "ERROR_TABLE_BASE_asn1")) #ifdef ERROR_TABLE_BASE_asn1 return ERROR_TABLE_BASE_asn1; #else goto not_there; #endif if (strEQ(name, "ERROR_TABLE_BASE_kdb5")) #ifdef ERROR_TABLE_BASE_kdb5 return ERROR_TABLE_BASE_kdb5; #else goto not_there; #endif if (strEQ(name, "ERROR_TABLE_BASE_krb5")) #ifdef ERROR_TABLE_BASE_krb5 return ERROR_TABLE_BASE_krb5; #else goto not_there; #endif if (strEQ(name, "ERROR_TABLE_BASE_kv5m")) #ifdef ERROR_TABLE_BASE_kv5m return ERROR_TABLE_BASE_kv5m; #else goto not_there; #endif break; case 'F': if (strEQ(name, "FALSE")) #ifdef FALSE return FALSE; #else goto not_there; #endif if (strEQ(name, "FAR")) #ifdef FAR return FAR; #else goto not_there; #endif break; case 'G': break; case 'H': if (strEQ(name, "HAS_LABS")) #ifdef HAS_LABS return HAS_LABS; #else goto not_there; #endif if (strEQ(name, "HAS_VOID_TYPE")) #ifdef HAS_VOID_TYPE return HAS_VOID_TYPE; #else goto not_there; #endif if (strEQ(name, "HAVE_SRAND")) #ifdef HAVE_SRAND return HAVE_SRAND; #else goto not_there; #endif if (strEQ(name, "HAVE_STDARG_H")) #ifdef HAVE_STDARG_H return HAVE_STDARG_H; #else goto not_there; #endif if (strEQ(name, "HAVE_SYS_TYPES_H")) #ifdef HAVE_SYS_TYPES_H return HAVE_SYS_TYPES_H; #else goto not_there; #endif break; case 'I': if (strEQ(name, "INTERFACE")) #ifdef INTERFACE return INTERFACE; #else goto not_there; #endif if (strEQ(name, "INTERFACE_C")) #ifdef INTERFACE_C return INTERFACE_C; #else goto not_there; #endif break; case 'J': break; case 'K': if (strEQ(name, "KDC_OPT_ALLOW_POSTDATE")) #ifdef KDC_OPT_ALLOW_POSTDATE return KDC_OPT_ALLOW_POSTDATE; #else goto not_there; #endif if (strEQ(name, "KDC_OPT_ENC_TKT_IN_SKEY")) #ifdef KDC_OPT_ENC_TKT_IN_SKEY return KDC_OPT_ENC_TKT_IN_SKEY; #else goto not_there; #endif if (strEQ(name, "KDC_OPT_FORWARDABLE")) #ifdef KDC_OPT_FORWARDABLE return KDC_OPT_FORWARDABLE; #else goto not_there; #endif if (strEQ(name, "KDC_OPT_FORWARDED")) #ifdef KDC_OPT_FORWARDED return KDC_OPT_FORWARDED; #else goto not_there; #endif if (strEQ(name, "KDC_OPT_POSTDATED")) #ifdef KDC_OPT_POSTDATED return KDC_OPT_POSTDATED; #else goto not_there; #endif if (strEQ(name, "KDC_OPT_PROXIABLE")) #ifdef KDC_OPT_PROXIABLE return KDC_OPT_PROXIABLE; #else goto not_there; #endif if (strEQ(name, "KDC_OPT_PROXY")) #ifdef KDC_OPT_PROXY return KDC_OPT_PROXY; #else goto not_there; #endif if (strEQ(name, "KDC_OPT_RENEW")) #ifdef KDC_OPT_RENEW return KDC_OPT_RENEW; #else goto not_there; #endif if (strEQ(name, "KDC_OPT_RENEWABLE")) #ifdef KDC_OPT_RENEWABLE return KDC_OPT_RENEWABLE; #else goto not_there; #endif if (strEQ(name, "KDC_OPT_RENEWABLE_OK")) #ifdef KDC_OPT_RENEWABLE_OK return KDC_OPT_RENEWABLE_OK; #else goto not_there; #endif if (strEQ(name, "KDC_OPT_VALIDATE")) #ifdef KDC_OPT_VALIDATE return KDC_OPT_VALIDATE; #else goto not_there; #endif if (strEQ(name, "KDC_TKT_COMMON_MASK")) #ifdef KDC_TKT_COMMON_MASK return KDC_TKT_COMMON_MASK; #else goto not_there; #endif if (strEQ(name, "KRB5DES_BAD_KEYPAR")) #ifdef KRB5DES_BAD_KEYPAR return KRB5DES_BAD_KEYPAR; #else goto not_there; #endif if (strEQ(name, "KRB5DES_WEAK_KEY")) #ifdef KRB5DES_WEAK_KEY return KRB5DES_WEAK_KEY; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_BADOPTION")) #ifdef KRB5KDC_ERR_BADOPTION return KRB5KDC_ERR_BADOPTION; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_BAD_PVNO")) #ifdef KRB5KDC_ERR_BAD_PVNO return KRB5KDC_ERR_BAD_PVNO; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_CANNOT_POSTDATE")) #ifdef KRB5KDC_ERR_CANNOT_POSTDATE return KRB5KDC_ERR_CANNOT_POSTDATE; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_CLIENT_NOTYET")) #ifdef KRB5KDC_ERR_CLIENT_NOTYET return KRB5KDC_ERR_CLIENT_NOTYET; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_CLIENT_REVOKED")) #ifdef KRB5KDC_ERR_CLIENT_REVOKED return KRB5KDC_ERR_CLIENT_REVOKED; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_C_OLD_MAST_KVNO")) #ifdef KRB5KDC_ERR_C_OLD_MAST_KVNO return KRB5KDC_ERR_C_OLD_MAST_KVNO; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN")) #ifdef KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN return KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_ETYPE_NOSUPP")) #ifdef KRB5KDC_ERR_ETYPE_NOSUPP return KRB5KDC_ERR_ETYPE_NOSUPP; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_KEY_EXP")) #ifdef KRB5KDC_ERR_KEY_EXP return KRB5KDC_ERR_KEY_EXP; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_NAME_EXP")) #ifdef KRB5KDC_ERR_NAME_EXP return KRB5KDC_ERR_NAME_EXP; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_NEVER_VALID")) #ifdef KRB5KDC_ERR_NEVER_VALID return KRB5KDC_ERR_NEVER_VALID; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_NONE")) #ifdef KRB5KDC_ERR_NONE return KRB5KDC_ERR_NONE; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_NULL_KEY")) #ifdef KRB5KDC_ERR_NULL_KEY return KRB5KDC_ERR_NULL_KEY; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_PADATA_TYPE_NOSUPP")) #ifdef KRB5KDC_ERR_PADATA_TYPE_NOSUPP return KRB5KDC_ERR_PADATA_TYPE_NOSUPP; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_POLICY")) #ifdef KRB5KDC_ERR_POLICY return KRB5KDC_ERR_POLICY; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_PREAUTH_FAILED")) #ifdef KRB5KDC_ERR_PREAUTH_FAILED return KRB5KDC_ERR_PREAUTH_FAILED; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_PREAUTH_REQUIRED")) #ifdef KRB5KDC_ERR_PREAUTH_REQUIRED return KRB5KDC_ERR_PREAUTH_REQUIRED; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_PRINCIPAL_NOT_UNIQUE")) #ifdef KRB5KDC_ERR_PRINCIPAL_NOT_UNIQUE return KRB5KDC_ERR_PRINCIPAL_NOT_UNIQUE; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_SERVER_NOMATCH")) #ifdef KRB5KDC_ERR_SERVER_NOMATCH return KRB5KDC_ERR_SERVER_NOMATCH; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_SERVICE_EXP")) #ifdef KRB5KDC_ERR_SERVICE_EXP return KRB5KDC_ERR_SERVICE_EXP; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_SERVICE_NOTYET")) #ifdef KRB5KDC_ERR_SERVICE_NOTYET return KRB5KDC_ERR_SERVICE_NOTYET; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_SERVICE_REVOKED")) #ifdef KRB5KDC_ERR_SERVICE_REVOKED return KRB5KDC_ERR_SERVICE_REVOKED; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_SUMTYPE_NOSUPP")) #ifdef KRB5KDC_ERR_SUMTYPE_NOSUPP return KRB5KDC_ERR_SUMTYPE_NOSUPP; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_S_OLD_MAST_KVNO")) #ifdef KRB5KDC_ERR_S_OLD_MAST_KVNO return KRB5KDC_ERR_S_OLD_MAST_KVNO; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN")) #ifdef KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN return KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_TGT_REVOKED")) #ifdef KRB5KDC_ERR_TGT_REVOKED return KRB5KDC_ERR_TGT_REVOKED; #else goto not_there; #endif if (strEQ(name, "KRB5KDC_ERR_TRTYPE_NOSUPP")) #ifdef KRB5KDC_ERR_TRTYPE_NOSUPP return KRB5KDC_ERR_TRTYPE_NOSUPP; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_BADADDR")) #ifdef KRB5KRB_AP_ERR_BADADDR return KRB5KRB_AP_ERR_BADADDR; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_BADDIRECTION")) #ifdef KRB5KRB_AP_ERR_BADDIRECTION return KRB5KRB_AP_ERR_BADDIRECTION; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_BADKEYVER")) #ifdef KRB5KRB_AP_ERR_BADKEYVER return KRB5KRB_AP_ERR_BADKEYVER; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_BADMATCH")) #ifdef KRB5KRB_AP_ERR_BADMATCH return KRB5KRB_AP_ERR_BADMATCH; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_BADORDER")) #ifdef KRB5KRB_AP_ERR_BADORDER return KRB5KRB_AP_ERR_BADORDER; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_BADSEQ")) #ifdef KRB5KRB_AP_ERR_BADSEQ return KRB5KRB_AP_ERR_BADSEQ; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_BADVERSION")) #ifdef KRB5KRB_AP_ERR_BADVERSION return KRB5KRB_AP_ERR_BADVERSION; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_BAD_INTEGRITY")) #ifdef KRB5KRB_AP_ERR_BAD_INTEGRITY return KRB5KRB_AP_ERR_BAD_INTEGRITY; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_ILL_CR_TKT")) #ifdef KRB5KRB_AP_ERR_ILL_CR_TKT return KRB5KRB_AP_ERR_ILL_CR_TKT; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_INAPP_CKSUM")) #ifdef KRB5KRB_AP_ERR_INAPP_CKSUM return KRB5KRB_AP_ERR_INAPP_CKSUM; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_METHOD")) #ifdef KRB5KRB_AP_ERR_METHOD return KRB5KRB_AP_ERR_METHOD; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_MODIFIED")) #ifdef KRB5KRB_AP_ERR_MODIFIED return KRB5KRB_AP_ERR_MODIFIED; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_MSG_TYPE")) #ifdef KRB5KRB_AP_ERR_MSG_TYPE return KRB5KRB_AP_ERR_MSG_TYPE; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_MUT_FAIL")) #ifdef KRB5KRB_AP_ERR_MUT_FAIL return KRB5KRB_AP_ERR_MUT_FAIL; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_NOKEY")) #ifdef KRB5KRB_AP_ERR_NOKEY return KRB5KRB_AP_ERR_NOKEY; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_NOT_US")) #ifdef KRB5KRB_AP_ERR_NOT_US return KRB5KRB_AP_ERR_NOT_US; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_REPEAT")) #ifdef KRB5KRB_AP_ERR_REPEAT return KRB5KRB_AP_ERR_REPEAT; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_SKEW")) #ifdef KRB5KRB_AP_ERR_SKEW return KRB5KRB_AP_ERR_SKEW; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_TKT_EXPIRED")) #ifdef KRB5KRB_AP_ERR_TKT_EXPIRED return KRB5KRB_AP_ERR_TKT_EXPIRED; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_TKT_INVALID")) #ifdef KRB5KRB_AP_ERR_TKT_INVALID return KRB5KRB_AP_ERR_TKT_INVALID; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_TKT_NYV")) #ifdef KRB5KRB_AP_ERR_TKT_NYV return KRB5KRB_AP_ERR_TKT_NYV; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_ERR_V4_REPLY")) #ifdef KRB5KRB_AP_ERR_V4_REPLY return KRB5KRB_AP_ERR_V4_REPLY; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_AP_WRONG_PRINC")) #ifdef KRB5KRB_AP_WRONG_PRINC return KRB5KRB_AP_WRONG_PRINC; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_ERR_FIELD_TOOLONG")) #ifdef KRB5KRB_ERR_FIELD_TOOLONG return KRB5KRB_ERR_FIELD_TOOLONG; #else goto not_there; #endif if (strEQ(name, "KRB5KRB_ERR_GENERIC")) #ifdef KRB5KRB_ERR_GENERIC return KRB5KRB_ERR_GENERIC; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_100")) #ifdef KRB5PLACEHOLD_100 return KRB5PLACEHOLD_100; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_101")) #ifdef KRB5PLACEHOLD_101 return KRB5PLACEHOLD_101; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_102")) #ifdef KRB5PLACEHOLD_102 return KRB5PLACEHOLD_102; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_103")) #ifdef KRB5PLACEHOLD_103 return KRB5PLACEHOLD_103; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_104")) #ifdef KRB5PLACEHOLD_104 return KRB5PLACEHOLD_104; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_105")) #ifdef KRB5PLACEHOLD_105 return KRB5PLACEHOLD_105; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_106")) #ifdef KRB5PLACEHOLD_106 return KRB5PLACEHOLD_106; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_107")) #ifdef KRB5PLACEHOLD_107 return KRB5PLACEHOLD_107; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_108")) #ifdef KRB5PLACEHOLD_108 return KRB5PLACEHOLD_108; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_109")) #ifdef KRB5PLACEHOLD_109 return KRB5PLACEHOLD_109; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_110")) #ifdef KRB5PLACEHOLD_110 return KRB5PLACEHOLD_110; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_111")) #ifdef KRB5PLACEHOLD_111 return KRB5PLACEHOLD_111; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_112")) #ifdef KRB5PLACEHOLD_112 return KRB5PLACEHOLD_112; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_113")) #ifdef KRB5PLACEHOLD_113 return KRB5PLACEHOLD_113; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_114")) #ifdef KRB5PLACEHOLD_114 return KRB5PLACEHOLD_114; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_115")) #ifdef KRB5PLACEHOLD_115 return KRB5PLACEHOLD_115; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_116")) #ifdef KRB5PLACEHOLD_116 return KRB5PLACEHOLD_116; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_117")) #ifdef KRB5PLACEHOLD_117 return KRB5PLACEHOLD_117; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_118")) #ifdef KRB5PLACEHOLD_118 return KRB5PLACEHOLD_118; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_119")) #ifdef KRB5PLACEHOLD_119 return KRB5PLACEHOLD_119; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_120")) #ifdef KRB5PLACEHOLD_120 return KRB5PLACEHOLD_120; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_121")) #ifdef KRB5PLACEHOLD_121 return KRB5PLACEHOLD_121; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_122")) #ifdef KRB5PLACEHOLD_122 return KRB5PLACEHOLD_122; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_123")) #ifdef KRB5PLACEHOLD_123 return KRB5PLACEHOLD_123; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_124")) #ifdef KRB5PLACEHOLD_124 return KRB5PLACEHOLD_124; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_125")) #ifdef KRB5PLACEHOLD_125 return KRB5PLACEHOLD_125; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_126")) #ifdef KRB5PLACEHOLD_126 return KRB5PLACEHOLD_126; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_127")) #ifdef KRB5PLACEHOLD_127 return KRB5PLACEHOLD_127; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_27")) #ifdef KRB5PLACEHOLD_27 return KRB5PLACEHOLD_27; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_28")) #ifdef KRB5PLACEHOLD_28 return KRB5PLACEHOLD_28; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_29")) #ifdef KRB5PLACEHOLD_29 return KRB5PLACEHOLD_29; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_30")) #ifdef KRB5PLACEHOLD_30 return KRB5PLACEHOLD_30; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_51")) #ifdef KRB5PLACEHOLD_51 return KRB5PLACEHOLD_51; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_52")) #ifdef KRB5PLACEHOLD_52 return KRB5PLACEHOLD_52; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_53")) #ifdef KRB5PLACEHOLD_53 return KRB5PLACEHOLD_53; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_54")) #ifdef KRB5PLACEHOLD_54 return KRB5PLACEHOLD_54; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_55")) #ifdef KRB5PLACEHOLD_55 return KRB5PLACEHOLD_55; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_56")) #ifdef KRB5PLACEHOLD_56 return KRB5PLACEHOLD_56; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_57")) #ifdef KRB5PLACEHOLD_57 return KRB5PLACEHOLD_57; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_58")) #ifdef KRB5PLACEHOLD_58 return KRB5PLACEHOLD_58; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_59")) #ifdef KRB5PLACEHOLD_59 return KRB5PLACEHOLD_59; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_62")) #ifdef KRB5PLACEHOLD_62 return KRB5PLACEHOLD_62; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_63")) #ifdef KRB5PLACEHOLD_63 return KRB5PLACEHOLD_63; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_64")) #ifdef KRB5PLACEHOLD_64 return KRB5PLACEHOLD_64; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_65")) #ifdef KRB5PLACEHOLD_65 return KRB5PLACEHOLD_65; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_66")) #ifdef KRB5PLACEHOLD_66 return KRB5PLACEHOLD_66; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_67")) #ifdef KRB5PLACEHOLD_67 return KRB5PLACEHOLD_67; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_68")) #ifdef KRB5PLACEHOLD_68 return KRB5PLACEHOLD_68; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_69")) #ifdef KRB5PLACEHOLD_69 return KRB5PLACEHOLD_69; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_70")) #ifdef KRB5PLACEHOLD_70 return KRB5PLACEHOLD_70; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_71")) #ifdef KRB5PLACEHOLD_71 return KRB5PLACEHOLD_71; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_72")) #ifdef KRB5PLACEHOLD_72 return KRB5PLACEHOLD_72; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_73")) #ifdef KRB5PLACEHOLD_73 return KRB5PLACEHOLD_73; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_74")) #ifdef KRB5PLACEHOLD_74 return KRB5PLACEHOLD_74; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_75")) #ifdef KRB5PLACEHOLD_75 return KRB5PLACEHOLD_75; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_76")) #ifdef KRB5PLACEHOLD_76 return KRB5PLACEHOLD_76; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_77")) #ifdef KRB5PLACEHOLD_77 return KRB5PLACEHOLD_77; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_78")) #ifdef KRB5PLACEHOLD_78 return KRB5PLACEHOLD_78; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_79")) #ifdef KRB5PLACEHOLD_79 return KRB5PLACEHOLD_79; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_80")) #ifdef KRB5PLACEHOLD_80 return KRB5PLACEHOLD_80; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_81")) #ifdef KRB5PLACEHOLD_81 return KRB5PLACEHOLD_81; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_82")) #ifdef KRB5PLACEHOLD_82 return KRB5PLACEHOLD_82; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_83")) #ifdef KRB5PLACEHOLD_83 return KRB5PLACEHOLD_83; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_84")) #ifdef KRB5PLACEHOLD_84 return KRB5PLACEHOLD_84; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_85")) #ifdef KRB5PLACEHOLD_85 return KRB5PLACEHOLD_85; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_86")) #ifdef KRB5PLACEHOLD_86 return KRB5PLACEHOLD_86; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_87")) #ifdef KRB5PLACEHOLD_87 return KRB5PLACEHOLD_87; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_88")) #ifdef KRB5PLACEHOLD_88 return KRB5PLACEHOLD_88; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_89")) #ifdef KRB5PLACEHOLD_89 return KRB5PLACEHOLD_89; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_90")) #ifdef KRB5PLACEHOLD_90 return KRB5PLACEHOLD_90; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_91")) #ifdef KRB5PLACEHOLD_91 return KRB5PLACEHOLD_91; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_92")) #ifdef KRB5PLACEHOLD_92 return KRB5PLACEHOLD_92; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_93")) #ifdef KRB5PLACEHOLD_93 return KRB5PLACEHOLD_93; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_94")) #ifdef KRB5PLACEHOLD_94 return KRB5PLACEHOLD_94; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_95")) #ifdef KRB5PLACEHOLD_95 return KRB5PLACEHOLD_95; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_96")) #ifdef KRB5PLACEHOLD_96 return KRB5PLACEHOLD_96; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_97")) #ifdef KRB5PLACEHOLD_97 return KRB5PLACEHOLD_97; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_98")) #ifdef KRB5PLACEHOLD_98 return KRB5PLACEHOLD_98; #else goto not_there; #endif if (strEQ(name, "KRB5PLACEHOLD_99")) #ifdef KRB5PLACEHOLD_99 return KRB5PLACEHOLD_99; #else goto not_there; #endif if (strEQ(name, "KRB5_ALTAUTH_ATT_CHALLENGE_RESPONSE")) #ifdef KRB5_ALTAUTH_ATT_CHALLENGE_RESPONSE return KRB5_ALTAUTH_ATT_CHALLENGE_RESPONSE; #else goto not_there; #endif if (strEQ(name, "KRB5_AP_REP")) #ifdef KRB5_AP_REP return KRB5_AP_REP; #else goto not_there; #endif if (strEQ(name, "KRB5_AP_REQ")) #ifdef KRB5_AP_REQ return KRB5_AP_REQ; #else goto not_there; #endif if (strEQ(name, "KRB5_AS_REP")) #ifdef KRB5_AS_REP return KRB5_AS_REP; #else goto not_there; #endif if (strEQ(name, "KRB5_AS_REQ")) #ifdef KRB5_AS_REQ return KRB5_AS_REQ; #else goto not_there; #endif if (strEQ(name, "KRB5_AUTHDATA_OSF_DCE")) #ifdef KRB5_AUTHDATA_OSF_DCE return KRB5_AUTHDATA_OSF_DCE; #else goto not_there; #endif if (strEQ(name, "KRB5_AUTHDATA_SESAME")) #ifdef KRB5_AUTHDATA_SESAME return KRB5_AUTHDATA_SESAME; #else goto not_there; #endif if (strEQ(name, "KRB5_AUTH_CONTEXT_DO_SEQUENCE")) #ifdef KRB5_AUTH_CONTEXT_DO_SEQUENCE return KRB5_AUTH_CONTEXT_DO_SEQUENCE; #else goto not_there; #endif if (strEQ(name, "KRB5_AUTH_CONTEXT_DO_TIME")) #ifdef KRB5_AUTH_CONTEXT_DO_TIME return KRB5_AUTH_CONTEXT_DO_TIME; #else goto not_there; #endif if (strEQ(name, "KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR")) #ifdef KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR return KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR; #else goto not_there; #endif if (strEQ(name, "KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR")) #ifdef KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR return KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR; #else goto not_there; #endif if (strEQ(name, "KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR")) #ifdef KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR return KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR; #else goto not_there; #endif if (strEQ(name, "KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR")) #ifdef KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR return KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR; #else goto not_there; #endif if (strEQ(name, "KRB5_AUTH_CONTEXT_RET_SEQUENCE")) #ifdef KRB5_AUTH_CONTEXT_RET_SEQUENCE return KRB5_AUTH_CONTEXT_RET_SEQUENCE; #else goto not_there; #endif if (strEQ(name, "KRB5_AUTH_CONTEXT_RET_TIME")) #ifdef KRB5_AUTH_CONTEXT_RET_TIME return KRB5_AUTH_CONTEXT_RET_TIME; #else goto not_there; #endif if (strEQ(name, "KRB5_BADMSGTYPE")) #ifdef KRB5_BADMSGTYPE return KRB5_BADMSGTYPE; #else goto not_there; #endif if (strEQ(name, "KRB5_BAD_ENCTYPE")) #ifdef KRB5_BAD_ENCTYPE return KRB5_BAD_ENCTYPE; #else goto not_there; #endif if (strEQ(name, "KRB5_BAD_KEYSIZE")) #ifdef KRB5_BAD_KEYSIZE return KRB5_BAD_KEYSIZE; #else goto not_there; #endif if (strEQ(name, "KRB5_BAD_MSIZE")) #ifdef KRB5_BAD_MSIZE return KRB5_BAD_MSIZE; #else goto not_there; #endif if (strEQ(name, "KRB5_CCACHE_BADVNO")) #ifdef KRB5_CCACHE_BADVNO return KRB5_CCACHE_BADVNO; #else goto not_there; #endif if (strEQ(name, "KRB5_CC_BADNAME")) #ifdef KRB5_CC_BADNAME return KRB5_CC_BADNAME; #else goto not_there; #endif if (strEQ(name, "KRB5_CC_END")) #ifdef KRB5_CC_END return KRB5_CC_END; #else goto not_there; #endif if (strEQ(name, "KRB5_CC_FORMAT")) #ifdef KRB5_CC_FORMAT return KRB5_CC_FORMAT; #else goto not_there; #endif if (strEQ(name, "KRB5_CC_IO")) #ifdef KRB5_CC_IO return KRB5_CC_IO; #else goto not_there; #endif if (strEQ(name, "KRB5_CC_NOMEM")) #ifdef KRB5_CC_NOMEM return KRB5_CC_NOMEM; #else goto not_there; #endif if (strEQ(name, "KRB5_CC_NOTFOUND")) #ifdef KRB5_CC_NOTFOUND return KRB5_CC_NOTFOUND; #else goto not_there; #endif if (strEQ(name, "KRB5_CC_TYPE_EXISTS")) #ifdef KRB5_CC_TYPE_EXISTS return KRB5_CC_TYPE_EXISTS; #else goto not_there; #endif if (strEQ(name, "KRB5_CC_UNKNOWN_TYPE")) #ifdef KRB5_CC_UNKNOWN_TYPE return KRB5_CC_UNKNOWN_TYPE; #else goto not_there; #endif if (strEQ(name, "KRB5_CC_WRITE")) #ifdef KRB5_CC_WRITE return KRB5_CC_WRITE; #else goto not_there; #endif if (strEQ(name, "KRB5_CONFIG_BADFORMAT")) #ifdef KRB5_CONFIG_BADFORMAT return KRB5_CONFIG_BADFORMAT; #else goto not_there; #endif if (strEQ(name, "KRB5_CONFIG_CANTOPEN")) #ifdef KRB5_CONFIG_CANTOPEN return KRB5_CONFIG_CANTOPEN; #else goto not_there; #endif if (strEQ(name, "KRB5_CONFIG_NODEFREALM")) #ifdef KRB5_CONFIG_NODEFREALM return KRB5_CONFIG_NODEFREALM; #else goto not_there; #endif if (strEQ(name, "KRB5_CONFIG_NOTENUFSPACE")) #ifdef KRB5_CONFIG_NOTENUFSPACE return KRB5_CONFIG_NOTENUFSPACE; #else goto not_there; #endif if (strEQ(name, "KRB5_CRED")) #ifdef KRB5_CRED return KRB5_CRED; #else goto not_there; #endif if (strEQ(name, "KRB5_CRYPTO_INTERNAL")) #ifdef KRB5_CRYPTO_INTERNAL return KRB5_CRYPTO_INTERNAL; #else goto not_there; #endif if (strEQ(name, "KRB5_CYBERSAFE_SECUREID")) #ifdef KRB5_CYBERSAFE_SECUREID return KRB5_CYBERSAFE_SECUREID; #else goto not_there; #endif if (strEQ(name, "KRB5_DECLSPEC")) #ifdef KRB5_DECLSPEC return KRB5_DECLSPEC; #else goto not_there; #endif if (strEQ(name, "KRB5_DLLIMP")) #ifdef KRB5_DLLIMP return KRB5_DLLIMP; #else goto not_there; #endif if (strEQ(name, "KRB5_DOMAIN_X500_COMPRESS")) #ifdef KRB5_DOMAIN_X500_COMPRESS return KRB5_DOMAIN_X500_COMPRESS; #else goto not_there; #endif if (strEQ(name, "KRB5_ERROR")) #ifdef KRB5_ERROR return KRB5_ERROR; #else goto not_there; #endif if (strEQ(name, "KRB5_ERR_BAD_HOSTNAME")) #ifdef KRB5_ERR_BAD_HOSTNAME return KRB5_ERR_BAD_HOSTNAME; #else goto not_there; #endif if (strEQ(name, "KRB5_ERR_HOST_REALM_UNKNOWN")) #ifdef KRB5_ERR_HOST_REALM_UNKNOWN return KRB5_ERR_HOST_REALM_UNKNOWN; #else goto not_there; #endif if (strEQ(name, "KRB5_ERR_RCSID")) #ifdef KRB5_ERR_RCSID return KRB5_ERR_RCSID; #else goto not_there; #endif if (strEQ(name, "KRB5_FCC_INTERNAL")) #ifdef KRB5_FCC_INTERNAL return KRB5_FCC_INTERNAL; #else goto not_there; #endif if (strEQ(name, "KRB5_FCC_NOFILE")) #ifdef KRB5_FCC_NOFILE return KRB5_FCC_NOFILE; #else goto not_there; #endif if (strEQ(name, "KRB5_FCC_PERM")) #ifdef KRB5_FCC_PERM return KRB5_FCC_PERM; #else goto not_there; #endif if (strEQ(name, "KRB5_FWD_BAD_PRINCIPAL")) #ifdef KRB5_FWD_BAD_PRINCIPAL return KRB5_FWD_BAD_PRINCIPAL; #else goto not_there; #endif if (strEQ(name, "KRB5_GC_CACHED")) #ifdef KRB5_GC_CACHED return KRB5_GC_CACHED; #else goto not_there; #endif if (strEQ(name, "KRB5_GC_USER_USER")) #ifdef KRB5_GC_USER_USER return KRB5_GC_USER_USER; #else goto not_there; #endif if (strEQ(name, "KRB5_GET_IN_TKT_LOOP")) #ifdef KRB5_GET_IN_TKT_LOOP return KRB5_GET_IN_TKT_LOOP; #else goto not_there; #endif if (strEQ(name, "KRB5_INT16_MAX")) #ifdef KRB5_INT16_MAX return KRB5_INT16_MAX; #else goto not_there; #endif if (strEQ(name, "KRB5_INT16_MIN")) #ifdef KRB5_INT16_MIN return KRB5_INT16_MIN; #else goto not_there; #endif if (strEQ(name, "KRB5_INT32_MAX")) #ifdef KRB5_INT32_MAX return KRB5_INT32_MAX; #else goto not_there; #endif if (strEQ(name, "KRB5_INT32_MIN")) #ifdef KRB5_INT32_MIN return KRB5_INT32_MIN; #else goto not_there; #endif if (strEQ(name, "KRB5_INVALID_FLAGS")) #ifdef KRB5_INVALID_FLAGS return KRB5_INVALID_FLAGS; #else goto not_there; #endif if (strEQ(name, "KRB5_IN_TKT_REALM_MISMATCH")) #ifdef KRB5_IN_TKT_REALM_MISMATCH return KRB5_IN_TKT_REALM_MISMATCH; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_BADLOCKMODE")) #ifdef KRB5_KDB_BADLOCKMODE return KRB5_KDB_BADLOCKMODE; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_BADMASTERKEY")) #ifdef KRB5_KDB_BADMASTERKEY return KRB5_KDB_BADMASTERKEY; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_BADSTORED_MKEY")) #ifdef KRB5_KDB_BADSTORED_MKEY return KRB5_KDB_BADSTORED_MKEY; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_BAD_ENCTYPE")) #ifdef KRB5_KDB_BAD_ENCTYPE return KRB5_KDB_BAD_ENCTYPE; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_BAD_SALTTYPE")) #ifdef KRB5_KDB_BAD_SALTTYPE return KRB5_KDB_BAD_SALTTYPE; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_BAD_VERSION")) #ifdef KRB5_KDB_BAD_VERSION return KRB5_KDB_BAD_VERSION; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_CANTLOCK_DB")) #ifdef KRB5_KDB_CANTLOCK_DB return KRB5_KDB_CANTLOCK_DB; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_CANTREAD_STORED")) #ifdef KRB5_KDB_CANTREAD_STORED return KRB5_KDB_CANTREAD_STORED; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_DBINITED")) #ifdef KRB5_KDB_DBINITED return KRB5_KDB_DBINITED; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_DBNOTINITED")) #ifdef KRB5_KDB_DBNOTINITED return KRB5_KDB_DBNOTINITED; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_DB_CHANGED")) #ifdef KRB5_KDB_DB_CHANGED return KRB5_KDB_DB_CHANGED; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_DB_CORRUPT")) #ifdef KRB5_KDB_DB_CORRUPT return KRB5_KDB_DB_CORRUPT; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_DB_INUSE")) #ifdef KRB5_KDB_DB_INUSE return KRB5_KDB_DB_INUSE; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_ILLDIRECTION")) #ifdef KRB5_KDB_ILLDIRECTION return KRB5_KDB_ILLDIRECTION; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_ILL_WILDCARD")) #ifdef KRB5_KDB_ILL_WILDCARD return KRB5_KDB_ILL_WILDCARD; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_INUSE")) #ifdef KRB5_KDB_INUSE return KRB5_KDB_INUSE; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_INVALIDKEYSIZE")) #ifdef KRB5_KDB_INVALIDKEYSIZE return KRB5_KDB_INVALIDKEYSIZE; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_NOENTRY")) #ifdef KRB5_KDB_NOENTRY return KRB5_KDB_NOENTRY; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_NOMASTERKEY")) #ifdef KRB5_KDB_NOMASTERKEY return KRB5_KDB_NOMASTERKEY; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_NOTLOCKED")) #ifdef KRB5_KDB_NOTLOCKED return KRB5_KDB_NOTLOCKED; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_RCSID")) #ifdef KRB5_KDB_RCSID return KRB5_KDB_RCSID; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_RECURSIVELOCK")) #ifdef KRB5_KDB_RECURSIVELOCK return KRB5_KDB_RECURSIVELOCK; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_TRUNCATED_RECORD")) #ifdef KRB5_KDB_TRUNCATED_RECORD return KRB5_KDB_TRUNCATED_RECORD; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_UK_RERROR")) #ifdef KRB5_KDB_UK_RERROR return KRB5_KDB_UK_RERROR; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_UK_SERROR")) #ifdef KRB5_KDB_UK_SERROR return KRB5_KDB_UK_SERROR; #else goto not_there; #endif if (strEQ(name, "KRB5_KDB_UNAUTH")) #ifdef KRB5_KDB_UNAUTH return KRB5_KDB_UNAUTH; #else goto not_there; #endif if (strEQ(name, "KRB5_KDCREP_MODIFIED")) #ifdef KRB5_KDCREP_MODIFIED return KRB5_KDCREP_MODIFIED; #else goto not_there; #endif if (strEQ(name, "KRB5_KDCREP_SKEW")) #ifdef KRB5_KDCREP_SKEW return KRB5_KDCREP_SKEW; #else goto not_there; #endif if (strEQ(name, "KRB5_KDC_UNREACH")) #ifdef KRB5_KDC_UNREACH return KRB5_KDC_UNREACH; #else goto not_there; #endif if (strEQ(name, "KRB5_KEYTAB_BADVNO")) #ifdef KRB5_KEYTAB_BADVNO return KRB5_KEYTAB_BADVNO; #else goto not_there; #endif if (strEQ(name, "KRB5_KT_BADNAME")) #ifdef KRB5_KT_BADNAME return KRB5_KT_BADNAME; #else goto not_there; #endif if (strEQ(name, "KRB5_KT_END")) #ifdef KRB5_KT_END return KRB5_KT_END; #else goto not_there; #endif if (strEQ(name, "KRB5_KT_IOERR")) #ifdef KRB5_KT_IOERR return KRB5_KT_IOERR; #else goto not_there; #endif if (strEQ(name, "KRB5_KT_KVNONOTFOUND")) #ifdef KRB5_KT_KVNONOTFOUND return KRB5_KT_KVNONOTFOUND; #else goto not_there; #endif if (strEQ(name, "KRB5_KT_NAME_TOOLONG")) #ifdef KRB5_KT_NAME_TOOLONG return KRB5_KT_NAME_TOOLONG; #else goto not_there; #endif if (strEQ(name, "KRB5_KT_NOTFOUND")) #ifdef KRB5_KT_NOTFOUND return KRB5_KT_NOTFOUND; #else goto not_there; #endif if (strEQ(name, "KRB5_KT_NOWRITE")) #ifdef KRB5_KT_NOWRITE return KRB5_KT_NOWRITE; #else goto not_there; #endif if (strEQ(name, "KRB5_KT_TYPE_EXISTS")) #ifdef KRB5_KT_TYPE_EXISTS return KRB5_KT_TYPE_EXISTS; #else goto not_there; #endif if (strEQ(name, "KRB5_KT_UNKNOWN_TYPE")) #ifdef KRB5_KT_UNKNOWN_TYPE return KRB5_KT_UNKNOWN_TYPE; #else goto not_there; #endif if (strEQ(name, "KRB5_LIBOS_BADLOCKFLAG")) #ifdef KRB5_LIBOS_BADLOCKFLAG return KRB5_LIBOS_BADLOCKFLAG; #else goto not_there; #endif if (strEQ(name, "KRB5_LIBOS_BADPWDMATCH")) #ifdef KRB5_LIBOS_BADPWDMATCH return KRB5_LIBOS_BADPWDMATCH; #else goto not_there; #endif if (strEQ(name, "KRB5_LIBOS_CANTREADPWD")) #ifdef KRB5_LIBOS_CANTREADPWD return KRB5_LIBOS_CANTREADPWD; #else goto not_there; #endif if (strEQ(name, "KRB5_LIBOS_PWDINTR")) #ifdef KRB5_LIBOS_PWDINTR return KRB5_LIBOS_PWDINTR; #else goto not_there; #endif if (strEQ(name, "KRB5_LNAME_BADFORMAT")) #ifdef KRB5_LNAME_BADFORMAT return KRB5_LNAME_BADFORMAT; #else goto not_there; #endif if (strEQ(name, "KRB5_LNAME_CANTOPEN")) #ifdef KRB5_LNAME_CANTOPEN return KRB5_LNAME_CANTOPEN; #else goto not_there; #endif if (strEQ(name, "KRB5_LNAME_NOTRANS")) #ifdef KRB5_LNAME_NOTRANS return KRB5_LNAME_NOTRANS; #else goto not_there; #endif if (strEQ(name, "KRB5_LRQ_ALL_LAST_INITIAL")) #ifdef KRB5_LRQ_ALL_LAST_INITIAL return KRB5_LRQ_ALL_LAST_INITIAL; #else goto not_there; #endif if (strEQ(name, "KRB5_LRQ_ALL_LAST_RENEWAL")) #ifdef KRB5_LRQ_ALL_LAST_RENEWAL return KRB5_LRQ_ALL_LAST_RENEWAL; #else goto not_there; #endif if (strEQ(name, "KRB5_LRQ_ALL_LAST_REQ")) #ifdef KRB5_LRQ_ALL_LAST_REQ return KRB5_LRQ_ALL_LAST_REQ; #else goto not_there; #endif if (strEQ(name, "KRB5_LRQ_ALL_LAST_TGT")) #ifdef KRB5_LRQ_ALL_LAST_TGT return KRB5_LRQ_ALL_LAST_TGT; #else goto not_there; #endif if (strEQ(name, "KRB5_LRQ_ALL_LAST_TGT_ISSUED")) #ifdef KRB5_LRQ_ALL_LAST_TGT_ISSUED return KRB5_LRQ_ALL_LAST_TGT_ISSUED; #else goto not_there; #endif if (strEQ(name, "KRB5_LRQ_NONE")) #ifdef KRB5_LRQ_NONE return KRB5_LRQ_NONE; #else goto not_there; #endif if (strEQ(name, "KRB5_LRQ_ONE_LAST_INITIAL")) #ifdef KRB5_LRQ_ONE_LAST_INITIAL return KRB5_LRQ_ONE_LAST_INITIAL; #else goto not_there; #endif if (strEQ(name, "KRB5_LRQ_ONE_LAST_RENEWAL")) #ifdef KRB5_LRQ_ONE_LAST_RENEWAL return KRB5_LRQ_ONE_LAST_RENEWAL; #else goto not_there; #endif if (strEQ(name, "KRB5_LRQ_ONE_LAST_REQ")) #ifdef KRB5_LRQ_ONE_LAST_REQ return KRB5_LRQ_ONE_LAST_REQ; #else goto not_there; #endif if (strEQ(name, "KRB5_LRQ_ONE_LAST_TGT")) #ifdef KRB5_LRQ_ONE_LAST_TGT return KRB5_LRQ_ONE_LAST_TGT; #else goto not_there; #endif if (strEQ(name, "KRB5_LRQ_ONE_LAST_TGT_ISSUED")) #ifdef KRB5_LRQ_ONE_LAST_TGT_ISSUED return KRB5_LRQ_ONE_LAST_TGT_ISSUED; #else goto not_there; #endif if (strEQ(name, "KRB5_MUTUAL_FAILED")) #ifdef KRB5_MUTUAL_FAILED return KRB5_MUTUAL_FAILED; #else goto not_there; #endif if (strEQ(name, "KRB5_NOCREDS_SUPPLIED")) #ifdef KRB5_NOCREDS_SUPPLIED return KRB5_NOCREDS_SUPPLIED; #else goto not_there; #endif if (strEQ(name, "KRB5_NO_2ND_TKT")) #ifdef KRB5_NO_2ND_TKT return KRB5_NO_2ND_TKT; #else goto not_there; #endif if (strEQ(name, "KRB5_NO_LOCALNAME")) #ifdef KRB5_NO_LOCALNAME return KRB5_NO_LOCALNAME; #else goto not_there; #endif if (strEQ(name, "KRB5_NO_TKT_IN_RLM")) #ifdef KRB5_NO_TKT_IN_RLM return KRB5_NO_TKT_IN_RLM; #else goto not_there; #endif if (strEQ(name, "KRB5_NO_TKT_SUPPLIED")) #ifdef KRB5_NO_TKT_SUPPLIED return KRB5_NO_TKT_SUPPLIED; #else goto not_there; #endif if (strEQ(name, "KRB5_NT_PRINCIPAL")) #ifdef KRB5_NT_PRINCIPAL return KRB5_NT_PRINCIPAL; #else goto not_there; #endif if (strEQ(name, "KRB5_NT_SRV_HST")) #ifdef KRB5_NT_SRV_HST return KRB5_NT_SRV_HST; #else goto not_there; #endif if (strEQ(name, "KRB5_NT_SRV_INST")) #ifdef KRB5_NT_SRV_INST return KRB5_NT_SRV_INST; #else goto not_there; #endif if (strEQ(name, "KRB5_NT_SRV_XHST")) #ifdef KRB5_NT_SRV_XHST return KRB5_NT_SRV_XHST; #else goto not_there; #endif if (strEQ(name, "KRB5_NT_UID")) #ifdef KRB5_NT_UID return KRB5_NT_UID; #else goto not_there; #endif if (strEQ(name, "KRB5_NT_UNKNOWN")) #ifdef KRB5_NT_UNKNOWN return KRB5_NT_UNKNOWN; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_AFS3_SALT")) #ifdef KRB5_PADATA_AFS3_SALT return KRB5_PADATA_AFS3_SALT; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_AP_REQ")) #ifdef KRB5_PADATA_AP_REQ return KRB5_PADATA_AP_REQ; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_DASS")) #ifdef KRB5_PADATA_DASS return KRB5_PADATA_DASS; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_ENC_ENCKEY")) #ifdef KRB5_PADATA_ENC_ENCKEY return KRB5_PADATA_ENC_ENCKEY; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_ENC_SANDIA_SECURID")) #ifdef KRB5_PADATA_ENC_SANDIA_SECURID return KRB5_PADATA_ENC_SANDIA_SECURID; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_ENC_TIMESTAMP")) #ifdef KRB5_PADATA_ENC_TIMESTAMP return KRB5_PADATA_ENC_TIMESTAMP; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_ENC_UNIX_TIME")) #ifdef KRB5_PADATA_ENC_UNIX_TIME return KRB5_PADATA_ENC_UNIX_TIME; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_ETYPE_INFO")) #ifdef KRB5_PADATA_ETYPE_INFO return KRB5_PADATA_ETYPE_INFO; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_NONE")) #ifdef KRB5_PADATA_NONE return KRB5_PADATA_NONE; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_OSF_DCE")) #ifdef KRB5_PADATA_OSF_DCE return KRB5_PADATA_OSF_DCE; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_PW_SALT")) #ifdef KRB5_PADATA_PW_SALT return KRB5_PADATA_PW_SALT; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_SAM_CHALLENGE")) #ifdef KRB5_PADATA_SAM_CHALLENGE return KRB5_PADATA_SAM_CHALLENGE; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_SAM_RESPONSE")) #ifdef KRB5_PADATA_SAM_RESPONSE return KRB5_PADATA_SAM_RESPONSE; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_SESAME")) #ifdef KRB5_PADATA_SESAME return KRB5_PADATA_SESAME; #else goto not_there; #endif if (strEQ(name, "KRB5_PADATA_TGS_REQ")) #ifdef KRB5_PADATA_TGS_REQ return KRB5_PADATA_TGS_REQ; #else goto not_there; #endif if (strEQ(name, "KRB5_PARSE_ILLCHAR")) #ifdef KRB5_PARSE_ILLCHAR return KRB5_PARSE_ILLCHAR; #else goto not_there; #endif if (strEQ(name, "KRB5_PARSE_MALFORMED")) #ifdef KRB5_PARSE_MALFORMED return KRB5_PARSE_MALFORMED; #else goto not_there; #endif if (strEQ(name, "KRB5_PREAUTH_BAD_TYPE")) #ifdef KRB5_PREAUTH_BAD_TYPE return KRB5_PREAUTH_BAD_TYPE; #else goto not_there; #endif if (strEQ(name, "KRB5_PREAUTH_FAILED")) #ifdef KRB5_PREAUTH_FAILED return KRB5_PREAUTH_FAILED; #else goto not_there; #endif if (strEQ(name, "KRB5_PREAUTH_NO_KEY")) #ifdef KRB5_PREAUTH_NO_KEY return KRB5_PREAUTH_NO_KEY; #else goto not_there; #endif if (strEQ(name, "KRB5_PRINC_NOMATCH")) #ifdef KRB5_PRINC_NOMATCH return KRB5_PRINC_NOMATCH; #else goto not_there; #endif if (strEQ(name, "KRB5_PRIV")) #ifdef KRB5_PRIV return KRB5_PRIV; #else goto not_there; #endif if (strEQ(name, "KRB5_PROG_ATYPE_NOSUPP")) #ifdef KRB5_PROG_ATYPE_NOSUPP return KRB5_PROG_ATYPE_NOSUPP; #else goto not_there; #endif if (strEQ(name, "KRB5_PROG_ETYPE_NOSUPP")) #ifdef KRB5_PROG_ETYPE_NOSUPP return KRB5_PROG_ETYPE_NOSUPP; #else goto not_there; #endif if (strEQ(name, "KRB5_PROG_KEYTYPE_NOSUPP")) #ifdef KRB5_PROG_KEYTYPE_NOSUPP return KRB5_PROG_KEYTYPE_NOSUPP; #else goto not_there; #endif if (strEQ(name, "KRB5_PROG_SUMTYPE_NOSUPP")) #ifdef KRB5_PROG_SUMTYPE_NOSUPP return KRB5_PROG_SUMTYPE_NOSUPP; #else goto not_there; #endif if (strEQ(name, "KRB5_PROVIDE_PROTOTYPES")) #ifdef KRB5_PROVIDE_PROTOTYPES return KRB5_PROVIDE_PROTOTYPES; #else goto not_there; #endif if (strEQ(name, "KRB5_PVNO")) #ifdef KRB5_PVNO return KRB5_PVNO; #else goto not_there; #endif if (strEQ(name, "KRB5_RCACHE_BADVNO")) #ifdef KRB5_RCACHE_BADVNO return KRB5_RCACHE_BADVNO; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_IO")) #ifdef KRB5_RC_IO return KRB5_RC_IO; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_IO_EOF")) #ifdef KRB5_RC_IO_EOF return KRB5_RC_IO_EOF; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_IO_IO")) #ifdef KRB5_RC_IO_IO return KRB5_RC_IO_IO; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_IO_MALLOC")) #ifdef KRB5_RC_IO_MALLOC return KRB5_RC_IO_MALLOC; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_IO_PERM")) #ifdef KRB5_RC_IO_PERM return KRB5_RC_IO_PERM; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_IO_SPACE")) #ifdef KRB5_RC_IO_SPACE return KRB5_RC_IO_SPACE; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_IO_UNKNOWN")) #ifdef KRB5_RC_IO_UNKNOWN return KRB5_RC_IO_UNKNOWN; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_MALLOC")) #ifdef KRB5_RC_MALLOC return KRB5_RC_MALLOC; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_NOIO")) #ifdef KRB5_RC_NOIO return KRB5_RC_NOIO; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_PARSE")) #ifdef KRB5_RC_PARSE return KRB5_RC_PARSE; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_REPLAY")) #ifdef KRB5_RC_REPLAY return KRB5_RC_REPLAY; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_REQUIRED")) #ifdef KRB5_RC_REQUIRED return KRB5_RC_REQUIRED; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_TYPE_EXISTS")) #ifdef KRB5_RC_TYPE_EXISTS return KRB5_RC_TYPE_EXISTS; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_TYPE_NOTFOUND")) #ifdef KRB5_RC_TYPE_NOTFOUND return KRB5_RC_TYPE_NOTFOUND; #else goto not_there; #endif if (strEQ(name, "KRB5_RC_UNKNOWN")) #ifdef KRB5_RC_UNKNOWN return KRB5_RC_UNKNOWN; #else goto not_there; #endif if (strEQ(name, "KRB5_REALM_BRANCH_CHAR")) #ifdef KRB5_REALM_BRANCH_CHAR return KRB5_REALM_BRANCH_CHAR; #else goto not_there; #endif if (strEQ(name, "KRB5_REALM_CANT_RESOLVE")) #ifdef KRB5_REALM_CANT_RESOLVE return KRB5_REALM_CANT_RESOLVE; #else goto not_there; #endif if (strEQ(name, "KRB5_REALM_UNKNOWN")) #ifdef KRB5_REALM_UNKNOWN return KRB5_REALM_UNKNOWN; #else goto not_there; #endif if (strEQ(name, "KRB5_RECVAUTH_BADAUTHVERS")) #ifdef KRB5_RECVAUTH_BADAUTHVERS return KRB5_RECVAUTH_BADAUTHVERS; #else goto not_there; #endif if (strEQ(name, "KRB5_RECVAUTH_SKIP_VERSION")) #ifdef KRB5_RECVAUTH_SKIP_VERSION return KRB5_RECVAUTH_SKIP_VERSION; #else goto not_there; #endif if (strEQ(name, "KRB5_SAFE")) #ifdef KRB5_SAFE return KRB5_SAFE; #else goto not_there; #endif if (strEQ(name, "KRB5_SAM_MUST_PK_ENCRYPT_SAD")) #ifdef KRB5_SAM_MUST_PK_ENCRYPT_SAD return KRB5_SAM_MUST_PK_ENCRYPT_SAD; #else goto not_there; #endif if (strEQ(name, "KRB5_SAM_SEND_ENCRYPTED_SAD")) #ifdef KRB5_SAM_SEND_ENCRYPTED_SAD return KRB5_SAM_SEND_ENCRYPTED_SAD; #else goto not_there; #endif if (strEQ(name, "KRB5_SAM_UNSUPPORTED")) #ifdef KRB5_SAM_UNSUPPORTED return KRB5_SAM_UNSUPPORTED; #else goto not_there; #endif if (strEQ(name, "KRB5_SAM_USE_SAD_AS_KEY")) #ifdef KRB5_SAM_USE_SAD_AS_KEY return KRB5_SAM_USE_SAD_AS_KEY; #else goto not_there; #endif if (strEQ(name, "KRB5_SENDAUTH_BADAPPLVERS")) #ifdef KRB5_SENDAUTH_BADAPPLVERS return KRB5_SENDAUTH_BADAPPLVERS; #else goto not_there; #endif if (strEQ(name, "KRB5_SENDAUTH_BADAUTHVERS")) #ifdef KRB5_SENDAUTH_BADAUTHVERS return KRB5_SENDAUTH_BADAUTHVERS; #else goto not_there; #endif if (strEQ(name, "KRB5_SENDAUTH_BADRESPONSE")) #ifdef KRB5_SENDAUTH_BADRESPONSE return KRB5_SENDAUTH_BADRESPONSE; #else goto not_there; #endif if (strEQ(name, "KRB5_SENDAUTH_REJECTED")) #ifdef KRB5_SENDAUTH_REJECTED return KRB5_SENDAUTH_REJECTED; #else goto not_there; #endif if (strEQ(name, "KRB5_SERVICE_UNKNOWN")) #ifdef KRB5_SERVICE_UNKNOWN return KRB5_SERVICE_UNKNOWN; #else goto not_there; #endif if (strEQ(name, "KRB5_SNAME_UNSUPP_NAMETYPE")) #ifdef KRB5_SNAME_UNSUPP_NAMETYPE return KRB5_SNAME_UNSUPP_NAMETYPE; #else goto not_there; #endif if (strEQ(name, "KRB5_SYSTYPES__")) #ifdef KRB5_SYSTYPES__ return KRB5_SYSTYPES__; #else goto not_there; #endif if (strEQ(name, "KRB5_TC_MATCH_2ND_TKT")) #ifdef KRB5_TC_MATCH_2ND_TKT return KRB5_TC_MATCH_2ND_TKT; #else goto not_there; #endif if (strEQ(name, "KRB5_TC_MATCH_AUTHDATA")) #ifdef KRB5_TC_MATCH_AUTHDATA return KRB5_TC_MATCH_AUTHDATA; #else goto not_there; #endif if (strEQ(name, "KRB5_TC_MATCH_FLAGS")) #ifdef KRB5_TC_MATCH_FLAGS return KRB5_TC_MATCH_FLAGS; #else goto not_there; #endif if (strEQ(name, "KRB5_TC_MATCH_FLAGS_EXACT")) #ifdef KRB5_TC_MATCH_FLAGS_EXACT return KRB5_TC_MATCH_FLAGS_EXACT; #else goto not_there; #endif if (strEQ(name, "KRB5_TC_MATCH_IS_SKEY")) #ifdef KRB5_TC_MATCH_IS_SKEY return KRB5_TC_MATCH_IS_SKEY; #else goto not_there; #endif if (strEQ(name, "KRB5_TC_MATCH_KTYPE")) #ifdef KRB5_TC_MATCH_KTYPE return KRB5_TC_MATCH_KTYPE; #else goto not_there; #endif if (strEQ(name, "KRB5_TC_MATCH_SRV_NAMEONLY")) #ifdef KRB5_TC_MATCH_SRV_NAMEONLY return KRB5_TC_MATCH_SRV_NAMEONLY; #else goto not_there; #endif if (strEQ(name, "KRB5_TC_MATCH_TIMES")) #ifdef KRB5_TC_MATCH_TIMES return KRB5_TC_MATCH_TIMES; #else goto not_there; #endif if (strEQ(name, "KRB5_TC_MATCH_TIMES_EXACT")) #ifdef KRB5_TC_MATCH_TIMES_EXACT return KRB5_TC_MATCH_TIMES_EXACT; #else goto not_there; #endif if (strEQ(name, "KRB5_TC_OPENCLOSE")) #ifdef KRB5_TC_OPENCLOSE return KRB5_TC_OPENCLOSE; #else goto not_there; #endif if (strEQ(name, "KRB5_TGS_NAME_SIZE")) #ifdef KRB5_TGS_NAME_SIZE return KRB5_TGS_NAME_SIZE; #else goto not_there; #endif if (strEQ(name, "KRB5_TGS_REP")) #ifdef KRB5_TGS_REP return KRB5_TGS_REP; #else goto not_there; #endif if (strEQ(name, "KRB5_TGS_REQ")) #ifdef KRB5_TGS_REQ return KRB5_TGS_REQ; #else goto not_there; #endif if (strEQ(name, "KRB5_TKT_NOT_FORWARDABLE")) #ifdef KRB5_TKT_NOT_FORWARDABLE return KRB5_TKT_NOT_FORWARDABLE; #else goto not_there; #endif if (strEQ(name, "KRB5_TRANS_BADFORMAT")) #ifdef KRB5_TRANS_BADFORMAT return KRB5_TRANS_BADFORMAT; #else goto not_there; #endif if (strEQ(name, "KRB5_TRANS_CANTOPEN")) #ifdef KRB5_TRANS_CANTOPEN return KRB5_TRANS_CANTOPEN; #else goto not_there; #endif if (strEQ(name, "KRB5_WRONG_ETYPE")) #ifdef KRB5_WRONG_ETYPE return KRB5_WRONG_ETYPE; #else goto not_there; #endif if (strEQ(name, "KV5M_ADDRESS")) #ifdef KV5M_ADDRESS return KV5M_ADDRESS; #else goto not_there; #endif if (strEQ(name, "KV5M_ALT_METHOD")) #ifdef KV5M_ALT_METHOD return KV5M_ALT_METHOD; #else goto not_there; #endif if (strEQ(name, "KV5M_AP_REP")) #ifdef KV5M_AP_REP return KV5M_AP_REP; #else goto not_there; #endif if (strEQ(name, "KV5M_AP_REP_ENC_PART")) #ifdef KV5M_AP_REP_ENC_PART return KV5M_AP_REP_ENC_PART; #else goto not_there; #endif if (strEQ(name, "KV5M_AP_REQ")) #ifdef KV5M_AP_REQ return KV5M_AP_REQ; #else goto not_there; #endif if (strEQ(name, "KV5M_AUTHDATA")) #ifdef KV5M_AUTHDATA return KV5M_AUTHDATA; #else goto not_there; #endif if (strEQ(name, "KV5M_AUTHENTICATOR")) #ifdef KV5M_AUTHENTICATOR return KV5M_AUTHENTICATOR; #else goto not_there; #endif if (strEQ(name, "KV5M_AUTH_CONTEXT")) #ifdef KV5M_AUTH_CONTEXT return KV5M_AUTH_CONTEXT; #else goto not_there; #endif if (strEQ(name, "KV5M_CCACHE")) #ifdef KV5M_CCACHE return KV5M_CCACHE; #else goto not_there; #endif if (strEQ(name, "KV5M_CHECKSUM")) #ifdef KV5M_CHECKSUM return KV5M_CHECKSUM; #else goto not_there; #endif if (strEQ(name, "KV5M_CHECKSUM_ENTRY")) #ifdef KV5M_CHECKSUM_ENTRY return KV5M_CHECKSUM_ENTRY; #else goto not_there; #endif if (strEQ(name, "KV5M_CONTEXT")) #ifdef KV5M_CONTEXT return KV5M_CONTEXT; #else goto not_there; #endif if (strEQ(name, "KV5M_CRED")) #ifdef KV5M_CRED return KV5M_CRED; #else goto not_there; #endif if (strEQ(name, "KV5M_CREDS")) #ifdef KV5M_CREDS return KV5M_CREDS; #else goto not_there; #endif if (strEQ(name, "KV5M_CRED_ENC_PART")) #ifdef KV5M_CRED_ENC_PART return KV5M_CRED_ENC_PART; #else goto not_there; #endif if (strEQ(name, "KV5M_CRED_INFO")) #ifdef KV5M_CRED_INFO return KV5M_CRED_INFO; #else goto not_there; #endif if (strEQ(name, "KV5M_CRYPTOSYSTEM_ENTRY")) #ifdef KV5M_CRYPTOSYSTEM_ENTRY return KV5M_CRYPTOSYSTEM_ENTRY; #else goto not_there; #endif if (strEQ(name, "KV5M_CS_TABLE_ENTRY")) #ifdef KV5M_CS_TABLE_ENTRY return KV5M_CS_TABLE_ENTRY; #else goto not_there; #endif if (strEQ(name, "KV5M_DATA")) #ifdef KV5M_DATA return KV5M_DATA; #else goto not_there; #endif if (strEQ(name, "KV5M_DB_CONTEXT")) #ifdef KV5M_DB_CONTEXT return KV5M_DB_CONTEXT; #else goto not_there; #endif if (strEQ(name, "KV5M_ENCRYPT_BLOCK")) #ifdef KV5M_ENCRYPT_BLOCK return KV5M_ENCRYPT_BLOCK; #else goto not_there; #endif if (strEQ(name, "KV5M_ENC_DATA")) #ifdef KV5M_ENC_DATA return KV5M_ENC_DATA; #else goto not_there; #endif if (strEQ(name, "KV5M_ENC_KDC_REP_PART")) #ifdef KV5M_ENC_KDC_REP_PART return KV5M_ENC_KDC_REP_PART; #else goto not_there; #endif if (strEQ(name, "KV5M_ENC_SAM_RESPONSE_ENC")) #ifdef KV5M_ENC_SAM_RESPONSE_ENC return KV5M_ENC_SAM_RESPONSE_ENC; #else goto not_there; #endif if (strEQ(name, "KV5M_ENC_TKT_PART")) #ifdef KV5M_ENC_TKT_PART return KV5M_ENC_TKT_PART; #else goto not_there; #endif if (strEQ(name, "KV5M_ERROR")) #ifdef KV5M_ERROR return KV5M_ERROR; #else goto not_there; #endif if (strEQ(name, "KV5M_ETYPE_INFO_ENTRY")) #ifdef KV5M_ETYPE_INFO_ENTRY return KV5M_ETYPE_INFO_ENTRY; #else goto not_there; #endif if (strEQ(name, "KV5M_GSS_OID")) #ifdef KV5M_GSS_OID return KV5M_GSS_OID; #else goto not_there; #endif if (strEQ(name, "KV5M_GSS_QUEUE")) #ifdef KV5M_GSS_QUEUE return KV5M_GSS_QUEUE; #else goto not_there; #endif if (strEQ(name, "KV5M_KDC_REP")) #ifdef KV5M_KDC_REP return KV5M_KDC_REP; #else goto not_there; #endif if (strEQ(name, "KV5M_KDC_REQ")) #ifdef KV5M_KDC_REQ return KV5M_KDC_REQ; #else goto not_there; #endif if (strEQ(name, "KV5M_KEYBLOCK")) #ifdef KV5M_KEYBLOCK return KV5M_KEYBLOCK; #else goto not_there; #endif if (strEQ(name, "KV5M_KEYTAB")) #ifdef KV5M_KEYTAB return KV5M_KEYTAB; #else goto not_there; #endif if (strEQ(name, "KV5M_KEYTAB_ENTRY")) #ifdef KV5M_KEYTAB_ENTRY return KV5M_KEYTAB_ENTRY; #else goto not_there; #endif if (strEQ(name, "KV5M_LAST_REQ_ENTRY")) #ifdef KV5M_LAST_REQ_ENTRY return KV5M_LAST_REQ_ENTRY; #else goto not_there; #endif if (strEQ(name, "KV5M_NONE")) #ifdef KV5M_NONE return KV5M_NONE; #else goto not_there; #endif if (strEQ(name, "KV5M_OS_CONTEXT")) #ifdef KV5M_OS_CONTEXT return KV5M_OS_CONTEXT; #else goto not_there; #endif if (strEQ(name, "KV5M_PASSWD_PHRASE_ELEMENT")) #ifdef KV5M_PASSWD_PHRASE_ELEMENT return KV5M_PASSWD_PHRASE_ELEMENT; #else goto not_there; #endif if (strEQ(name, "KV5M_PA_DATA")) #ifdef KV5M_PA_DATA return KV5M_PA_DATA; #else goto not_there; #endif if (strEQ(name, "KV5M_PREAUTH_OPS")) #ifdef KV5M_PREAUTH_OPS return KV5M_PREAUTH_OPS; #else goto not_there; #endif if (strEQ(name, "KV5M_PREDICTED_SAM_RESPONSE")) #ifdef KV5M_PREDICTED_SAM_RESPONSE return KV5M_PREDICTED_SAM_RESPONSE; #else goto not_there; #endif if (strEQ(name, "KV5M_PRINCIPAL")) #ifdef KV5M_PRINCIPAL return KV5M_PRINCIPAL; #else goto not_there; #endif if (strEQ(name, "KV5M_PRIV")) #ifdef KV5M_PRIV return KV5M_PRIV; #else goto not_there; #endif if (strEQ(name, "KV5M_PRIV_ENC_PART")) #ifdef KV5M_PRIV_ENC_PART return KV5M_PRIV_ENC_PART; #else goto not_there; #endif if (strEQ(name, "KV5M_PWD_DATA")) #ifdef KV5M_PWD_DATA return KV5M_PWD_DATA; #else goto not_there; #endif if (strEQ(name, "KV5M_RCACHE")) #ifdef KV5M_RCACHE return KV5M_RCACHE; #else goto not_there; #endif if (strEQ(name, "KV5M_RESPONSE")) #ifdef KV5M_RESPONSE return KV5M_RESPONSE; #else goto not_there; #endif if (strEQ(name, "KV5M_SAFE")) #ifdef KV5M_SAFE return KV5M_SAFE; #else goto not_there; #endif if (strEQ(name, "KV5M_SAM_CHALLENGE")) #ifdef KV5M_SAM_CHALLENGE return KV5M_SAM_CHALLENGE; #else goto not_there; #endif if (strEQ(name, "KV5M_SAM_KEY")) #ifdef KV5M_SAM_KEY return KV5M_SAM_KEY; #else goto not_there; #endif if (strEQ(name, "KV5M_SAM_RESPONSE")) #ifdef KV5M_SAM_RESPONSE return KV5M_SAM_RESPONSE; #else goto not_there; #endif if (strEQ(name, "KV5M_TICKET")) #ifdef KV5M_TICKET return KV5M_TICKET; #else goto not_there; #endif if (strEQ(name, "KV5M_TKT_AUTHENT")) #ifdef KV5M_TKT_AUTHENT return KV5M_TKT_AUTHENT; #else goto not_there; #endif if (strEQ(name, "KV5M_TRANSITED")) #ifdef KV5M_TRANSITED return KV5M_TRANSITED; #else goto not_there; #endif break; case 'L': if (strEQ(name, "LR_TYPE_INTERPRETATION_MASK")) #ifdef LR_TYPE_INTERPRETATION_MASK return LR_TYPE_INTERPRETATION_MASK; #else goto not_there; #endif if (strEQ(name, "LR_TYPE_THIS_SERVER_ONLY")) #ifdef LR_TYPE_THIS_SERVER_ONLY return LR_TYPE_THIS_SERVER_ONLY; #else goto not_there; #endif break; case 'M': if (strEQ(name, "MAX_KEYTAB_NAME_LEN")) #ifdef MAX_KEYTAB_NAME_LEN return MAX_KEYTAB_NAME_LEN; #else goto not_there; #endif if (strEQ(name, "MSEC_DIRBIT")) #ifdef MSEC_DIRBIT return MSEC_DIRBIT; #else goto not_there; #endif if (strEQ(name, "MSEC_VAL_MASK")) #ifdef MSEC_VAL_MASK return MSEC_VAL_MASK; #else goto not_there; #endif break; case 'N': if (strEQ(name, "NEAR")) #ifdef NEAR return NEAR; #else goto not_there; #endif if (strEQ(name, "NO_PASSWORD")) #ifdef NO_PASSWORD return NO_PASSWORD; #else goto not_there; #endif break; case 'O': break; case 'P': break; case 'Q': break; case 'R': break; case 'S': if (strEQ(name, "SIZEOF_INT")) #ifdef SIZEOF_INT return SIZEOF_INT; #else goto not_there; #endif if (strEQ(name, "SIZEOF_LONG")) #ifdef SIZEOF_LONG return SIZEOF_LONG; #else goto not_there; #endif if (strEQ(name, "SIZEOF_SHORT")) #ifdef SIZEOF_SHORT return SIZEOF_SHORT; #else goto not_there; #endif break; case 'T': if (strEQ(name, "TKT_FLG_FORWARDABLE")) #ifdef TKT_FLG_FORWARDABLE return TKT_FLG_FORWARDABLE; #else goto not_there; #endif if (strEQ(name, "TKT_FLG_FORWARDED")) #ifdef TKT_FLG_FORWARDED return TKT_FLG_FORWARDED; #else goto not_there; #endif if (strEQ(name, "TKT_FLG_HW_AUTH")) #ifdef TKT_FLG_HW_AUTH return TKT_FLG_HW_AUTH; #else goto not_there; #endif if (strEQ(name, "TKT_FLG_INITIAL")) #ifdef TKT_FLG_INITIAL return TKT_FLG_INITIAL; #else goto not_there; #endif if (strEQ(name, "TKT_FLG_INVALID")) #ifdef TKT_FLG_INVALID return TKT_FLG_INVALID; #else goto not_there; #endif if (strEQ(name, "TKT_FLG_MAY_POSTDATE")) #ifdef TKT_FLG_MAY_POSTDATE return TKT_FLG_MAY_POSTDATE; #else goto not_there; #endif if (strEQ(name, "TKT_FLG_POSTDATED")) #ifdef TKT_FLG_POSTDATED return TKT_FLG_POSTDATED; #else goto not_there; #endif if (strEQ(name, "TKT_FLG_PRE_AUTH")) #ifdef TKT_FLG_PRE_AUTH return TKT_FLG_PRE_AUTH; #else goto not_there; #endif if (strEQ(name, "TKT_FLG_PROXIABLE")) #ifdef TKT_FLG_PROXIABLE return TKT_FLG_PROXIABLE; #else goto not_there; #endif if (strEQ(name, "TKT_FLG_PROXY")) #ifdef TKT_FLG_PROXY return TKT_FLG_PROXY; #else goto not_there; #endif if (strEQ(name, "TKT_FLG_RENEWABLE")) #ifdef TKT_FLG_RENEWABLE return TKT_FLG_RENEWABLE; #else goto not_there; #endif if (strEQ(name, "TRUE")) #ifdef TRUE return TRUE; #else goto not_there; #endif break; case 'U': break; case 'V': if (strEQ(name, "VALID_INT_BITS")) #ifdef VALID_INT_BITS return VALID_INT_BITS; #else goto not_there; #endif if (strEQ(name, "VALID_UINT_BITS")) #ifdef VALID_UINT_BITS return VALID_UINT_BITS; #else goto not_there; #endif break; case 'W': break; case 'X': break; case 'Y': break; case 'Z': break; case 'a': break; case 'b': break; case 'c': break; case 'd': break; case 'e': break; case 'f': break; case 'g': break; case 'h': break; case 'i': break; case 'j': break; case 'k': break; case 'l': break; case 'm': break; case 'n': break; case 'o': break; case 'p': break; case 'q': break; case 'r': break; case 's': break; case 't': break; case 'u': break; case 'v': break; case 'w': break; case 'x': break; case 'y': break; case 'z': break; case '_': break; } errno = EINVAL; return 0; not_there: errno = ENOENT; return 0; } Krb5-1.9/sample_server0000755000076400007640000000175110443042305013400 0ustar jeffjeff#!/usr/local/bin/perl # sample_server # receives authentication info from a client using recvauth use blib; # remove if not in module build directory use IO::Socket; use Sys::Hostname; use Authen::Krb5 (KRB5_NT_SRV_HST); # replace with your own stuff $SERVICE = "sample"; $KEYTAB_FILE = "/etc/krb5.keytab"; chomp($SERVER = hostname()); Authen::Krb5::init_context(); $ac = new Authen::Krb5::AuthContext; $s = new IO::Socket::INET( LocalAddr => $SERVER, LocalPort => 12345, Proto => 'tcp', Reuse => 1, Listen => 5 ); defined $s or die $!; $ns = $s->accept(); $sprinc = Authen::Krb5::sname_to_principal($SERVER,$SERVICE,KRB5_NT_SRV_HST); $kt = Authen::Krb5::kt_resolve("FILE:$KEYTAB_FILE"); $t = Authen::Krb5::recvauth($ac,$ns,"V1",$sprinc,$kt); if ($t) { print "Received authentication info.\n"; $client = $t->enc_part2->client; print "Hello, ",$client->data,".\n"; } else { print "recvauth error: ",Authen::Krb5::error(),"\n"; } close($ns); close($s); Authen::Krb5::free_context(); Krb5-1.9/Changes0000644000076400007640000000377011320242327012102 0ustar jeffjeffRevision history for Perl extension Krb5. 1.9 Add Authen::Krb5::Creds object (tom.jones@oucs.ox.ac.uk) 1.8 Fix broken get_in_tkt_with_password implementation (rra@debian.org) Add some missing prototypes (rra@debian.org) Clean up some compiler warnings (rra@debian.org) 1.7 Use standard search paths for includes and libs Add get_init_creds_password (rra@debian.org) Add get_init_creds_keytab (rra@debian.org) Add a destructor for Authen::Krb5::Creds (rra@debian.org) Add store_cred() method to Authen::Krb5::Ccache (rra@debian.org) Reimplement deprecated get_in_tkt_with_password and get_in_tkt_with_keytab functions to use the the more current get_init_creds_{password,keytab}, krb5_cc_initialize, and krb5_cc_store_cred (rra@debian.org) Set context to NULL after calling krb5_free_context (Wolfgang.Friebel@desy.de) 1.6 Add methods for iterating through credentials cache (mbrown@fensystems.co.uk) Deprecated init_ets Fix some compiler warnings 1.5 Fix broken compile for Authen::Krb5::Keytab::get_name() 1.4 Added methods for manipulating keytabs (ajk@iu.edu) Added keyblock accessor functions to allow use of the session key. 1.3 Added get_in_tkt_with_keytab() function (jorgen@greytower.net) 1.2 Minor fix to support building for Perl 5.6. 1.1 Corrected logic in freed() (internal memory management) Fixed segfault on Linux when calling Authen::Krb5::Ccache::DESTROY after calling Authen::Krb5::Ccache::destroy() Changed Makefile.PL to support auto-detection of crypto libraries. Added support for building with MIT Kerberos 5 Version 1.1.1 1.0 Moved module into the Authen:: namespace. Changed return syntax for some functions. Compilation was failing on certain platforms. Fixed some minor bugs. 0.90 Tue Mar 17 10:25:43 1998 - original version; created by h2xs 1.18 Krb5-1.9/sample_client0000755000076400007640000000155410443042300013344 0ustar jeffjeff#!/usr/local/bin/perl # sample_client # sends authentication info to a server via sendauth use blib; # remove if not in module build directory use IO::Socket; use Authen::Krb5 (KRB5_NT_SRV_HST); # replace with your own stuff $SERVICE = "sample"; $SERVER = "server.domain.edu"; Authen::Krb5::init_context(); $ac = new Authen::Krb5::AuthContext; $s = new IO::Socket::INET( PeerAddr => $SERVER, PeerPort => 12345, Proto => 'tcp' ); defined $s or die $!; $cc = Authen::Krb5::cc_default(); $clientp = Authen::Krb5::parse_name($ENV{'USER'}); $serverp = Authen::Krb5::sname_to_principal($SERVER,$SERVICE,KRB5_NT_SRV_HST); if (Authen::Krb5::sendauth($ac,$s,"V1",$clientp,$serverp, AP_OPTS_MUTUAL_REQUIRED,"test",undef,$cc)) { print "Sent authentication info.\n"; } else { print "sendauth error: ",Authen::Krb5::error(),"\n"; } close($s); Authen::Krb5::free_context();