summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/rcache
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert due to potential file modes race conditionTom Yu2008-07-181-18/+14
| | | | | | | ticket: 6002 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20538 dc483132-0cff-0310-8789-dd5450dbe970
* Make krb5_rc_io_creat() use mkstempTom Yu2008-07-181-14/+18
| | | | | | ticket: 6002 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20537 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5_rc_io_creat(), unlink any existing rcache file before tryingTom Yu2008-07-171-1/+2
| | | | | | | | | | | to create a new rcache. This allows better recovery from corrupt rcache files. ticket: 6018 target_version: 1.6.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20536 dc483132-0cff-0310-8789-dd5450dbe970
* Report file name in detailed cache creation errorKen Raeburn2008-06-081-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20371 dc483132-0cff-0310-8789-dd5450dbe970
* Do hash stuff with unsigned mathKen Raeburn2008-06-081-8/+9
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20370 dc483132-0cff-0310-8789-dd5450dbe970
* Set close-on-exec flag in most places where file descriptors areKen Raeburn2007-10-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | opened in our libraries (in case another application thread spawns a new process) and in the KDC programs (in case a plugin library spawns a new process). Checked calls to: open fopen THREEPARAMOPEN mkstemp socket accept dup dup2 pipe. In: util lib plugins kdc kadmin/server krb524. The various programs are less critical than the libraries, as any well-written plugin that spawns a new process should close all file descriptors it doesn't need to communicate with the new process. This approach also isn't bulletproof, as the call to set the close-on-exec flag is necessarily a separate call from creating the file descriptor, and the fork call could happen in between them. So plugins should be careful regardless of this patch; it will only reduce the window of potential lossage should a plugin be poorly written. (AFAIK there are currently no plugins that spawn processes where this would be a problem.) Update dependencies. ticket: 5561 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20143 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2007-08-161-44/+48
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19832 dc483132-0cff-0310-8789-dd5450dbe970
* Avoid use of unchecked sprintf in libraries. Use asprintf if theKen Raeburn2007-07-122-35/+25
| | | | | | | output buffer is allocated according to the size of data to be written, or snprintf otherwise. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19703 dc483132-0cff-0310-8789-dd5450dbe970
* krb5_rc_io_open_internal on error will call close(-1)Ezra Peisach2006-12-181-1/+3
| | | | | | | | | | | If there is an error in opening the replay cache - memory is freed, but close() is invoked with -1 (failure from open()). While technically, close() will return EBADF in such a case, and nothing bad will happen, valgrind picks up on this and provides an error... ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18961 dc483132-0cff-0310-8789-dd5450dbe970
* Tag krb5_rc_dfl_init_locked as static - not used outside fileEzra Peisach2006-10-161-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18716 dc483132-0cff-0310-8789-dd5450dbe970
* make dependTom Yu2006-10-061-16/+20
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18652 dc483132-0cff-0310-8789-dd5450dbe970
* autoconf 2.60 compatibilityKen Raeburn2006-06-281-1/+1
| | | | | | | | | | | Change all file substitutions so that @-patterns start at the beginning of their lines, as now required by autoconf 2.60 (released Monday). ticket: new target_version: 1.5 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18249 dc483132-0cff-0310-8789-dd5450dbe970
* * rc_io.c (krb5_rc_io_move): Use same code for cygwin as for normalKen Raeburn2006-06-151-1/+1
| | | | | | | | Windows build. ticket: 1434 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18138 dc483132-0cff-0310-8789-dd5450dbe970
* Call krb5_set_error_message any time multiple errno values are translated toKen Raeburn2006-06-091-15/+59
| | | | | | one KRB5_RC_* error code, and a few other places. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18102 dc483132-0cff-0310-8789-dd5450dbe970
* Don't call k5_mutex_destroy when krb5_rc_resolve_type fails, because that'sKen Raeburn2006-06-081-2/+0
| | | | | | | | where the mutex would've been initialized. Reported by Shawn Emery. ticket: 3332 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18089 dc483132-0cff-0310-8789-dd5450dbe970
* Merge about 1/3 of the remaining configure scripts into the top level. ThisKen Raeburn2006-05-311-2/+2
| | | | | | still leaves out appl and tests, and static library and plugin directories. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18068 dc483132-0cff-0310-8789-dd5450dbe970
* Rename locate.h to locate_plugin.h. Change references, update dependenciesKen Raeburn2006-05-241-8/+8
| | | | | | ticket: 3784 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18037 dc483132-0cff-0310-8789-dd5450dbe970
* install headers into include/krb5Ken Raeburn2006-05-231-44/+48
| | | | | | | | | | | Create include/krb5 directory, and put krb5.h and (k5-)locate.h there in the build tree. Stub krb5.h in main include directory just includes krb5/krb5.h. Update dependencies, and add dependencies in a couple Makefiles that didn't have them. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18030 dc483132-0cff-0310-8789-dd5450dbe970
* Don't include kdb.h from k5-int.h; instead, include it in the handfulKen Raeburn2006-04-131-24/+20
| | | | | | of places where it's actually needed. Update dependencies. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17898 dc483132-0cff-0310-8789-dd5450dbe970
* Remove ChangeLog files from the source tree. From now on, theSam Hartman2006-04-111-509/+0
| | | | | | | subversion commit log entry needs to include information that would have been in the changelog. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17893 dc483132-0cff-0310-8789-dd5450dbe970
* Remove .Sanitize and .rconf files, no longer usedKen Raeburn2006-04-112-50/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17888 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (DEFS): Make emptyKen Raeburn2006-04-022-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17833 dc483132-0cff-0310-8789-dd5450dbe970
* make depend, now with dependency sortingKen Raeburn2006-03-311-64/+64
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17811 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2006-03-271-23/+24
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17786 dc483132-0cff-0310-8789-dd5450dbe970
* Instead of arbitrary division of headers into include and include/krb5, withKen Raeburn2006-03-111-24/+24
| | | | | | | | | | | | include directives sometimes using krb5/foo.h and sometimes using foo.h, and -I options always given for both directories in both source and build trees, push include/krb5/* up a level and drop the krb5 directory (except, for the moment, the change log). Updated #include directives, -I options, and dependencies accordingly, and deleted one or two bits of old, unused code that was noticed in the process. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17730 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2006-03-081-8/+16
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17708 dc483132-0cff-0310-8789-dd5450dbe970
* make dependTom Yu2005-11-291-27/+18
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17505 dc483132-0cff-0310-8789-dd5450dbe970
* This commit ensures that all files in the library includeJeffrey Altman2005-11-152-1/+5
| | | | | | | | | | | k5-int.h before krb5.h is included either directly or indirectly. This is to allow Kerberos to use pre-processor symbols to choose configurations of C run time library headers without affecting third party applications. ticket: 3236 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17489 dc483132-0cff-0310-8789-dd5450dbe970
* Update dependenciesKen Raeburn2005-06-211-18/+27
| | | | | | | | | N.B.: The version of gcc used this time ("gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)") seems to emit some duplicate dependencies -- some header files get listed twice. This is annoying but shouldn't cause any harm.... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17256 dc483132-0cff-0310-8789-dd5450dbe970
* Delete definitions of unused macros NEED_SOCKETS and NEED_LOWLEVEL_IOKen Raeburn2005-04-132-2/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17177 dc483132-0cff-0310-8789-dd5450dbe970
* * rc_dfl.c: Move the extraction of the struct dfl_dataJeffrey Altman2005-01-152-3/+8
| | | | | | | | | | from the krb5_rcache after obtaining the lock, not before. ticket: new target_version: 1.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17046 dc483132-0cff-0310-8789-dd5450dbe970
* run "make depend"Ken Raeburn2004-12-301-48/+53
| | | | | | | | In most library directories, this just affects where the line breaks are. In most other directories, it's just dropping a trailing blank line. One or two files really do have updated dependencies. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16987 dc483132-0cff-0310-8789-dd5450dbe970
* * rc-int.h (struct _krb5_rc_ops): Add new member, recover_or_init.Ken Raeburn2004-08-047-7/+59
| | | | | | | | | | | | | | * rc_dfl.c (krb5_rc_dfl_init_locked): New function, with most of the content of old krb5_rc_dfl_init. (krb5_rc_dfl_init): Call it. (krb5_rc_dfl_recover_or_init): New function. * rc_dfl.h (krb5_rc_dfl_recover_or_init): Declare. * rcdef.c (krb5_rc_dfl_ops): Initialize new field. * rc_none.c (krb5_rc_none_recover_or_init): New macro. (krb5_rc_none_ops): Initialize new field. * rcfns.c (krb5_rc_recover_or_initialize): New function. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16640 dc483132-0cff-0310-8789-dd5450dbe970
* Implement new replay cache type "none"Ken Raeburn2004-07-305-3/+108
| | | | | | | | | | * rc_none.c: New file. * Makefile.in (SRCS, STLIBOBJS, OBJS): Build it. * rc-int.h (krb5_rc_none_ops): Declare. * rc_base.c (none): New variable. (krb5_rc_typelist_dfl): Add it into the linked list. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16634 dc483132-0cff-0310-8789-dd5450dbe970
* zap remaining bits of macsock.h supportKen Raeburn2004-07-172-1/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16612 dc483132-0cff-0310-8789-dd5450dbe970
* Delete preprocessor tests for macintosh, __MWERKS__, applec, and THINK_C, allKen Raeburn2004-06-222-6/+5
| | | | | | | part of the pre-Mac OS X support. (Except the bits in the Yarrow code, where it was part of the upstream source.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16506 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
* Run make dependSam Hartman2004-06-081-4/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16424 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
* Add prototypes for library init and fini functions. Makefile dependenciesEzra Peisach2004-05-284-1/+47
| | | | | | updated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16371 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
* * 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-241-24/+28
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16273 dc483132-0cff-0310-8789-dd5450dbe970
* Added support for library initialization and finalization, and verificationKen Raeburn2004-04-242-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* make dependKen Raeburn2004-03-061-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16154 dc483132-0cff-0310-8789-dd5450dbe970
* For keytab, ccache, and rcache type registries, use const more, andKen Raeburn2004-03-062-3/+28
| | | | | | use a mutex to protect manipulation of the lists. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16153 dc483132-0cff-0310-8789-dd5450dbe970
* minor formatting, mostly whitespaceKen Raeburn2004-03-031-37/+38
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16141 dc483132-0cff-0310-8789-dd5450dbe970
* * rc_base.c: Delete unused and untested semaphore supportKen Raeburn2004-03-033-29/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16140 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2003-12-151-21/+23
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15928 dc483132-0cff-0310-8789-dd5450dbe970