Ken Raeburn [Thu, 2 Sep 1999 21:39:46 +0000 (21:39 +0000)]
from 1.1 branch
1999-09-01 Danilo Almeida <dalmeida@mit.edu>
* kuserok.c (krb5_kuserok): Fix improper negation in
non-Unix localname check. Also fix calling convention
before this function is exported by the Windows DLL.
* localaddr.c (krb5_os_localaddr): Fix memset to clear
right address list. (Thanks to jaltman@columbia.edu).
1999-09-01 Ken Raeburn <raeburn@mit.edu>
* get_krbhst.c (krb5_get_krbhst): Fix double-indirection
confusion. Do actually copy string contents to newly allocated
storage.
Ken Raeburn [Wed, 1 Sep 1999 21:55:49 +0000 (21:55 +0000)]
from 1.1 branch:
* init_ctx.c (get_profile_etype_list): Update name of the des3 entry in the
default etype list.
* init_ctx.c (get_profile_etype_list): New argument DESONLY; if set, ignore any
ktype values other than NULL, DES_CBC_CRC, and DES_CBC_MD5.
(krb5_get_default_in_tkt_ktypes, krb5_get_tgs_ktypes): Set it.
(krb5_get_permitted_enctypes): Don't set it.
* fwd_tgt.c (krb5_fwd_tgt_creds): Use KRB5_TC_SUPPORTED_KTYPES when calling
krb5_cc_retrieve_cred.
* gc_frm_kdc.c (krb5_get_cred_from_kdc_opt): Ditto.
* get_creds.c (krb5_get_credentials_core): Set that flag.
(krb5_get_credentials): Check for KRB5_CC_NOT_KTYPE error return.
* t_ser.c (main): Disable eblock serialization test, since the code it tests
was disabled nearly a year ago.
* str_conv.c (krb5_timestamp_to_sfstring): Don't pass extra argument to
sprintf.
Ken Raeburn [Wed, 1 Sep 1999 21:15:34 +0000 (21:15 +0000)]
From 1.1 branch:
1999-09-01 Danilo Almeida <dalmeida@mit.edu>
* klist.c (do_ccache, show_credential): Use krb5_free_unparsed_name
instead of free.
1999-08-26 Danilo Almeida <dalmeida@mit.edu>
* klist.c (show_credential): Index addresses array with i
in a loop instead of 1. (Thanks to jaltman@columbia.edu)
Ken Raeburn [Wed, 1 Sep 1999 20:59:34 +0000 (20:59 +0000)]
From 1.1 branch.
Indented krb5_cc macros for readability, plus:
1999-08-31 Jeffrey Altman <jaltman@columbia.edu>
* k5-int.h: Add #define ANSI_STDIO for Windows builds so that
stdio opens files in binary mode instead of text
mode. This is necessary for Ctrl-Z transparency.
1999-08-30 Ken Raeburn <raeburn@mit.edu>
* configure.in: Check for memmove and bcopy.
* Makefile.in (install): Install profile.h since krb5.h will use
it.
1999-08-26 Danilo Almeida <dalmeida@mit.edu>
* krb5.hin (krb5_kuserok): Fix calling convention to make it
consistent with rest of krb5 exports before we start exporting
this from the Windows DLL.
1999-08-25 Danilo Almeida <dalmeida@mit.edu>
* k5-int.h (krb5_cc_retrieve_cred_default): Fix calling convention
to make it consistent with actual calling convention.
1999-08-23 Ken Raeburn <raeburn@mit.edu>
* krb5.hin (KRB5_TC_SUPPORTED_KTYPES): New flag.
* k5-int.h (krb5_cc_retrieve_cred_default): Declare.
chpw.c (krb5_mk_chpw_req):
Added call to free cipherpw.data. cipherpw.data is allocated
by krb5_mk_priv and passed back. Since cipherpw is never
passed back, krb5_mk_chpw_req should free it.
* chpw.c (krb5_mk_chpw_req):
Added call to free cipherpw.data. cipherpw.data is allocated
by krb5_mk_priv and passed back. Since cipherpw is never
passed back, krb5_mk_chpw_req should free it.
(krb5_change_password):
Reorganized code so that krb5_change_password actually frees
everything it allocated on error. Also fixed some memory
leaks which happened even without an error occurring.
* changepw.c (krb5_change_password):
Reorganized code so that krb5_change_password actually frees
everything it allocated on error. Also fixed some memory
leaks which happened even without an error occurring.
Danilo Almeida [Fri, 6 Aug 1999 16:07:04 +0000 (16:07 +0000)]
* def_realm.c (krb5_get_default_realm): Check that we have
a realm before trying to copy it (since profile_get_string
may return no error but not get anything).
Danilo Almeida [Thu, 5 Aug 1999 20:37:18 +0000 (20:37 +0000)]
* t_std_conf.c (test_get_krbhst): Use krb5_free_krbhst to
free buffers allocated by krb5_get_krbhst.
* locate_kdc.c (_krb5_use_dns): Add _krb_use_dns to abstract
away looking up of whether we use DNS or not in the profile.
* ktdefname.c (krb5_kt_default_name): Use profile_release_string
instead of free to free string allocated by profile_get_string.
* get_krbhst.c (krb5_get_krbhst): Copy results from profile_get_values
into malloc'ed buffers so we can safely free them later. Also call
profile_free_list on the original values.
* locate_kdc.c (krb5_locate_kdc):
* hst_realm.c (krb5_get_host_realm):
* def_realm.c (krb5_get_default_realm): Use _krb5_use_dns to figure
out whether to use DNS or not instead of directly reading the
profile in this routine.
* realm_dom.c (krb5_get_realm_domain):
* hst_realm.c (krb5_get_host_realm):
* def_realm.c (krb5_get_default_realm): Copy results of
profile_get_string into malloc'ed buffer so it can safely be free'd
later.
* locate_kdc.c (krb5_locate_srv_conf):
* def_realm.c (krb5_get_default_realm):
* changepw.c (krb5_change_password):
* an_to_ln.c (krb5_aname_to_localname): Use profile_free_list
to free values allocated by profile_get_values.
* init_os_ctx.c (os_init_paths): Wrap use of ctx->profile_in_memory
with KRB5_DNS_LOOKUP. Use pointer value to determine whether to free
files by checking the files value rather than depending on the
return value.
Danilo Almeida [Thu, 5 Aug 1999 20:36:27 +0000 (20:36 +0000)]
Document why krb5_win_ccdll_load is called way early in code.
(It is because we need to have the ccapi stuff loaded before trying
to get the OS-specific context initialization where we figure out
default cache names and such.)
Danilo Almeida [Thu, 5 Aug 1999 20:26:47 +0000 (20:26 +0000)]
* init_ctx.c (get_profile_etype_list): Use profile_release_string
to free string allocated by profile_get_string.
(krb5_init_context): Use a real context for krb5_win_ccdll_load.
* get_in_tkt.c (krb5_appdefault_string):
* conv_princ.c (krb5_425_conv_principal): Use profile_free_list
to free values allocated by profile_get_values.
* get_in_tkt.c (_krb5_conf_boolean, krb5_appdefault_boolean):
Rename krb5_conf_boolean to _krb5_conf_boolean to denote that
it is not public so that folks outside the libraries won't
be tempted to use it.
Danilo Almeida [Wed, 4 Aug 1999 03:18:29 +0000 (03:18 +0000)]
Intialize out_creds pointer to 0 and then check whether it is 0 before
trying to dereference it, in case lower-level routine failed to assign
a value to it.
Ken Raeburn [Tue, 3 Aug 1999 20:37:37 +0000 (20:37 +0000)]
* krb5.hin: Wrap all declarations in `extern "C"' for C++, not just some. Move
header file inclusions up above extern-C block. (Fixes PR 729 from Chas
Williams.)
Added line to initialize profile->magic on the Macintosh because all of the other profile library functions check for it and do nothing if it isn't there
Fixed a memory leak in krb5_stdcc_destroy(). The destroy function was failing to free memory allocated for the krb5_ccache. Code to free this memory was swiped from krb5_stdcc_close()