Sam Hartman [Mon, 28 Apr 2003 21:38:02 +0000 (21:38 +0000)]
set-change password breaks kpasswd
In some cases a null realm argument was passed into the function for
locating the kpasswd server. This ended up causing segfaults in
kpasswd. Fix to use the right realm.
Sam Hartman [Sun, 27 Apr 2003 21:07:21 +0000 (21:07 +0000)]
krb5_setpw_result_string should be internal
Make krb5_setpw_result_string a krb5int_ function prototyped in
k5-int.h. The prototype was already there, but the code did not match
the function name.
This needs to be pulled up to the release branch to fix Windows build because of a KRB5_CALLCONV issue.
Ken Raeburn [Fri, 25 Apr 2003 03:09:57 +0000 (03:09 +0000)]
Require only autoconf 2.52. Try --include argument to autoconf and autoheader,
and if the command fails, try it again with --localdir; don't tie it to some
previously used version of autoconf.
Ken Raeburn [Thu, 24 Apr 2003 02:33:04 +0000 (02:33 +0000)]
Simplify autoconf compatibility by requiring that we always have a version that
supports --include, instead of assuming that whether the autoconf to be run
supports it is the same as whether the autoconf used to generate the current
configure scripts supported it.
* aclocal.m4: Require autoconf 2.53.
(CONFIG_RULES): Always set AUTOCONFINCFLAGS to --include.
* kfree.c (krb5_free_pwd_sequences): Actually free the entire
sequence of passwd_phase_elements and not just the first one.
In our tree, this code is only used by krb5_free_pwd_data() which is
subsequently not used anywhere else. Perhaps all code pertaining to pwd
data (asn.1 decoders, encoders, etc. should be removed)
ticket: new
component: krb5-libs
target_version: 1.3
tags: pullup
Ken Raeburn [Fri, 18 Apr 2003 10:08:30 +0000 (10:08 +0000)]
Test AES. ** Not all tests pass at present. **
* default.exp: Add passes for testing AES.
(start_kerberos_daemons): Add a small delay between starting the "tail -f"
processes and appending the markers to their files.
(spawn_xterm): Add RLOGIN, RLOGIND, FTP, and FTPD to the list of variables to
export to the environment. Check that variables are defined before exporting
them.
* g_ad_tkt.c: Added support for login library to get_ad_tkt. Support is copied from Mac Kerberos4 library and conditionalized for USE_LOGIN_LIBRARY to avoid changing get_ad_tkt's behavior for non-Kerberos Login Library builds
Sam Hartman [Wed, 9 Apr 2003 18:19:18 +0000 (18:19 +0000)]
etype info handling infinite loop
If a request contains no des-cbc-crc enctype bumt des-cbc-crc or
des-cbc-md5 existis in the database then an infinite loop is created.
Fix etype info handling to avoid this.
Tom Yu [Wed, 2 Apr 2003 04:47:53 +0000 (04:47 +0000)]
don't install in-tree libdb
Don't install the in-tree libdb. This requires that libkdb,
etc. explicitly pull in the object files of the in-tree libdb if not
using the system libdb.
ticket: new
status: open
target_version: 1.3
tags: pullup
Ken Raeburn [Wed, 2 Apr 2003 00:28:32 +0000 (00:28 +0000)]
* fake-addrinfo.h (COPY_FIRST_CANONNAME) [_AIX]: Define.
(GET_HOST_BY_NAME) [_AIX]: New version for AIX version of gethostbyname_r.
(getaddrinfo) [NUMERIC_SERVICE_BROKEN]: Use "discard" as a dummy service name
instead of none at all. Don't check for unsigned value less than zero.
(getaddrinfo) [COPY_FIRST_CANONNAME]: Set any ai_canonname fields other than
the first one to null.
Ken Raeburn [Fri, 28 Mar 2003 22:59:45 +0000 (22:59 +0000)]
* kcmd.c (kcmd_connect): Log errors if a connect to port 0 is attempted.
Report port number in connection failure.
(setup_secondary_channel): Use socklen_t for socket address length.
Tom Yu [Fri, 28 Mar 2003 22:51:33 +0000 (22:51 +0000)]
* kdc_preauth.c (verify_enc_timestamp): Save decryption error, in
case we get NO_MATCHING_KEY later. This allows us to log a more
sane error if an incorrect password is used for encrypting the
enc-timestamp preauth.
ticket: 1324
status: open
target_version: 1.3
tags: pullup
* configure.in: Use KRB5_AC_NEED_BIND_8_COMPAT to check for bind 9 and higher. When bind 9 is present, BIND_8_COMPAT needs to be defined to get bind 8 types
* aclocal.m4: Define KRB5_AC_NEED_BIND_8_COMPAT to check for bind 9 and higher. When bind 9 is present, BIND_8_COMPAT needs to be defined to get bind 8 types
Sam Hartman [Mon, 17 Mar 2003 01:03:11 +0000 (01:03 +0000)]
Disable krb4 cross-realm in krb524d and krb5kdc. Provide an option to
reenable (-X) which prints a warning that you are creating a security
hole.
Remove support for generating krb4 tickets encrypted using 3DES
service keys as it is insecure. They are still accepted however.
The KDc is much more strict about accepting only tickets that it would
have issued in the current configuration. In particular if the KDC
would choose some enctype for writing a TGT, other enctypes will not
be accepted when using a TGT.
Sam Hartman [Fri, 14 Mar 2003 20:37:36 +0000 (20:37 +0000)]
Do not claim GSS_C_PROT_READY_FLAG since we don't support it
Our code does not currently support GSS_C_PROT_READY_FLAG so only
return that flag after context establishment. A potential future
addition is to support that flag and return GAP_TOKEN if the initiator
processes a message token before the final context token.
Ken Raeburn [Fri, 14 Mar 2003 19:50:00 +0000 (19:50 +0000)]
* default.exp (setup_root_shell): If we get connection refused messages,
followed by no unrecognized errors and then eof, report it as an unsupported
test.
Tom Yu [Thu, 13 Mar 2003 01:04:35 +0000 (01:04 +0000)]
* Makefile.in (AWK): Default to awk, not gawk. User can override
on make's command line if necessary. Still, only really useful
for building kerbsrc.zip, etc.
Ken Raeburn [Wed, 12 Mar 2003 04:33:30 +0000 (04:33 +0000)]
Rewrite asn1_get_tag interface to use a structure pointer rather than several
pointer variables for the returned data. Use the structure in the caller when
straightforward; in cases where macros use different but overlapping sets of
automatic scalar variables in one file, copy the values out of the structures
for now, until they can be analyzed more carefully.
* asn1_get.c (asn1_get_tag): Deleted.
(asn1_get_tag_2): Renamed from asn1_get_tag_indef, now uses a pointer to
taginfo rather than a bunch of pointer args.
(asn1_get_id, asn1_get_length): Folded into asn1_get_tag_2.
(asn1_get_sequence): Call asn1_get_tag_2.
* asn1_get.h (taginfo): New structure.
(asn1_get_tag_indef, asn1_get_tag, asn1_get_id, asn1_get_length): Declarations
deleted.
(asn1_get_tag_2): Declare.
* asn1_decode.c (setup): Declare only a taginfo variable.
(asn1class, construction, tagnum, length): New macros.
(tag): Call asn1_get_tag_2.
* asn1_k_decode.c (next_tag, get_eoc, apptag, end_sequence_of,
end_sequence_of_no_tagvars, asn1_decode_krb5_flags): Call asn1_get_tag_2; if no
error, copy out values into scalar variables.
(asn1_decode_ticket): Call asn1_get_tag_2.
* asn1buf.c (asn1buf_skiptail): Call asn1_get_tag_2.
* krb5_decode.c (check_apptag, next_tag, get_eoc): Call asn1_get_tag_2; if no
error, copy out values into scalar variables.
(decode_krb5_enc_kdc_rep_part): Call asn1_get_tag_2.
Ken Raeburn [Sat, 8 Mar 2003 20:50:54 +0000 (20:50 +0000)]
Yet another attempt at cross-directory dependencies. Seems to fix the parallel
build, and hasn't broken the out-of-date case so far as I can tell, so far...
Added a bunch of comments describing the cases that need to be handled.
* Makefile.in ($(BUILDTOP)/include/gssapi/gssapi.h, generic/gssapi.h,
generic/gssapi_err_generic.h, krb5/gssapi_err_krb5.h): Comment out old rules
and dependencies; depend on all-recurse and supply a no-op rule.
* c_ustime.c: Removed Mac OS 9 code. * ccdefname.c: Conditionalize on USE_CCAPI and not TARGET_OS_MAC so Darwin builds work. * init_os_ctx.c: Modified to use DEFAULT_SECURE_PROFILE_PATH and DEFAULT_PROFILE_PATH for KfM homedir-relative config files. * read_pwd.c: Cast to remove const warnings. * timeofday.c: Do the same thing on the Mac as on Unix
* CCache-glue.c: Added prototypes for deprecated functions. Made internal functions static. Removed unused CoreServices include. Changed TICKET_GRANTING_TICKET to new macro: KRB_TICKET_GRANTING_TICKET. * change_password.c: Added check of inputs to krb_change_password so we don't crash on bad inputs. Call des_string_to_key not mit_password_to_key on all platforms because we don't want to prompt for a password. * FSp-glue.c: Added prototypes for deprecated functions. Changed to use KfM's FSSpecToPOSIXPath which correctly handles FSSpecs where the file does not exist. * g_in_tkt.c: Added explanatory comments. Made TARGET_OS_MAC sections a little smaller and easier to read. * g_pw_in_tkt.c: Only prompt when we are not using the login library. This is so that Darwin builds do prompt but KfM builds don't. * g_svc_in_tkt.c, g_tkt_svc.c: Changed to use KRB_TICKET_GRANTING_TICKET. * kadm_net.c: Use autoconf variable krb5_sigtype instead of sigtype, which doesn't seem to be defined on Mac OS X. * krb4int.h, RealmsConfig-glue.c: Removed krb_get_stk(). * rd_req.c: Added #ifdef KRB4_USE_KEYTAB to avoid unused variable warning when KRB4_USE_KEYTAB is not defined. * sendauth.c: Fixed warnings with casts
* disp_com_err_status.c, gssapi_generic.h: Removed Mac header goober. * gssapiP_generic.h, gssapi.hin: Removed macintosh check because we don't build on OS 9 anymore. * gssapi.hin: Removed enumsalwaysint because there are no typed enums in this header. Removed duplicate CFM-68K magic
* gss_libinit.c: Removed Mac header goober. Fixed USE_HARDCODED_FALLBACK_ERROR_TABLES macro used by KfM. * gss_libinit.h: do not use the same multiple include protection macro as krb5_libinit.h. Changed to GSSAPI_LIBINIT_H
* mac_des_glue.c, des.c, enc_dec.c, key_sched.c, str_to_key.c: Move KfM des functions into their own file. They are all deprecated on KfM and shouldn't even get built on stock krb5 builds. * read_passwd.c: Added warning comment that des_read_pw_string is an exported function on KfM, so we should not change its ABI
* krb5.h: Removed enumsalwaysint because there are no typed enums in this header. * k5-int.h: Removed Mac OS header goober. Added prototype for os_get_default_config_files which will be used by KfM's preference APIs (KFM needs to get the secure default files as well as the normal ones). Moved profile.h inclusion higher so it gets included before this function and thus its types are defined (the reason I put it where I did was there is another config file function next to it)
* osconf.h: Added DEFAULT_SECURE_PROFILE_PATH so that KfM will only search paths that start with ~/ (homedir-based) when getting an insecure context. This is the same as DEFAULT_PROFILE_PATH on all other platforms, which allows us to avoid more references to TARGET_OS_MAC in krb5 sources
* des.h, krb.h: Removed deprecated KfM functions. They will be exported but not in the headers to discourage new callers. Removed enumsalwaysint because there are no typed enums in this header. * des.h: Made afs_string_to_key public on all platforms. (OpenAFS folk think this is okay.) * krb.h, prot.h: Made KRB_TICKET_GRANTING_TICKET public and removed non-public TICKET_GRANTING_TICKET because this macro is used in lots of places by KfM, including some clients. Made krb__get_srvtabname non-private because it is used by KEYFILE. * kadm.h: moved definition of MAXHOSTNAMELEN below the inclusion of other headers so that if it gets defined by those other headers or headers they include, we don't get a redefinition error (this happens on Mac OS X)
* cnv_tkt_skey.c, conv_creds.c, conv_princ.c, encode.c, sendmsg.c: Removed Mac-specific includes. * conv_creds.c: If we are on the Mac and using the CCAPI, set the string_to_key type to MIT. * krb524.h: Removed enumsalwaysint because there are no enums in this header. Also include krb524_err with <> because on Mac OS X both are public headers and should not be included with "". * Makefile.in: set KRB524_PRIVATE while building so that Darwin builds see these prototypes. Otherwise the Darwin build will fail
The prefix file for KfM 5.0. This file has all the #defines for Mac OS X which are normally specified by -Dfoo on the command line by the krb5 build system. Since KfM uses Project Builder, we specify them here
* profile.hin, prof_file.c (profile_flush_file_data): Stop copying the resource fork. We stopped writing resources to the krb5 configuration in KfM 4.5.x. In KfM 5.0 will no longer read preferences from the resource fork so we can destroy it on copy. * prof-int.h: No longer include MoreFiles. Removed framework style includes for Kerberos headers. * prof_FSp_glue.c, prof_init.c, profile.hin: Moved Mac FSSpec-based functions into a separate file so they will only be built with KfM. These functions will be exported but not in the headers because they are deprecated
* com_err.c, com_err.h, error_message.c, et_c.awk, et_h.awk: Removed Mac OS 9-specific code. * et_h.awk: define compat macro for init_foo_err_table so that it gets defined to nothing on the Mac
Tom Yu [Thu, 6 Mar 2003 01:36:51 +0000 (01:36 +0000)]
* acquire_cred.c (krb5_gss_register_acceptor_identity): New
function. Allows global override of default keytab for
gss_acquire_cred() purposes.
(acquire_accept_cred): Implement override.