Mitchell Berger [Thu, 21 Jun 2001 11:09:17 +0000 (11:09 +0000)]
* kdb_xdr.c: Replaced function krb5_dbe_update_generation_number_general
with similar functions krb5_dbe_set_generation_number_general and
krb5_dbe_increment_generation_number_general.
Mitchell Berger [Thu, 21 Jun 2001 11:05:54 +0000 (11:05 +0000)]
* server_kdb.c (kdb_put_entry): Modified to perform the generation
number update conditional upon success of kdb_put_entry_internal.
(kdb_put_entry_internal): No longer takes incgen argument or updates
generation number.
(kdb_update_generation_number): Changed from using
krb5_dbe_update_generation_number_general to using
krb5_dbe_increment_generation_number_general. Also uses new calling
sequence for kdb_put_entry_internal.
Mitchell Berger [Thu, 21 Jun 2001 10:58:54 +0000 (10:58 +0000)]
* kdb5_create.c (add_principal): Changed from using
krb5_dbe_update_generation_number_general to using
krb5_dbe_set_generation_number_general on creation of master principal.
Mitchell Berger [Thu, 21 Jun 2001 10:54:51 +0000 (10:54 +0000)]
* kdb.h: Replaced prototype of krb5_dbe_update_generation_number_general
with prototypes for krb5_dbe_set_generation_number_general and
krb5_dbe_increment_generation_number_general.
Mitchell Berger [Wed, 20 Jun 2001 08:17:07 +0000 (08:17 +0000)]
* adb.h: Forward declaration of struct _kadm5_server_handle_t added
(had to be this way because simply having it include server_internal.h
and using the typedef found there causes inclusion in the wrong order).
A pointer to a _kadm5_server_handle_t structure has been added to the
_osa_adb_db_ent_t structure. This was needed for a frustrating and
non-ideal reason, and it's a bit of a kludge. Read the lengthy comment
in the file for an explanation of why this was done. A struct
_kadm5_server_handle_t pointer was added to the prototypes of
osa_adb_init_db and osa_adb_open_policy.
* admin.h: Prototype added for kadm5_get_generation_number.
* admin_xdr.h: Prototypes added for xdr_getgeneration_arg and
xdr_getgeneration_ret.
* kadm_rpc.h: Added struct getgeneration_arg and struct
getgeneration_ret and typedefs for them, defined GET_GENERATION_NUMBER,
added prototypes for getgeneration_4_svc and getgeneration_4.
* kadm_rpc_xdr.c: Added new functions xdr_getgeneration_arg and
xdr_getgeneration_ret.
* server_internal.h: Added prototypes for kdb_put_entry_internal and
kdb_update_generation_number.
Mitchell Berger [Wed, 20 Jun 2001 08:16:10 +0000 (08:16 +0000)]
* lock-test.c: Changed to include server_internal.h instead of adb.h.
(main): kadm5_server_handle_rec added for use with the new
osa_adb_open_policy calling sequence.
Mitchell Berger [Wed, 20 Jun 2001 08:13:20 +0000 (08:13 +0000)]
* Makefile.in: Include svr_generation.[co] in the build
* adb_openclose.c: Changed to include server_internal.h instead of
adb.h.
(osa_adb_rename_db): Modified to use the new osa_adb_init_db calling
sequence.
(osa_adb_init_db): Now takes a pointer to a struct
_kadm5_server_handle_t, and puts it in the osa db handle.
* adb_policy.c: Changed to include server_internal.h instead of adb.h
(osa_adb_open_policy): Now takes a pointer to a struct
_kadm5_server_handle_t and passes it to osa_adb_init_db.
(osa_adb_create_policy): Now makes a call to update the generation
number.
(osa_adb_destroy_policy): Now makes a call to update the generation
number.
(osa_adb_put_policy): Now makes a call to update the generation number.
* server_kdb.c: Renamed kdb_put_entry to kdb_put_entry_internal and
added parameters to it to specify whether the modprinc info and the
generation number should be updated, wrote a new kdb_put_entry as a
wrapper for kdb_put_entry_internal that specifies both modprinc info
and the generation number should be updated.
(kdb_delete_entry): Now makes a call to update the generation number.
Added a new function kdb_update_generation_number which looks up the
master principal and calls krb5_dbe_update_generation_number_general
to update the generation number.
* server_misc.c: No longer includes adb.h (server_internal.h already
pulls this in).
(adb_policy_init): Modified to use the new osa_adb_open_policy
calling sequence.
* svr_iters.c: No longer includes adb.h (server_internal.h already
pulls this in).
* svr_policy.c: No longer includes adb.h (server_internal.h already
pulls this in).
* svr_principal.c: No longer includes adb.h (server_internal.h already
pulls this in).
* svr_generation.c: Added this new file containing the new function
kadm5_get_generation_number.
Mitchell Berger [Wed, 20 Jun 2001 07:24:11 +0000 (07:24 +0000)]
* dump.c: Changed to include server_internal.h instead of adb.h.
(load_db): kadm5_server_handle_rec added for the new
osa_adb_open_policy calling sequence.
* kdb5_create.c: Comment about steps in creating a database updated to
include a step where the generation number is initialized. Call to
initialize the generation number upon creation of the master principal
added.
* kdb5_util.c: Changed to include server_internal.h instead of adb.h.
(open_db_and_mkey): kadm5_server_handle_rec added for the new
osa_adb_open_policy calling sequence.
* loadv4.c: Unimportant whitespace change in a comment.
Mitchell Berger [Wed, 20 Jun 2001 06:49:27 +0000 (06:49 +0000)]
* kdb.h: KRB5_TL_GENERATION_NUMBER defined, prototypes for new
functions krb5_dbe_update_generation_number_general and
krb5_dbe_lookup_generation_number_general added.
Mitchell Berger [Wed, 20 Jun 2001 03:58:06 +0000 (03:58 +0000)]
* krb524d.c: Call krb5_klog_init before the first point where the
klog facility may be used, delete ifdef'd out code to make that
call from later in the file, conditionalize kadm5_destroy on the
handle being non-null, and correct an indentation error.
Ken Raeburn [Wed, 20 Jun 2001 00:00:05 +0000 (00:00 +0000)]
Use a "struct addrlist" instead of separate count and pointer-to-pointer values
for internal interfaces for looking up servers. Add a new routine to free the
addrlist contents, so that memory management can be changed in one place.
Tom Yu [Tue, 19 Jun 2001 20:32:12 +0000 (20:32 +0000)]
* kdc_util.c (ktypes2str): New function; construct a string
containing a list of enctypes, given a number and list of
enctypes.
(rep_etypes2str): New function; construct a string indicating all
three enctypes associated with a KDC reply.
* kdc_util.h: Add prototypes for ktypes2str() and
rep_etypes2str().
* do_as_req.c (process_as_req): Call ktypes2str() and
rep_etypes2str() as appropriate.
* do_tgs_req.c (process_tgs_req): Call ktypes2str() and
rep_etypes2str() as appropriate.
Ezra Peisach [Mon, 18 Jun 2001 18:25:22 +0000 (18:25 +0000)]
* acconfig.h: Add HAVE_REGCOMP
* aclocal.m4 (KRB5_AC_NEED_LIBGEN): Determins if libgen is really
needed to be linked with executables by determining if regcomp()
is missing or non-functionl and then if compile/step will be used.
(KRB5_AC_REGEX_FUNCS): Rewritten to require KRB5_AC_NEED_LIBGEN.
(KRB5_BUILD_PROGRAM): Use KRB5_AC_NEED_LIBGEN instead of testing
for compile in libgen.
Ezra Peisach [Mon, 18 Jun 2001 14:10:36 +0000 (14:10 +0000)]
* auth_gssapi.c (auth_gssapi_create): Cast const gss_OID to
gss_OID for gssapi functions.
* xdr.c (xdr_u_int, xdr_int32, xdr_u_int32): If enumerated
operation is not XDR_ENCODE, XDR_DECODE or XDR_FREE - return FALSE
instead falling off end of function.
Ezra Peisach [Mon, 18 Jun 2001 14:04:38 +0000 (14:04 +0000)]
* accept_sec_context.c acquire_cred.c import_sec_context.c
init_sec_context.c inq_cred.c: Cast const gss_OID to gss_OID for
gssapi functions which are not speced with const in the RFC.
Ezra Peisach [Mon, 18 Jun 2001 01:44:03 +0000 (01:44 +0000)]
* logger.c (klog_vsyslog): If krb5_klog_init() is not called, do
not pass a NULL pointer to vsprintf for a %s format. Also, if
syslog() exists on the system, fallback to using this so the
message is not dropped on the floor.
Tom Yu [Tue, 12 Jun 2001 21:50:23 +0000 (21:50 +0000)]
* resolve.c (main): Make error message note that misconfiguration
of /etc/hosts, as well as problems with resolver library, are all
likely to cause failure.
Ezra Peisach [Mon, 11 Jun 2001 16:14:23 +0000 (16:14 +0000)]
* setenv.c: Add prototype for _findenv to avoid inconsistancy of
static vs. extern.
* heuristic.c (find_either_ticket): Change krb5_tgtname() to
ksu_tgtname().
* ccache.c: Include <sys/types.h> and <sys/stat.h> for start()
prototype.
* krb_auth_su.c: Reindent for readability. Remove defunct
code. Change use of krb5_tgtname to ksu_tgtname().
* ksu.h: Include k5-util.h for krb5_seteuid() prototype. Add
prototype for ksu_tgtname. Add prototype for unsetenv() if not
defined.
* main.c: Include grp.h for initgroups() prototype. Cleanup
assignment in conditional warning. Reindent for
readability. Arguments to print_status made consistant with regard
to long vs. int. Change krb5_tgtname to ksu_tgtname. (do not use
an internal krb5 function that is not advertised).
Ezra Peisach [Mon, 11 Jun 2001 14:49:37 +0000 (14:49 +0000)]
* krshd.c: Include <grp.h>, <libpty.h>, and <sys/wait.h> for
initgroups(), pty_logwtmp()/pty_make_sane_hostname(), and wait()
prototypes. For local initgroups definition, conditionalize on
HAVE_INITGROUPS and not __SCO__.
* krcp.c: Include <sys/wait.h> for wait()/waitpid() prototype.
Ezra Peisach [Fri, 8 Jun 2001 17:19:02 +0000 (17:19 +0000)]
* v4gssftp.exp: During test, set KRB5CCNAME to a non-existant
cache. Restore at end to previous setting. This prevents failures
caused when the krb5 cache contains valid information - as in the
case of this test being run immediately after the gssftp.exp test.
Ezra Peisach [Fri, 8 Jun 2001 16:12:07 +0000 (16:12 +0000)]
* client.c: Include unistd.h for getopt() prototype
* configure.in: Check for unistd.h.
* server.c: Include unistd.h for getopt() prototype. Fix
rpc_test_badauth() prototype to be consistant with error
handler. Declare main as returning int. If POSIX_SIGNALS is
defined, the handler expects an argument.