summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5
Commit message (Collapse)AuthorAgeFilesLines
...
* * cc_mslsa.c: Enforce acceptable enctypes by checking againstJeffrey Altman2004-06-192-56/+121
| | | | | | | | | | | | | | the default_tgs_enctypes list instead of the permitted_enctypes list; only enforce the desired enctype when retrieving tickets to deliver to an application. do not enforce when attempting to determine the current principal name. this is important because specifying an enctype results in a TGS_REQ being sent to the KDC; close memory leak of krb5_cred objects in krb5_lcc_retrieve(). ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16500 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (OBJFILEDEP, OBJFILELIST) [DOS]: Include locally built objectKen Raeburn2004-06-182-2/+11
| | | | | | | files. (OBJFILE, LIBOBJS, LOCALINCLUDES) [DOS]: Define. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16486 dc483132-0cff-0310-8789-dd5450dbe970
* Purge make targets and variables (and a few files) relating to the old,Ken Raeburn2004-06-176-6/+12
| | | | | | unmaintained Mac OS 9 (and earlier) support. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16473 dc483132-0cff-0310-8789-dd5450dbe970
* make dependTom Yu2004-06-161-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16470 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (LOCALINCLUDES): Add $srcdir/osKen Raeburn2004-06-162-1/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16464 dc483132-0cff-0310-8789-dd5450dbe970
* * krb5_libinit.c: Include os-proto.hKen Raeburn2004-06-162-2/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16463 dc483132-0cff-0310-8789-dd5450dbe970
* * krb5_libinit.c (krb5int_lib_init): Initialize krb5int_us_time_mutexKen Raeburn2004-06-152-0/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16455 dc483132-0cff-0310-8789-dd5450dbe970
* Localize the OS-specific bits of retrieving the current time a bit more.Ken Raeburn2004-06-153-44/+78
| | | | | | | | | | | | | | | | ** not yet tested on Windows ** * c_ustime.c: Include k5-thread.h. (get_time_now): New function, holds system-dependent code. (krb5int_us_time_mutex): New mutex. (struct time_now): New type. (last_time): New variable, replaces old last_tv, last_sec, last_usec. (krb5_crypto_us_timeofday): Rewrite. Do locking around access to previously returned value, and ensure that we don't return duplicate values. * os-proto.h: Include k5-thread.h. (krb5int_us_time_mutex): Declare. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16454 dc483132-0cff-0310-8789-dd5450dbe970
* * libkrb5.exports: Drop krb5_init_ets, krb5_free_ets, krb5_kt_default_vno, andKen Raeburn2004-06-152-4/+5
| | | | | | krb5int_profile_shared_data. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16452 dc483132-0cff-0310-8789-dd5450dbe970
* * rc_io.c (dir, dirlen): Top-level variables deleted.Ken Raeburn2004-06-152-10/+19
| | | | | | | | (getdir): Now returns the pointer, doesn't set top-level variables. (GETDIR): Set local variables dir and dirlen using the function's return value. (krb5_rc_io_creat, krb5_rc_io_open_internal): Add the new local variables. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16450 dc483132-0cff-0310-8789-dd5450dbe970
* * kt_file.c (krb5_kt_default_vno): Replaced variable with macroKen Raeburn2004-06-152-1/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16449 dc483132-0cff-0310-8789-dd5450dbe970
* * asn1_encode.c (asn1_encode_generaltime): Fix memcpy argument to actuallyKen Raeburn2004-06-113-12/+24
| | | | | | | | | | | | be a pointer. (asn1_encode_enumerated): Drop "const" from scalar argument type. * asn1_encode.h (asn1_encode_integer, asn1_encode_enumerated, asn1_encode_unsigned_integer, asn1_encode_octetstring, asn1_encode_charstring, asn1_encode_printablestring, asn1_encode_ia5string, asn1_encode_generaltime, asn1_encode_generalstring): Drop "const" from scalar argument types. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16431 dc483132-0cff-0310-8789-dd5450dbe970
* ugh. revert last changeKen Raeburn2004-06-092-6/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16426 dc483132-0cff-0310-8789-dd5450dbe970
* * sendto_kdc.c (krb5int_sendtokdc_debug_handler) [!DEBUG]: Define as a macro,Ken Raeburn2004-06-092-1/+6
| | | | | | not a variable. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16425 dc483132-0cff-0310-8789-dd5450dbe970
* Run make dependSam Hartman2004-06-082-10/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16424 dc483132-0cff-0310-8789-dd5450dbe970
* * asn1_encode.c (asn1_encode_generaltime): Use gmtime_r if availableKen Raeburn2004-06-042-3/+16
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16414 dc483132-0cff-0310-8789-dd5450dbe970
* * str_conv.c (krb5_string_to_timestamp): Use localtime_r if available.Ken Raeburn2004-06-042-2/+21
| | | | | | (krb5_timestamp_to_string, krb5_timestamp_to_sfstring): Likewise. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16413 dc483132-0cff-0310-8789-dd5450dbe970
* * parse.c (krb5_parse_name): Use assert and abort, not exitKen Raeburn2004-06-042-5/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16412 dc483132-0cff-0310-8789-dd5450dbe970
* Change all uses of LIB in UNIX makefiles to LIBBASE, for better WindowsKen Raeburn2004-06-042-1/+5
| | | | | | | | | compatibility. (Windows nmake exports make variables into the environment, and LIB is treated by the Windows linker as a search path for libraries, thus breaking the linking on Windows of anything needing libraries from the search path in directories where we build libraries on UNIX.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16411 dc483132-0cff-0310-8789-dd5450dbe970
* OopsKen Raeburn2004-06-042-1/+9
| | | | | | | * srv_rcache.c (krb5_get_server_rcache): Don't forget to actually include the cache type in the cache name, after looking it up. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16410 dc483132-0cff-0310-8789-dd5450dbe970
* * kuserok.c (krb5_kuserok): Handle draft POSIX versions of getpwnam_rKen Raeburn2004-06-042-2/+20
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16409 dc483132-0cff-0310-8789-dd5450dbe970
* Oops. Add and remove k524 error table tooKen Raeburn2004-06-022-1/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16389 dc483132-0cff-0310-8789-dd5450dbe970
* Add/remove error tables in library initialization/termination, not per context.Ken Raeburn2004-06-026-23/+28
| | | | | | | | | | | | | | Use only one library initialization scheme, and install the error tables in only one place. * krb5_libinit.c (initialized): Variable deleted, all references removed. (krb5int_lib_init): Initialize error tables here. (krb5int_initialize_library): Don't do it here. * error_tables/Makefile.in (STLIBOBJS, OBJS, SRCS): Drop init_ets code. * krb/init_ctx.c (init_common): Don't call krb5_init_ets. (krb5_free_context): Don't call krb5_free_ets. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16388 dc483132-0cff-0310-8789-dd5450dbe970
* * srv_rcache.c (krb5_get_server_rcache): Use krb5_rc_resolve_full instead ofKen Raeburn2004-06-022-13/+13
| | | | | | constructing an rcache object locally. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16387 dc483132-0cff-0310-8789-dd5450dbe970
* Move definitions of struct krb5_rc_st, struct _krb5_rc_ops, krb5_rc_ops, andKen Raeburn2004-06-026-1/+49
| | | | | | | declarations of krb5_rc_register_type, krb5_rc_dfl_ops from k5-int.h to rc-int.h. Include rc-int.h in the krb5/rcache files that need it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16386 dc483132-0cff-0310-8789-dd5450dbe970
* fix missing braces in an_to_ln.c security patchTom Yu2004-06-022-1/+7
| | | | | | | | | | | | | * an_to_ln.c (do_replacement): Patch from Bill Dodd to fix missing braces in previous security patch. ticket: new tags: pullup target_version: 1.3.4 version_reported: 1.3.4 component: krb5-libs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16384 dc483132-0cff-0310-8789-dd5450dbe970
* fix buffer overflow in an_to_ln.cTom Yu2004-06-012-4/+48
| | | | | | | | | | | | | | | * an_to_ln.c (rule_an_to_ln): Fix buffer overflow when parsing principal names into components. (do_replacement): likewise (aname_replacer): Support error return from do_replacement ticket: new version_reported: 1.3.3 target_version: 1.3.4 tags: pullup component: krb5-libs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16381 dc483132-0cff-0310-8789-dd5450dbe970
* Add prototypes for library init and fini functions. Makefile dependenciesEzra Peisach2004-05-2815-6/+129
| | | | | | updated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16371 dc483132-0cff-0310-8789-dd5450dbe970
* * cc_mslsa.c: GetMSTGT(). Add krb5_contextJeffrey Altman2004-05-262-32/+26
| | | | | | | | | | | parameter to allow krb5_get_permitted_enctype() to be called instead of using a hardcoded list of enctypes which may change in the future. krb5_lcc_get_name(): fix return value if Kerberos is not supported. ticket: 2574 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16364 dc483132-0cff-0310-8789-dd5450dbe970
* * cc_mslsa.c: GetMSTGT() Initialize pTicketRequest to NULL to preventJeffrey Altman2004-05-262-1/+6
| | | | | | | | inadvertant deallocation. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16363 dc483132-0cff-0310-8789-dd5450dbe970
* * conv_creds.c (krb5int_encode_v4tkt): Unsigned vs signed warning fixEzra Peisach2004-05-252-1/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16360 dc483132-0cff-0310-8789-dd5450dbe970
* krb5_rc_io_open_internal might try to invoke with negative argumentEzra Peisach2004-05-242-1/+7
| | | | | | | | | * rc_io.c (krb5_rc_io_open_internal): If file could not be open, do not invoke close negative argument. Ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16357 dc483132-0cff-0310-8789-dd5450dbe970
* * t_ser.c (ser_keytab_test): Cleanup memory leak of forgetting toEzra Peisach2004-05-243-6/+13
| | | | | | | | close keytab. * chpw.c: Add parenthesis around assignments in conditionals. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16356 dc483132-0cff-0310-8789-dd5450dbe970
* * t_cc.c (cc_test): Clean up memory leaks in testsEzra Peisach2004-05-242-0/+15
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16355 dc483132-0cff-0310-8789-dd5450dbe970
* The memory allocated by ConstructTicketRequest is not LSA memoryJeffrey Altman2004-05-152-2/+3
| | | | | | | | and must be freed with LocalFree(). ticket: 2561 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16339 dc483132-0cff-0310-8789-dd5450dbe970
* 2004-05-15 Jeffrey Altman <jaltman@mit.edu>Jeffrey Altman2004-05-152-13/+20
| | | | | | | | | | | * cc_mslsa.c: Do not use the FAILED() macro to test the result of ConstructTicketRequest(). ConstructTicketRequest() returns positive errors and FAILED() only considers negative values to be a failure condition. Also, close potential memory leak of LSA allocated memory. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16338 dc483132-0cff-0310-8789-dd5450dbe970
* * send_tgs.c: krb5_send_tgs() was broken in the case of a KRB_ERRORJeffrey Altman2004-05-132-0/+9
| | | | | | | | | | | message. The krb5_response message_type field was never set resulting in stack garbage being used instead. This would break code which used transitive cross-realm to obtain service tickets. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16331 dc483132-0cff-0310-8789-dd5450dbe970
* Patch from Matt Crawford to allow matching on realm in cross-realmSam Hartman2004-05-072-4/+11
| | | | | | | | authentication for krb5_aname_to_lname. Ticket: 957 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16321 dc483132-0cff-0310-8789-dd5450dbe970
* * libkrb5.exports: Export krb5int_foreach_localaddr for nowKen Raeburn2004-05-062-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16316 dc483132-0cff-0310-8789-dd5450dbe970
* Rename header file foreachaddr.c to foreachaddr.h, now that it isn'tKen Raeburn2004-05-053-3/+4
| | | | | | mostly static functions to be compiled in. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16314 dc483132-0cff-0310-8789-dd5450dbe970
* * localaddr.c: Incorporate foreach_localaddr implementation. Export it asKen Raeburn2004-05-052-1/+792
| | | | | | krb5int_foreach_localaddr. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16311 dc483132-0cff-0310-8789-dd5450dbe970
* * rc_dfl.c (krb5_rc_dfl_expunge_locked): Declare before useKen Raeburn2004-05-032-0/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16296 dc483132-0cff-0310-8789-dd5450dbe970
* Use the new mutex in the replay cache structureKen Raeburn2004-05-013-17/+103
| | | | | | | | | | | | | | | | | | | | | | Rather coarse at the moment: While one thread is blocking waiting for data to be flushed to disk, another thread is unnecessarily prevented from scanning the in-memory data. * rc_base.c (krb5_rc_resolve_type): Initialize the mutex in the replay cache structure. (krb5_rc_default, krb5_rc_resolve_full): Destroy it if creation of the replay cache fails. * rc_dfl.c (krb5_rc_dfl_get_span, krb5_rc_dfl_init): Lock the mutex while operating on the replay cache object. (krb5_rc_dfl_expunge_locked): Renamed from krb5_rc_dfl_expunge and made static. Call krb5_rc_dfl_recover_locked. (krb5_rc_dfl_expunge): New wrapper function, locks the mutex. (krb5_rc_dfl_recover_locked): Renamed from krb5_rc_dfl_recover and made static. Call krb5_rc_dfl_expunge_locked. (krb5_rc_dfl_recover): New wrapper function, locks the mutex. (krb5_rc_dfl_store): Lock the mutex. Call _expunge_locked. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16295 dc483132-0cff-0310-8789-dd5450dbe970
* update dependenciesKen Raeburn2004-04-248-558/+667
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16273 dc483132-0cff-0310-8789-dd5450dbe970
* Handle the somewhat common fixed case of time value 0 more efficientlyKen Raeburn2004-04-243-16/+36
| | | | | | | | | * asn1_decode.c (asn1_decode_generaltime): If the input string is the magic UNIX time zero, bypass all the arithmetic and return 0. * asn1_encode.c (asn1_encode_generaltime): If the input time value is the UNIX epoch, use a hardcoded string instead of doing the math. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16272 dc483132-0cff-0310-8789-dd5450dbe970
* * conv_creds.c (krb524_init_ets, krb524_convert_creds_kdc): Add forward ↵Ken Raeburn2004-04-242-1/+12
| | | | | | declarations to silence gcc warnings git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16271 dc483132-0cff-0310-8789-dd5450dbe970
* Added support for library initialization and finalization, and verificationKen Raeburn2004-04-2410-27/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | that the initializer completed successfully. Delay initialization on POSIX until the first "verification" call. Currently specific to a few platforms, but should still build on others without thread support enabled. Use it to finish creating (if necessary) and destroy mutexes, and free some other storage "permanently" allocated by libraries (currently, libkrb5 cache/keytab type registries only). Change initialization of static mutexes to a two-step operation, a static "partial" initializer and a "finish_init" routine called from a thread-safe environment like library initialization is assumed to be. POSIX will use the former, Windows will use the latter, and the debug support will check that *both* have been used. Added init/fini functions to com_err, profile, krb5, and gssapi libraries. (The profile library one may need to be removed later.) The existing ones, not thread-safe, are still around. Use weak symbol support if available to figure out if the pthread library has been linked in, and avoid calling certain routines if the C library stubs are known not to exist or work. Stub declarations for thread-specific data. Minor bugfixes, whitespace changes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16268 dc483132-0cff-0310-8789-dd5450dbe970
* Delete a couple of symbols that are only defined when krb4 is enabled,Ken Raeburn2004-04-231-2/+0
| | | | | | and which are not directly used from outside the library. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16262 dc483132-0cff-0310-8789-dd5450dbe970
* update dependenciesKen Raeburn2004-04-231-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16261 dc483132-0cff-0310-8789-dd5450dbe970
* add newline at end of fileKen Raeburn2004-04-231-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16260 dc483132-0cff-0310-8789-dd5450dbe970