+Mon Feb 27 11:35:49 1995 Keith Vetter (keithv@fusion.com)
+
+ * config.h: added windows interface keyword for varargs functions,
+ added defines to allows <windows.h> to be stdc compliant.
+ * func-proto.h: added windows INTERFACE_C keyword for functions
+ with varargs, and fixed const in prototype for krb5_send_tgs.
+ * preauth.h: added windows INTERFACE keyword to prototypes
+
Wed Feb 22 17:39:46 1995 Chris Provenzano (proven@mit.edu)
* func-proto.h (krb5_get_credentials(), krb5_get_cred_from_kdc(),
#endif
#ifndef INTERFACE
-#define INTERFACE __far __export __pascal
+#define INTERFACE __far __export __pascal
+#define INTERFACE_C __far __export __cdecl
#endif
#define FAR __far
+/*
+ * The following defines are needed to make <windows.h> work
+ * in stdc mode (/Za flag). Winsock.h needs <windows.h>.
+ */
+#define _far __far
+#define _near __near
+#define _pascal __pascal
+#define _cdecl __cdecl
+#define _huge __huge
+
#else /* Rest of include file is for non-Microloss-Windows */
#ifndef KRB5_AUTOCONF__
* just define it as NULL.
*/
#define INTERFACE
+#define INTERFACE_C
#define FAR
+#define labs(x) abs(x)
#endif /* __windows__ */
krb5_error_code INTERFACE krb5_get_server_rcache
PROTOTYPE((krb5_context,
const krb5_data *, krb5_rcache *));
-krb5_error_code krb5_build_principal_ext
+krb5_error_code INTERFACE_C krb5_build_principal_ext
STDARG_P((krb5_context, krb5_principal *, int, const char *, ...));
-krb5_error_code krb5_build_principal
+krb5_error_code INTERFACE_C krb5_build_principal
STDARG_P((krb5_context, krb5_principal *, int, const char *, ...));
#ifdef va_start
/* XXX depending on varargs include file defining va_start... */
-krb5_error_code krb5_build_principal_va
+krb5_error_code INTERFACE_C krb5_build_principal_va
PROTOTYPE((krb5_context,
krb5_principal *, int, const char *, va_list));
#endif
const krb5_cksumtype,
krb5_const_principal,
krb5_address * const *,
- krb5_authdata * const *,
+ const krb5_authdata **,
krb5_pa_data * const *,
const krb5_data *,
krb5_creds *,
krb5_address * const *,
krb5_enctype *,
krb5_preauthtype *,
- krb5_error_code (* )(krb5_context,
+ krb5_error_code (INTERFACE * )(krb5_context,
const krb5_keytype,
krb5_data *,
krb5_const_pointer,
krb5_keyblock **),
krb5_const_pointer,
- krb5_error_code (* )(krb5_context,
+ krb5_error_code (INTERFACE * )(krb5_context,
const krb5_keyblock *,
krb5_const_pointer,
krb5_kdc_rep * ),
/*
* Note: these typedefs are subject to change.... [tytso:19920903.1609EDT]
*/
-typedef krb5_error_code (krb5_preauth_obtain_proc)
+typedef krb5_error_code (INTERFACE krb5_preauth_obtain_proc)
PROTOTYPE((krb5_context, krb5_principal client, krb5_address **src_addr,
krb5_pa_data *pa_data));
-typedef krb5_error_code (krb5_preauth_verify_proc)
+typedef krb5_error_code (INTERFACE krb5_preauth_verify_proc)
PROTOTYPE((krb5_context, krb5_principal client, krb5_address **src_addr,
krb5_data *data));
krb5_data *data));
#endif
-krb5_error_code get_unixtime_padata
+krb5_error_code INTERFACE get_unixtime_padata
PROTOTYPE((krb5_context, krb5_principal client,
krb5_address **src_addr, krb5_pa_data *data));
-krb5_error_code verify_unixtime_padata
+krb5_error_code INTERFACE verify_unixtime_padata
PROTOTYPE((krb5_context, krb5_principal client, krb5_address **src_addr,
krb5_data *data));
-krb5_error_code get_securid_padata
+krb5_error_code INTERFACE get_securid_padata
PROTOTYPE((krb5_context, krb5_principal client, krb5_address **src_addr,
krb5_pa_data *data));
-krb5_error_code verify_securid_padata
+krb5_error_code INTERFACE verify_securid_padata
PROTOTYPE((krb5_context, krb5_principal client, krb5_address **src_addr,
krb5_data *data));
+Wed Feb 22 17:14:31 1995 Keith Vetter (keithv@fusion.com)
+
+ * walk_rtr.c (krb5_walk_realm_tree): formal parameter wasn't declared.
+ * send_tgs.c: const in wrong place in the prototype.
+ * get_in_tkt.c, preauth.c, rd_cred.c, rd_priv.c, rd_req_dec.c,
+ rd_safe.c: needed a 32 bit abs() function.
+ * parse.c: removed call to fprintf on error the windows version
+ * send_auth.c: defined for windows the ECONNABORTED errno (will
+ be removed when the socket layer is fully implemented).
+
Tue Feb 21 23:38:34 1995 Theodore Y. Ts'o (tytso@dcl)
* mk_cred.c (krb5_mk_cred): Fix argument type to
krb5_free_cred_enc_part().
-Thu Feb 16 00:22:03 1995 Chris Provenzano (proven@mit.edu)
-
- * send_tgs.c (krb5_send_tgs()) Added check for a valid krb5_creds * arg.
-
- * mk_req_ext.c (krb5_mk_req_extended()) Require caller to pass in a
- valid krb5_creds * arg, and removed kdc_options krb5_flags
- and krb5_ccache from arg list.
- * send_tgs.c (krb5_send_tgs())
- * sendauth.c (krb5_sendauth())
- Fix calls to krb5_mk_req_extended()
-
- * gc_frm_kdc.c (krb5_get_cred_from_kdc()) Changed krb5_creds * in/out
- arg to be an in only arg and added krb5_creds ** out arg.
-
- * gc_via_tgt.c (krb5_get_cred_via_tgt()) Changed krb5_creds * in/out
- arg to be an in only arg and added krb5_creds ** out arg.
-
- * gc_2tgt.c (krb5_get_cred_via_2tgt()) Changed krb5_creds * in/out
- arg to be an in only arg and added krb5_creds ** out arg.
-
- * int-proto.h Updated prototypes for krb5_get_cred_via_tgt() and
- krb5_get_cred_via_2tgt().
-
- * get_creds.c (krb5_get_credentials()) Changed krb5_creds * in/out
- arg to be an in only arg and added krb5_creds ** out arg.
- * sendauth.c (krb5_sendauth())
- Routines that also require krb5_creds * in/out arg to be
- appropriately changed because krb5_get_credentials() changed.
- * gc_frm_kdc.c (krb5_get_cred_from_kdc())
- * get_fcreds.c (krb5_get_for_creds())
- * mk_req.c (krb5_mk_req())
- Other routines that needed adjusting because
- krb5_get_credentials() changed but didn't need an API change.
-
- * int-proto.h Don't prototype krb5_get_cred_via_tgt() twice. Use the
- second to prototype krb5_get_cred_via_2tgt().
-
Mon Feb 13 20:25:20 1995 Theodore Y. Ts'o (tytso@dcl)
* get_in_tkt.c (krb5_get_in_tkt): Fix memory leak --- the default
CFLAGS = $(CCOPTS) $(DEFS)
LDFLAGS = -g
-all:: $(OBJS)
-
+##DOSBUILDTOP = ..\..\..
+##DOSLIBNAME=..\libkrb5.lib
+##DOS!include $(BUILDTOP)\config\windows.in
-
-OBJS= addr_comp.o \
- addr_order.o \
- addr_srch.o \
- bld_pr_ext.o \
- bld_princ.o \
- chk_trans.o \
- compat_recv.o \
- conv_princ.o \
- copy_addrs.o \
- copy_auth.o \
- copy_athctr.o \
- copy_cksum.o \
- copy_creds.o \
- copy_data.o \
- copy_key.o \
- copy_princ.o \
- copy_tick.o \
- cp_key_cnt.o \
- decode_kdc.o \
- decrypt_tk.o \
- encode_kdc.o \
- encrypt_tk.o \
- free_rtree.o \
- faddr_ordr.o \
- gc_frm_kdc.o \
- gc_via_tgt.o \
- gc_2tgt.o \
- gen_seqnum.o \
- gen_subkey.o \
- get_creds.o \
- get_fcreds.o \
- get_in_tkt.o \
- in_tkt_ktb.o \
- in_tkt_pwd.o \
- in_tkt_sky.o \
- init_ctx.o \
- kdc_rep_dc.o \
- krbconfig.o \
- mk_cred.o \
- mk_error.o \
- mk_priv.o \
- mk_rep.o \
- mk_req.o \
- mk_req_ext.o \
- mk_safe.o \
- parse.o \
- pr_to_salt.o \
- preauth.o \
- princ_comp.o \
- rd_cred.o \
- rd_error.o \
- rd_priv.o \
- rd_rep.o \
- rd_req.o \
- rd_req_sim.o \
- rd_req_dec.o \
- rd_safe.o \
- recvauth.o \
- sendauth.o \
- send_tgs.o \
- srv_rcache.o \
- tgtname.o \
- unparse.o \
- walk_rtree.o
+OBJS= addr_comp.$(OBJEXT) \
+ addr_order.$(OBJEXT) \
+ addr_srch.$(OBJEXT) \
+ bld_pr_ext.$(OBJEXT) \
+ bld_princ.$(OBJEXT) \
+ chk_trans.$(OBJEXT) \
+ compat_recv.$(OBJEXT) \
+ conv_princ.$(OBJEXT) \
+ copy_addrs.$(OBJEXT) \
+ copy_auth.$(OBJEXT) \
+ copy_athctr.$(OBJEXT) \
+ copy_cksum.$(OBJEXT) \
+ copy_creds.$(OBJEXT) \
+ copy_data.$(OBJEXT) \
+ copy_key.$(OBJEXT) \
+ copy_princ.$(OBJEXT) \
+ copy_tick.$(OBJEXT) \
+ cp_key_cnt.$(OBJEXT) \
+ decode_kdc.$(OBJEXT) \
+ decrypt_tk.$(OBJEXT) \
+ encode_kdc.$(OBJEXT) \
+ encrypt_tk.$(OBJEXT) \
+ free_rtree.$(OBJEXT) \
+ faddr_ordr.$(OBJEXT) \
+ gc_frm_kdc.$(OBJEXT) \
+ gc_via_tgt.$(OBJEXT) \
+ gc_2tgt.$(OBJEXT) \
+ gen_seqnum.$(OBJEXT) \
+ gen_subkey.$(OBJEXT) \
+ get_creds.$(OBJEXT) \
+ get_fcreds.$(OBJEXT) \
+ get_in_tkt.$(OBJEXT) \
+ in_tkt_ktb.$(OBJEXT) \
+ in_tkt_pwd.$(OBJEXT) \
+ in_tkt_sky.$(OBJEXT) \
+ init_ctx.$(OBJEXT) \
+ kdc_rep_dc.$(OBJEXT) \
+ krbconfig.$(OBJEXT) \
+ mk_cred.$(OBJEXT) \
+ mk_error.$(OBJEXT) \
+ mk_priv.$(OBJEXT) \
+ mk_rep.$(OBJEXT) \
+ mk_req.$(OBJEXT) \
+ mk_req_ext.$(OBJEXT) \
+ mk_safe.$(OBJEXT) \
+ parse.$(OBJEXT) \
+ pr_to_salt.$(OBJEXT) \
+ preauth.$(OBJEXT) \
+ princ_comp.$(OBJEXT) \
+ rd_cred.$(OBJEXT) \
+ rd_error.$(OBJEXT) \
+ rd_priv.$(OBJEXT) \
+ rd_rep.$(OBJEXT) \
+ rd_req.$(OBJEXT) \
+ rd_req_sim.$(OBJEXT) \
+ rd_req_dec.$(OBJEXT) \
+ rd_safe.$(OBJEXT) \
+ recvauth.$(OBJEXT) \
+ sendauth.$(OBJEXT) \
+ send_tgs.$(OBJEXT) \
+ srv_rcache.$(OBJEXT) \
+ tgtname.$(OBJEXT) \
+ unparse.$(OBJEXT) \
+ walk_rtree.$(OBJEXT)
SRCS= $(srcdir)/addr_comp.c \
$(srcdir)/addr_order.c \
$(srcdir)/unparse.c \
$(srcdir)/walk_rtree.c
+all:: $(OBJS)
+
COMERRLIB=$(BUILDTOP)/util/et/libcom_err.a
T_WALK_RTREE_OBJS= t_walk_rtree.o walk_rtree.o tgtname.o unparse.o \
TEST_PROGS= t_walk_rtree
-check:: $(TEST_PROGS)
+check:: check-$(WHAT)
+
+check-unix:: $(TEST_PROGS)
+
+check-windows::
clean::
- $(RM) t_walk_rtree t_walk_rtree.o
+ $(RM) t_walk_rtree$(EXEEXT) t_walk_rtree.$(OBJEXT)
/*
* If the two addresses are the same, return TRUE, else return FALSE
*/
-krb5_boolean
+krb5_boolean INTERFACE
krb5_address_compare(context, addr1, addr2)
krb5_context context;
const krb5_address *addr1;
* Return an ordering on two addresses: 0 if the same,
* < 0 if first is less than 2nd, > 0 if first is greater than 2nd.
*/
-int
+int INTERFACE
krb5_address_order(context, addr1, addr2)
krb5_context context;
register const krb5_address *addr1;
* if addr is listed in addrlist, or addrlist is null, return TRUE.
* if not listed, return FALSE
*/
-krb5_boolean
+krb5_boolean INTERFACE
krb5_address_search(context, addr, addrlist)
krb5_context context;
const krb5_address *addr;
#include <varargs.h>
#endif
-krb5_error_code
+krb5_error_code INTERFACE_C
#if __STDC__ || defined(STDARG_PROTOTYPES)
krb5_build_principal_ext(krb5_context context, krb5_principal * princ, int rlen, const char * realm, ...)
#else
#include <krb5/ext-proto.h>
-krb5_error_code
+krb5_error_code INTERFACE_C
krb5_build_principal_va(context, princ, rlen, realm, ap)
krb5_context context;
krb5_principal princ;
return 0;
}
-krb5_error_code
+krb5_error_code INTERFACE_C
#if __STDC__ || defined(STDARG_PROTOTYPES)
krb5_build_principal(krb5_context context, krb5_principal * princ, int rlen,
const char * realm, ...)
#define MAX_REALM_LN 500
-krb5_error_code krb5_check_transited_list(context, trans, realm1, realm2)
+krb5_error_code INTERFACE
+krb5_check_transited_list(context, trans, realm1, realm2)
krb5_context context;
krb5_data *trans;
krb5_data *realm1;
#include <krb5/krb5.h>
+#ifndef _MSDOS
#include <krb5/osconf.h>
#include <krb5/kdb.h>
#include <krb5/kdb_dbm.h>
return(rem);
}
#endif
+#endif
/* XXX This calls for a new error code */
#define KRB5_INVALID_PRINCIPAL KRB5_LNAME_BADFORMAT
-krb5_error_code krb5_524_conv_principal(context, princ, name, inst, realm)
+krb5_error_code INTERFACE
+krb5_524_conv_principal(context, princ, name, inst, realm)
krb5_context context;
const krb5_principal princ;
char *name;
return 0;
}
-krb5_error_code krb5_425_conv_principal(context, name, instance, realm, princ)
+krb5_error_code INTERFACE
+krb5_425_conv_principal(context, name, instance, realm, princ)
krb5_context context;
const char *name;
const char *instance;
/*
* Copy an address array, with fresh allocation.
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_copy_addresses(context, inaddr, outaddr)
krb5_context context;
krb5_address * const * inaddr;
* Note that this function may change the value of *outaddr even if it
* returns failure, but it will not change the contents of the list.
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_append_addresses(context, inaddr, outaddr)
krb5_context context;
krb5_address * const * inaddr;
#include <krb5/ext-proto.h>
-krb5_error_code
+krb5_error_code INTERFACE
krb5_copy_authenticator(context, authfrom, authto)
krb5_context context;
const krb5_authenticator *authfrom;
/*
* Copy an authdata array, with fresh allocation.
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_copy_authdata(context, inauthdat, outauthdat)
krb5_context context;
krb5_authdata * const * inauthdat;
#include <krb5/ext-proto.h>
-krb5_error_code
+krb5_error_code INTERFACE
krb5_copy_checksum(context, ckfrom, ckto)
krb5_context context;
const krb5_checksum *ckfrom;
* Copy credentials, allocating fresh storage where needed.
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_copy_creds(context, incred, outcred)
krb5_context context;
const krb5_creds *incred;
/*
* Copy a data structure, with fresh allocation.
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_copy_data(context, indata, outdata)
krb5_context context;
const krb5_data *indata;
/*
* Copy a keyblock, including alloc'ed storage.
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_copy_keyblock(context, from, to)
krb5_context context;
const krb5_keyblock *from;
/*
* Copy a principal structure, with fresh allocation.
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_copy_principal(context, inprinc, outprinc)
krb5_context context;
krb5_const_principal inprinc;
return 0;
}
-krb5_error_code
+krb5_error_code INTERFACE
krb5_copy_ticket(context, from, pto)
krb5_context context;
const krb5_ticket *from;
/*
* Copy a keyblock, including alloc'ed storage.
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_copy_keyblock_contents(context, from, to)
krb5_context context;
const krb5_keyblock *from;
returns errors from encryption routines, system errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_decode_kdc_rep(context, enc_rep, key, etype, dec_rep)
krb5_context context;
krb5_data * enc_rep;
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_decrypt_tkt_part(context, srv_key, ticket)
krb5_context context;
const krb5_keyblock *srv_key;
*/
/* due to argument promotion rules, we need to use the DECLARG/OLDDECLARG
stuff... */
-krb5_error_code
+krb5_error_code INTERFACE
krb5_encode_kdc_rep(context, type, encpart, eblock, client_key, dec_rep, enc_rep)
krb5_context context;
const krb5_msgtype type;
enc_part->ciphertext.data allocated & filled in with encrypted stuff
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_encrypt_tkt_part(context, eblock, srv_key, dec_ticket)
krb5_context context;
krb5_encrypt_block *eblock;
* Return an ordering on the two full addresses: 0 if the same,
* < 0 if first is less than 2nd, > 0 if first is greater than 2nd.
*/
-int
+int INTERFACE
krb5_fulladdr_order(context, addr1, addr2)
krb5_context context;
register const krb5_fulladdr *addr1;
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
-void
+void INTERFACE
krb5_free_realm_tree(context, realms)
krb5_context context;
krb5_principal *realms;
#include <krb5/ext-proto.h>
#include "int-proto.h"
-krb5_error_code
+krb5_error_code INTERFACE
krb5_get_cred_via_2tgt (context, tgt, kdcoptions, sumtype, in_cred, out_cred)
krb5_context context;
krb5_creds *tgt;
#define TGT_ETYPE \
krb5_keytype_array[tgt.keyblock.keytype]->system->proto_enctype;
-krb5_error_code krb5_get_cred_from_kdc(context, ccache, in_cred, out_cred, tgts)
+krb5_error_code INTERFACE
+krb5_get_cred_from_kdc(context, ccache, in_cred, out_cred, tgts)
krb5_context context;
krb5_ccache ccache;
krb5_creds *in_cred;
#include <krb5/ext-proto.h>
#include "int-proto.h"
-krb5_error_code
+krb5_error_code INTERFACE
krb5_get_cred_via_tgt (context, tgt, kdcoptions, sumtype, in_cred, out_cred)
krb5_context context;
krb5_creds * tgt;
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
-krb5_error_code
+krb5_error_code INTERFACE
krb5_generate_seq_number(context, key, seqno)
krb5_context context;
const krb5_keyblock *key;
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
-krb5_error_code
+krb5_error_code INTERFACE
krb5_generate_subkey(context, key, subkey)
krb5_context context;
const krb5_keyblock *key;
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
-krb5_error_code
+krb5_error_code INTERFACE
krb5_get_credentials(context, options, ccache, in_creds, out_creds)
krb5_context context;
const krb5_flags options;
/* libkrb5.a to allow widespread use */
#include <stdio.h>
+#ifndef _MSDOS
#include <pwd.h>
#include <netdb.h>
#define flags2options(flags) (flags & KDC_TKT_COMMON_MASK)
/* Get a TGT for use at the remote host */
-krb5_error_code
+krb5_error_code INTERFACE
krb5_get_for_creds(context, sumtype, rhost, client, enc_key,
forwardable, outbuf)
krb5_context context;
krb5_free_kdc_rep(context, dec_rep);
return retval;
}
-
+#endif
extern krb5_deltat krb5_clockskew;
-#define in_clock_skew(date) (abs((date)-request.nonce) < krb5_clockskew)
+#define in_clock_skew(date) (labs((date)-request.nonce) < krb5_clockskew)
/* some typedef's for the function args to make things look a bit cleaner */
-typedef krb5_error_code (*git_key_proc) PROTOTYPE((krb5_context,
+typedef krb5_error_code (INTERFACE *git_key_proc) PROTOTYPE((krb5_context,
const krb5_keytype,
krb5_data *,
krb5_const_pointer,
krb5_keyblock **));
-typedef krb5_error_code (*git_decrypt_proc) PROTOTYPE((krb5_context,
+typedef krb5_error_code (INTERFACE *git_decrypt_proc) PROTOTYPE((krb5_context,
const krb5_keyblock *,
krb5_const_pointer,
krb5_kdc_rep * ));
-krb5_error_code
+krb5_error_code INTERFACE
krb5_get_in_tkt(context, options, addrs, etypes, ptypes, key_proc, keyseed,
decrypt_proc, decryptarg, creds, ccache, ret_as_reply)
krb5_context context;
* "keyseed" is actually a krb5_keytab, or NULL if we should fetch
* from system area.
*/
-static keytab_keyproc(context, type, salt, keyseed, key)
+krb5_error_code INTERFACE keytab_keyproc
+ PROTOTYPE((krb5_context,
+ const krb5_keytype,
+ krb5_data *,
+ krb5_const_pointer,
+ krb5_keyblock **));
+
+krb5_error_code INTERFACE
+keytab_keyproc(context, type, salt, keyseed, key)
krb5_context context;
const krb5_keytype type;
krb5_data * salt;
returns system errors, encryption errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_get_in_tkt_with_keytab(context, options, addrs, etypes, pre_auth_types,
keytab, ccache, creds, ret_as_reply)
krb5_context context;
/*
* key-producing procedure for use by krb5_get_in_tkt_with_password.
*/
-
-static krb5_error_code
+krb5_error_code INTERFACE pwd_keyproc
+ PROTOTYPE((krb5_context,
+ const krb5_keytype,
+ krb5_data *,
+ krb5_const_pointer,
+ krb5_keyblock **));
+
+krb5_error_code INTERFACE
pwd_keyproc(context, type, salt, keyseed, key)
krb5_context context;
const krb5_keytype type;
returns system errors, encryption errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_get_in_tkt_with_password(context, options, addrs, etypes, pre_auth_types,
password, ccache, creds, ret_as_reply)
krb5_context context;
* "keyseed" is actually a krb5_keyblock *, or NULL if we should fetch
* from system area.
*/
+krb5_error_code INTERFACE skey_keyproc
+ PROTOTYPE((krb5_context,
+ const krb5_keytype,
+ krb5_data *,
+ krb5_const_pointer,
+ krb5_keyblock **));
+
+krb5_error_code INTERFACE
skey_keyproc(context, type, salt, keyseed, key)
krb5_context context;
const krb5_keytype type;
returns system errors, encryption errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_get_in_tkt_with_skey(context, options, addrs, etypes, pre_auth_types,
key, ccache, creds, ret_as_reply)
krb5_context context;
#include <krb5/los-proto.h>
#include <krb5/ext-proto.h>
-krb5_error_code
+krb5_error_code INTERFACE
krb5_init_context(context)
krb5_context *context;
{
return retval;
}
-void
+void INTERFACE
krb5_free_context(ctx)
krb5_context ctx;
{
/*
* Set the desired default etypes, making sure they are valid.
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_set_default_in_tkt_etypes(context, etypes)
krb5_context context;
const krb5_enctype *etypes;
return 0;
}
-krb5_error_code
+krb5_error_code INTERFACE
krb5_get_default_in_tkt_etypes(context, etypes)
krb5_context context;
krb5_enctype **etypes;
(context->etype_count + 1))) {
memcpy(old_etypes, context->etypes, sizeof(krb5_enctype) *
context->etype_count);
- old_etypes[context->etype_count] = NULL;
+ old_etypes[context->etype_count] = 0;
} else {
return ENOMEM;
}
#ifndef KRB5_INT_FUNC_PROTO__
#define KRB5_INT_FUNC_PROTO__
-krb5_error_code krb5_tgtname
+krb5_error_code INTERFACE krb5_tgtname
PROTOTYPE((krb5_context context,
const krb5_data *,
const krb5_data *,
krb5_principal *));
-krb5_error_code krb5_get_cred_via_tgt
+krb5_error_code INTERFACE krb5_get_cred_via_tgt
PROTOTYPE((krb5_context context,
krb5_creds *,
const krb5_flags,
const krb5_cksumtype,
krb5_creds *,
krb5_creds **));
-krb5_error_code krb5_get_cred_via_2tgt
+krb5_error_code INTERFACE krb5_get_cred_via_2tgt
PROTOTYPE((krb5_context context,
krb5_creds *,
const krb5_flags,
*/
/*ARGSUSED*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_kdc_rep_decrypt_proc(context, key, decryptarg, dec_rep)
krb5_context context;
const krb5_keyblock * key;
#include <krb5/asn1.h>
/* Create asn.1 encoded KRB-CRED message from the kdc reply. */
-krb5_error_code
+krb5_error_code INTERFACE
krb5_mk_cred(context, dec_rep, etype, key, sender_addr, recv_addr, outbuf)
krb5_context context;
krb5_kdc_rep *dec_rep;
returns system errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_mk_error(context, dec_err, enc_err)
krb5_context context;
const krb5_error *dec_err;
returns system errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_mk_priv(context, userdata, etype, key, sender_addr, recv_addr,
seq_number, priv_flags, rcache, i_vector, outbuf)
krb5_context context;
returns system errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_mk_rep(context, repl, kblock, outbuf)
krb5_context context;
const krb5_ap_rep_enc_part *repl;
extern krb5_flags krb5_kdc_default_options;
-krb5_error_code
+krb5_error_code INTERFACE
krb5_mk_req(context, server, ap_req_options, checksum, ccache, outbuf)
krb5_context context;
krb5_const_principal server;
const krb5_checksum *, krb5_keyblock *,
krb5_int32, krb5_authdata ** ));
-krb5_error_code
+krb5_error_code INTERFACE
krb5_mk_req_extended(context, ap_req_options, checksum, sequence,
newkey, in_creds, authentp, outbuf)
krb5_context context;
returns system errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_mk_safe(context, userdata, sumtype, key, sender_addr, recv_addr,
seq_number, safe_flags, rcache, outbuf)
krb5_context context;
* May the fleas of a thousand camels infest the ISO, they who think
* that arbitrarily large multi-component names are a Good Thing.....
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_parse_name(context, name, nprincipal)
krb5_context context;
const char *name;
else
krb5_princ_component(context, principal, i)->length = size;
if (i + 1 != components) {
+ #ifndef _WINDOWS
fprintf(stderr,
"Programming error in krb5_parse_name!");
+ #endif
exit(1);
}
} else {
/*
* Convert a krb5_principal into the default salt for that principal.
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_principal2salt_internal(context, pr, ret, use_realm)
krb5_context context;
register krb5_const_principal pr;
return 0;
}
-krb5_error_code
+krb5_error_code INTERFACE
krb5_principal2salt(context, pr, ret)
krb5_context context;
register krb5_const_principal pr;
return krb5_principal2salt_internal(context, pr, ret, 1);
}
-krb5_error_code
+krb5_error_code INTERFACE
krb5_principal2salt_norealm(context, pr, ret)
krb5_context context;
register krb5_const_principal pr;
*
* Note: This is a first crack at what any preauthentication will need...
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_obtain_padata(context, type, client, src_addr, encrypt_key, ret_data)
krb5_context context;
int type; /*IN: Preauth type */
* Note: This is a first crack at what any preauthentication will need...
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_verify_padata(context, data,client,src_addr, decrypt_key, req_id, flags)
krb5_context context;
krb5_pa_data *data; /*IN: padata */
*/
int seeded = 0 ; /* Used by srand below */
-krb5_error_code
+krb5_error_code INTERFACE
get_unixtime_padata(context, client, src_addr, pa_data)
krb5_context context;
krb5_principal client;
return(0);
}
-krb5_error_code
+krb5_error_code INTERFACE
verify_unixtime_padata(context, client, src_addr, data)
krb5_context context;
krb5_principal client;
krb5_error_code retval;
krb5_timestamp currenttime, patime;
extern krb5_deltat krb5_clockskew;
-#define in_clock_skew(date) (abs((date)-currenttime) < krb5_clockskew)
+#define in_clock_skew(date) (labs((date)-currenttime) < krb5_clockskew)
tmp = (unsigned char *) data->data;
if (tmp[8] != 0)
#include "sdcli.h"
#include "sdconf.c"
-krb5_error_code
+krb5_error_code INTERFACE
verify_securid_padata(client, src_addr, data)
krb5_principal client;
krb5_address **src_addr;
}
}
#else
-krb5_error_code
+krb5_error_code INTERFACE
verify_securid_padata(context, client, src_addr, data)
krb5_context context;
krb5_principal client;
*/
static char *krb5_SecureId_prompt = "\nEnter Your SecurId Access Code Prepended with Your PIN\n (or a \'#\'if Your PIN is entered on the card keypad): ";
-krb5_error_code
+krb5_error_code INTERFACE
get_securid_padata(context, client,src_addr,pa_data)
krb5_context context;
krb5_principal client;
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
-krb5_boolean
+krb5_boolean INTERFACE
krb5_realm_compare(context, princ1, princ2)
krb5_context context;
krb5_const_principal princ1;
return TRUE;
}
-krb5_boolean
+krb5_boolean INTERFACE
krb5_principal_compare(context, princ1, princ2)
krb5_context context;
krb5_const_principal princ1;
#include <krb5/asn1.h>
extern krb5_deltat krb5_clockskew;
-#define in_clock_skew(date) (abs((date)-currenttime) < krb5_clockskew)
+#define in_clock_skew(date) (labs((date)-currenttime) < krb5_clockskew)
/* Decode the KRB-CRED message, and return creds */
-krb5_error_code
+krb5_error_code INTERFACE
krb5_rd_cred(context, inbuf, key, creds, sender_addr, recv_addr)
krb5_context context;
const krb5_data *inbuf;
* returns system errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_rd_error(context, enc_errbuf, dec_error)
krb5_context context;
const krb5_data *enc_errbuf;
#include <krb5/ext-proto.h>
extern krb5_deltat krb5_clockskew;
-#define in_clock_skew(date) (abs((date)-currenttime) < krb5_clockskew)
+#define in_clock_skew(date) (labs((date)-currenttime) < krb5_clockskew)
/*
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_rd_priv(context, inbuf, key, sender_addr, recv_addr, seq_number,
priv_flags, i_vector, rcache, outbuf)
krb5_context context;
* returns system errors, encryption errors, replay errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_rd_rep(context, inbuf, kblock, repl)
krb5_context context;
const krb5_data *inbuf;
* returns system errors, encryption errors, replay errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_rd_req(context, inbuf, server, sender_addr, fetchfrom, keyproc,
keyprocarg, rcache, authdat)
krb5_context context;
PROTOTYPE((krb5_context, const krb5_ap_req *, krb5_authenticator **));
extern krb5_deltat krb5_clockskew;
-#define in_clock_skew(date) (abs((date)-currenttime) < krb5_clockskew)
+#define in_clock_skew(date) (labs((date)-currenttime) < krb5_clockskew)
-krb5_error_code
+krb5_error_code INTERFACE
krb5_rd_req_decoded(context, req, server, sender_addr, fetchfrom, keyproc,
keyprocarg, rcache, authdat)
krb5_context context;
* returns system errors, encryption errors, replay errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_rd_req_simple(context, inbuf, server, sender_addr, authdat)
krb5_context context;
const krb5_data *inbuf;
#include <krb5/ext-proto.h>
extern krb5_deltat krb5_clockskew;
-#define in_clock_skew(date) (abs((date)-currenttime) < krb5_clockskew)
+#define in_clock_skew(date) (labs((date)-currenttime) < krb5_clockskew)
/*
parses a KRB_SAFE message from inbuf, placing the integrity-protected user
returns system errors, integrity errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_rd_safe(context, inbuf, key, sender_addr, recv_addr, seq_number,
safe_flags, rcache, outbuf)
krb5_context context;
#include <krb5/krb5.h>
+#ifndef _MSDOS
#include <krb5/osconf.h>
#include <krb5/kdb.h>
#include <krb5/kdb_dbm.h>
static char *sendauth_version = "KRB5_SENDAUTH_V1.0";
-krb5_error_code
+krb5_error_code INTERFACE
krb5_recvauth(context,
/* IN */
fd, appl_version, server, sender_addr, fetch_from,
return 0;
}
-
+#endif
returns system errors
*/
-krb5_error_code
+krb5_error_code INTERFACE
krb5_send_tgs(context, kdcoptions, timestruct, etypes, sumtype, sname, addrs,
authorization_data, padata, second_ticket, in_cred, rep)
krb5_context context;
const krb5_cksumtype sumtype;
krb5_const_principal sname;
krb5_address * const * addrs;
- krb5_authdata * const * authorization_data;
+ const krb5_authdata ** authorization_data;
krb5_pa_data * const * padata;
const krb5_data * second_ticket;
krb5_creds * in_cred;
#include <stdio.h>
#include <string.h>
-#include <netinet/in.h>
+#ifdef _MSDOS
+#define ECONNABORTED 53
+#endif
#define WORKING_RCACHE
static char *sendauth_version = "KRB5_SENDAUTH_V1.0";
-krb5_error_code
+krb5_error_code INTERFACE
krb5_sendauth(context,
/* IN */
fd, appl_version, client, server, ap_req_options, checksump,
#include <ctype.h>
#include <stdio.h>
-krb5_error_code
+krb5_error_code INTERFACE
krb5_get_server_rcache(context, piece, rcptr)
krb5_context context;
const krb5_data *piece;
/* This is an internal-only function, used by krb5_get_cred_from_kdc() */
-krb5_error_code
+krb5_error_code INTERFACE
krb5_tgtname(context, server, client, tgtprinc)
krb5_context context;
const krb5_data *server, *client;
#define REALM_SEP '@'
#define COMPONENT_SEP '/'
-krb5_error_code
+krb5_error_code INTERFACE
krb5_unparse_name_ext(context, principal, name, size)
krb5_context context;
krb5_const_principal principal;
return 0;
}
-krb5_error_code
+krb5_error_code INTERFACE
krb5_unparse_name(context, principal, name)
krb5_context context;
krb5_const_principal principal;
#define max(x,y) ((x) > (y) ? (x) : (y))
#endif
-krb5_error_code
+krb5_error_code INTERFACE
krb5_walk_realm_tree(context, client, server, tree, realm_branch_char)
krb5_context context;
const krb5_data *client, *server;
krb5_principal **tree;
+ int realm_branch_char;
{
krb5_error_code retval;
krb5_principal *rettree;