| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There seems to be a problem with a null pointer popping up when
profile_node_iterator reads ...->data->root to start walking through the
contents. Don't have a lot of details, but I've got some patches that might
tighten things up a little.
* prof_tree.c (profile_node_iterator): Check that the root node pointer is not
null; raise assertion failure if it is.
* prof_int.h: Include k5-platform.h.
(struct _prf_data_t): Reorder fields, and insert some padding.
* prof_file.c (scan_shared_trees_locked): Check that the "root" field isn't
null.
(profile_open_file): Update the in-memory file contents after updating the
refcount instead of before.
(profile_update_file_data): If the root node in the file data is null, always
do the update. Check that it's not null before returning a success
indication.
(profile_dereference_data_locked): Scan linked list of file data objects for
sanity check, before and after.
(profile_dereference_data_locked): Don't do it here.
ticket: new
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17106 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
SHOW_INITFINI_FUNCS is defined, print tracing messages.
* profile/prof_file.c (profile_library_initializer, profile_library_finalizer):
If SHOW_INITFINI_FUNCS is defined, print tracing messages.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17094 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
directly instead of calling profile_close_file.
ticket: 2878
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17035 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
| |
* prof_file.c (profile_free_file_data): Destroy mutex before freeing containing
structure.
ticket: new
target_version: 1.4
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17029 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If profiles are open and iterators in use while the on-disk file is being
modified (see tests/threads/prof1.c), the re-reading of the file can cause data
to be freed up. The iterator code does no locking and assumes that the profile
node tree won't be touched.
During our Monday meeting we discussed changing the iterator code to "snapshot"
the current state of the file if it were modified, so that a more consistent
picture could be returned, essentially by bumping a reference count for the
life of the iterator object. The reference count I was thinking of turns out
to be used for a different purpose; we'd have to add another layer of
indirection, another ref count, and another mutex to accomplish this. There
might be a more reasonable way to go about it, but I don't want to tackle it
for 1.4 when we're already shipping beta releases.
This patch just adds locking to the current iterator code so that the file data
can't be replaced while the iterator is being processed. The inconsistent-view
issue remains.
* prof_tree.c (profile_node_iterator): When the iterator has a current file,
lock it, and unlock it before changing it or returning.
ticket: new
status: resolved
target_version: 1.4
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16932 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
profile_is_writable so that callers can check to see if profile_release() will fail before calling it
ticket: 2751
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16860 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
writable. You can now write to a different file with profile_flush_to_file() or buffer with profile_flush_to_buffer()
ticket: 2750
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16858 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes suggested by lxs to reduce stat frequency to once per second.
In parallel loops creating and destroying krb5 contexts on Mac OS X, this
seems to improve performance by 10%, though it's hard to be sure because
the times are variable.
* prof_int.h (STAT_ONCE_PER_SECOND): Define.
(struct _prf_data_t) [STAT_ONCE_PER_SECOND]: New field LAST_STAT.
* prof_file.c (scan_shared_trees_locked, scan_shared_trees_unlocked): Redefine
to do nothing for now.
(profile_update_file_data) [STAT_ONCE_PER_SECOND]: If the current time is the
same time as the last stat of the file, just return; otherwise, save away the
current time.
ticket: new
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16847 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* prof_file.c (profile_flush_file_data_to_buffer): New function.
* profi_init.c (profile_flush_to_buffer, profile_free_buffer): New functions.
* prof_parse.c (output_quoted_string): Use a callback instead of stdio calls.
(dump_profile): Renamed from dump_profile_to_file. Use a callback instead of
stdio calls.
(dump_profile_to_file_cb): New function.
(profile_write_tree_file): Updated to new internal interface.
(struct prof_buf): New type.
(add_data_to_buffer, dump_profile_to_buffer_cb, profile_write_tree_to_buffer):
New functions.
* prof_int.h (profile_write_tree_to_buffer, profile_flush_file_data_to_buffer):
Declare.
* profile.hin (profile_flush_to_buffer, profile_free_buffer): Declare.
* libprofile.exports: Export profile_flush_to_buffer and profile_free_buffer.
* profile.swg (profile_flush_to_buffer): Declare.
* profile_tcl.c: Regenerated.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16838 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
| |
flag.
(scan_shared_trees_locked, scan_shared_trees_unlocked): Convert to macros, so
line numbers reported by assert will be useful.
* prof_test1 (test2): Run new test of modifications with other existing open
profile handles.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16834 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16830 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file than was originally read.
* prof_file.c (write_data_to_file): New function, split out from
profile_flush_file_data. Add argument can_create indicating whether the old
file should already exist or not.
(profile_flush_file_data): Call it.
(profile_flush_file_data_to_file): New function.
* prof_int.h (profile_flush_file_data_to_file): Declare it.
(profile_flush_file_to_file): New macro.
* prof_init.c (profile_flush_to_file): New function.
* profile.hin (profile_flush_to_file): Declare.
* profile.swg (profile_flush_to_file): Declare.
* profile_tcl.c: Regenerated.
* prof_test1: Use profile_flush_to_file instead of profile_flush, and reload
from the new filename.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16825 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
case.
* prof_int.h (struct _prf_data_t): Change filespec to a trailing char array.
Add a length field for the filespec.
(profile_make_prf_data): Declare.
(profile_lock_global, profile_unlock_global): Prototypes need argument lists.
* prof_file.c: Include stddef.h.
(scan_shared_trees_locked, scan_shared_trees_unlocked): New functions.
(r_access, rw_access): Now take const_profile_filespec_t arg.
(profile_make_prf_data): New function.
(profile_open_file): Scan trees at beginning and end. Use
profile_make_prf_data to allocate and initialize storage.
(profile_dereference_data, profile_free_file_data): Scan trees.
(profile_ser_size, profile_ser_externalize): Filespec is never null.
* prof_set.c (rw_setup): Use profile_make_prf_data to allocate and initialize
storage.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16822 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
Added macros to avoid adding error tables on platforms that don't use them (ie: OSX)
ticket: 2741
version_fixed: 1.4
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16818 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16817 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
* prof_init.c (profile_init): Don't add error table here.
* prof_file.c (profile_library_initializer): Add it here.
(profile_library_finalizer): Remove it here.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16815 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
(profile_dereference_data): Call it.
* prof_set.c (rw_setup): Likewise.
* prof_int.h (profile_dereference_data_locked): Declare it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16792 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
* configure.in: Use KRB5_RUN_FLAGS.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16791 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(profile_add_node): Move variable CMP into inner block where it's used. Clear
deleted flag.
(profile_find_node): Skip deleted nodes.
(profile_remove_node): Just set the deleted flag, don't modify the tree.
* Makefile.in (profile_tcl.c): Target should be in srcdir.
(profile_tcl.o): Depend on profile.h.
(DO_TCL): New variable.
(check-unix-tcl-, check-unix-tcl-ok): New targets.
(check-unix): Depend on one of them, based on DO_TCL.
* configure.in: Set and substitute DO_TCL.
* prof_test1: New file.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16784 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16783 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
(Tcl_SetResult, my_tcl_setresult): Compile hack only if building for Tcl.
(%typemap SWIGTYPE *OUTPUT): Initialization is not specific to the scripting
language. Add Python code.
(%typemap errcode_t, errcode_t*): Add placeholders for Python support.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16782 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
input file, destroy the mutex only if we're not sharing file data.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16698 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tag, to strip trailing whitespace (per current locale, not just ASCII space
characters), and prohibit any internal space characters in tag names.
(This is not the patch supplied in the bug report; that patch changed the tag
handling to allow spaces in tag names, which we haven't previously allowed. On
the other hand, we haven't specifically disallowed internal tabs or other
whitespace, either, and this patch does so.)
ticket: 2614
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16697 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
requiring swig in order to generate the test program.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16692 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.in: Look for Tcl.
* Makefile.in (profile_tcl, profile_tcl.c, profile_tcl.o): New targets, not
built by default.
(PROG_LIBPATH, PROG_RPATH, LOCALINCLUDES): Add Tcl options.
(DEFINES): Define.
(clean-unix): Delete profile_tcl.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16691 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* prof_file.c (profile_open_file): Initialize data mutex.
(profile_update_file_data, profile_flush_file_data): Lock it while manipulating
file data.
(profile_lock_global, profile_unlock_global): New functions.
* prof_set.c (rw_setup): Acquire global lock while checking flags and adjusting
ref count.
(profile_update_relation, profile_rename_section, profile_add_relation): Lock
data mutex while manipulating profile data.
* prof_tree.c (profile_node_iterator): Do more magic number tests.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16689 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16677 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16599 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16598 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16494 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
of getpwuid_r.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16408 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
* configure.in: Check for getpwuid_r.
* prof_file.c (profile_open_file) [HAVE_PWD_H && HAVE_GETPWUID_R]: Use
getpwuid_r if available.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16395 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
instead of K5_GEN_FILE so that a chmod may be added to make the
script executable.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16354 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
support library
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16327 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16269 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16261 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
where we build a shared library, whether or not it gets installed.
These should match the complete AIX export lists for a full build
including krb4 support, and will eventually be used on other UNIX
platforms, and cut down to just the symbols we actually want to
export.
We'll also have to add additional information, eventually, for
versioning and such, but currently this is just a list of C symbol
names.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16259 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* prof_int.h: Include k5-thread.h. Don't include sys/types.h and pthread.h.
(SHARE_TREE_DATA): Always define.
(USE_PTHREADS): Don't define.
(prof_mutex_lock, prof_mutex_unlock): Deleted.
(struct global_shared_profile_data): Change mutex to use k5_mutex_t instead of
pthread_mutex_t.
(g_shared_trees_mutex): Don't conditionalize on USE_PTHREADS.
* prof_file.c (krb5int_profile_shared_data): Initialize mutex.
(profile_open_file, profile_dereference_data): Use new mutex macros. Check
return status when locking. Fix a potential memory leak in an error case.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16163 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
const char *.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16160 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16119 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
not int, for prof_int32.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16105 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16099 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
ticket: 2180
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15985 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
* profile.hin (profile_iterator_create): Declaration updated.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15953 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
platform specific preprocessor variables used to selectively
import other header files
ticket: 2068
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15921 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
K&R C compilers
ticket: 1648
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15667 dc483132-0cff-0310-8789-dd5450dbe970
|