Ken Raeburn [Thu, 2 Dec 1999 23:10:59 +0000 (23:10 +0000)]
* init_os_ctx.c (krb5_secure_config_files): Do define; always return an error,
but perform old functionality in case the error is ignored. Delete when we can
make a major version number change.
Ken Raeburn [Tue, 23 Nov 1999 10:57:50 +0000 (10:57 +0000)]
* init_ctx.c (init_common): Renamed from krb5_init_context, now static. New
argument SECURE provides initialization of profile_secure field.
(krb5_init_context): Call it.
(krb5_init_secure_context): New function.
* in_tkt_ktb.c (keytab_keyproc): Now static.
* in_tkt_pwd.c (pwd_keyproc): Now static.
* in_tkt_sky.c (skey_keyproc): Now static.
* preauth2.c (krb5_do_preauth): Fix syntax in switch statement. Cast padata
contents pointer to avoid warning.
(pa_types): Now static.
* str_conv.c (krb5_deltat_to_string): Always write to a local temporary buffer
that's guaranteed to be large enough, then see if the supplied output buffer is
big enough.
(krb5_string_to_deltat): Deleted.
* x-deltat.y, deltat.c: New files.
* Makefile.in (deltat.c): Add rule for building from x-deltat.y, but comment
out dependencies for easier maintenance.
(BISON, BISONFLAGS): New variables.
* str_conv.c: Removed most static char arrays, substituting the values in place.
(krb5_string_to_timestamp): Move atime_format_table inside here.
(krb5_timestamp_to_sfstring): Move sftime_format_table inside here.
* str_conv.c: If strftime or strptime are not available, include the renamed
NetBSD versions, and define the function names as macros to map them to the
replacement names.
(__P, _CurrentTimeLocale, dummy_locale_info, TM_YEAR_BASE, DAYSPERLYEAR,
DAYSPERNYEAR, DAYSPERWEEK, isleap, tzname, tzset): Define some dummies for
strftime/strptime to use.
(strptime): Deleted old stub version.
(krb5_timestamp_to_string, krb5_timestamp_to_sfstring): Always assume strftime
is available.
(krb5_string_to_timestamp): Assume strptime is always available.
* strftime.c, strptime.c: New files, based on NetBSD versions. Modified to
rename the functions and not export any symbols.
* Makefile.in (T_DELTAT_OBJS): New variable.
(TEST_PROGS): Add t_deltat.
(t_deltat): Add rule.
(clean): Added t_deltat stuff. Run rm only once.
* t_deltat.c: New file.
Ken Raeburn [Tue, 23 Nov 1999 09:32:24 +0000 (09:32 +0000)]
* xmalloc.c: New file, providing versions of malloc, calloc, realloc, and
strdup that print messages and exit if memory allocation fails.
* Makefile.in (SRCS, OBJS): Use it.
* authorization.c, ccache.c, heuristic.c, main.c: Change all calls to malloc,
calloc, realloc, and strdup to call x* versions if the return value is not
checked before use.
* authorization.c (auth_cleanup): Ditch int arguments, check for null pointers
instead.
(krb5_authorization): Update calls. Initialize file pointers to null.
(init_auth_names): Check for buffer overflow.
* ksu.h (get_dir_of_file): Argument now points to const.
* main.c (cc_source_tag, cc_source_tag_tmp): Now point to const.
(main): Unset environment variable KRB5_CONFIG. Delete -C option. Force an
error if lifetime strings are over 14 characters. Fix error message string if
setluid fails. Cast pid to long for printing.
(get_dir_of_file): Argument now points to const.
Tom Yu [Mon, 1 Nov 1999 21:22:16 +0000 (21:22 +0000)]
* krb5_decode.c (begin_structure): Update to deal with indefinite
encodings better; also call asn1_get_sequence().
* asn1_k_decode.c (sequence_of): Update to deal with indefinite
encodings better.
(begin_structure): Update to deal with indefinite encodings
better; also call asn1_get_sequence().
* asn1_get.h: Update prototypes for asn1_get_tag_indef(),
asn1_get_tag(), asn1_get_sequence(), asn1_get_length().
* asn1_get.c (asn1_get_tag_indef): New function; get tag info,
lengths, etc. as well as flag indicating whether the length is
indefinite.
(asn1_get_tag): Modify to just call asn1_get_tag_indef().
(asn1_get_sequence): Call asn1_get_tag_indef() in order to
determine whether encoding is indefinite length.
(asn1_get_length): Add "indef" arg to indicate whether an encoding
has an indefinite length.
* asn1buf.h: Update asn1buf_imbed() prototype.
* asn1buf.c (asn1buf_imbed): Add "indef" arg so that we don't
treat a definite zero-length encoding as an indefinite encoding.
Tom Yu [Fri, 15 Oct 1999 01:08:18 +0000 (01:08 +0000)]
* preauth2.c (krb5_do_preauth): Add gross workaround for 1.0.x KDC
returning a bogus PA-PW-SALT in a KRB-ERROR message when a
principal requires preauth: ignore salt hints if an etype_info is
present.
Ken Raeburn [Thu, 23 Sep 1999 21:58:52 +0000 (21:58 +0000)]
* logger.c (DEVICE_PRINT, klog_com_err_proc, klog_vsyslog): Use proper format
strings to fprintf, instead of net-supplied data. Fold in writes of following
end-of-line sequences when appropriate.
Ken Raeburn [Tue, 21 Sep 1999 06:26:29 +0000 (06:26 +0000)]
* changepw.c: Changes from Jeffrey Altman to look up kpasswd server using DNS.
Placed entirely under #ifdef KRB5_DNS_LOOKUP so currently-MIT-supported
functionality (i.e., no DNS) can't be impacted; without KRB5_DNS_LOOKUP
defined, old code is used unchanged.
(krb5_locate_kpasswd): New function, split out from krb5_change_password.
Calls krb5_locate_srv_dns if use of DNS is desired, and krb5_locate_srv_conf to
check config file.
(krb5_change_password): Call it to find the server.
* locate_kdc.c (krb5_locate_srv_conf): No longer static. Choose default port
numbers based on service name rather than a single hard-coded value.
(krb5_locate_srv_dns): No longer static.
* win-pre.in: Fix DNS flags it does not try to depend on mit dir.
Define NULL so we can do directory existence checks via the shell
under both NT and 9x.
Ken Raeburn [Tue, 7 Sep 1999 22:21:34 +0000 (22:21 +0000)]
* definitions.texinfo: Update for 1.1 release
* admin.texinfo (Adding or Modifying Principals): Mention des3 enctype for host
keys.
* build.texinfo: Replace "krb5-1.0" with "krb5-@value{RELEASE}" throughout.
(Shared Library Support): Cut supported-OS list down to Solaris and Irix for
now.
* install.texinfo: Update EDITION to 1.1.
(MacOS X Configuration): New node, with info from Brad Thompson.
(Encryption Types and Salt Types): Mention des3.
Ken Raeburn [Wed, 1 Sep 1999 01:24:31 +0000 (01:24 +0000)]
* default.exp (setup_kerberos_files): Set kdc_supported_enctypes in kdc.conf,
and include des3-cbc-sha1:normal.
(setup_kerberos_db): If setting up krbtgt to use des3, now use only des3, not
des3 and des-crc both.
Ken Raeburn [Wed, 1 Sep 1999 00:25:26 +0000 (00:25 +0000)]
* admin.texinfo (Kadmin Options): Describe -e option.
(The User/Kerberos Interaction): Renamed from User--Kerberos to avoid an
apparent makeinfo bug.
(realms (kdc.conf)): Document kdc_supported_enctypes, and mention how des3 can
be used there. Add des-cbc-crc:v4 to both enctype lists, in the descriptions
and in the examples.
(Date Format): Avoid 2-digit years, and add a warning about them.
Ken Raeburn [Mon, 30 Aug 1999 20:24:23 +0000 (20:24 +0000)]
* api.2/init-v2.exp (RESOLVE): New variable.
(get_hostname): New proc, taken from tests/dejagnu.
(test101): Use get_hostname, set a variable in the target process to hold the
result, and use that variable in the other commands passed.
* Makefile.in (unit-test-client-body): Pass $(RUNTESTFLAGS) to runtest, so the
user can run subsets of the test suite.
(unit-test-server-body): Likewise.
Ken Raeburn [Mon, 30 Aug 1999 18:42:29 +0000 (18:42 +0000)]
* default.exp (des3_krbtgt): New variable.
(setup_kerberos_files): Remove des3 from supported_enctypes in kdc.conf.
(setup_kerberos_db): If des3_krbtgt is set, change krbtgt key, and get a des3
key in addition to des.