summaryrefslogtreecommitdiffstats
path: root/src/util/profile
Commit message (Collapse)AuthorAgeFilesLines
...
* Ticket: 6286Zhanna Tsitkov2008-12-051-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21290 dc483132-0cff-0310-8789-dd5450dbe970
* Remove unneeded LEAN_CLIENT #define'sZhanna Tsitkov2008-12-021-2/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21261 dc483132-0cff-0310-8789-dd5450dbe970
* Convert many uses of strcpy/strcat (and sometimes sprintf) to acceptedGreg Hudson2008-11-051-1/+1
| | | | | | | | | string-handling functions. ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21001 dc483132-0cff-0310-8789-dd5450dbe970
* Unsigned/signed warnings cleanupEzra Peisach2008-10-282-8/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20928 dc483132-0cff-0310-8789-dd5450dbe970
* Use asprintf instead of malloc/strcpy/strcat in many placesGreg Hudson2008-10-201-10/+6
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20901 dc483132-0cff-0310-8789-dd5450dbe970
* Use strdup in place of malloc/strcpy in many placesGreg Hudson2008-10-202-8/+4
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20898 dc483132-0cff-0310-8789-dd5450dbe970
* krb5 library-side changes for com_err based error stringsAlexandra Ellwood2008-09-301-4/+2
| | | | | | ticket: 6138 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20786 dc483132-0cff-0310-8789-dd5450dbe970
* lean client changesZhanna Tsitkov2008-08-201-0/+3
| | | | | | | | | All changes are under LEAN_CLIENT macro. Application server functionality is disabled. Ticket:new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20680 dc483132-0cff-0310-8789-dd5450dbe970
* profile write code should only quote empty stringsAlexandra Ellwood2008-08-191-1/+1
| | | | | | | | | Assigned to Ken for review. ticket: new owner: raeburn git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20674 dc483132-0cff-0310-8789-dd5450dbe970
* Always use unsigned for one-bit fieldsKen Raeburn2008-08-061-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20609 dc483132-0cff-0310-8789-dd5450dbe970
* Use load/store_32_be instead of open-codingKen Raeburn2008-08-021-8/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20600 dc483132-0cff-0310-8789-dd5450dbe970
* Apply patch from Apple to handle missing krb5.conf for zeroconfTom Yu2008-07-101-2/+5
| | | | | | | | situations. ticket: 5632 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20509 dc483132-0cff-0310-8789-dd5450dbe970
* Profile library should not call rw_access earlier than neededAlexandra Ellwood2008-05-273-9/+20
| | | | | | | | | | Call rw_access lazily so we only call access just before we need to write to the file to avoid calling access as often. Deprecated bit in profile structures to track writability. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20341 dc483132-0cff-0310-8789-dd5450dbe970
* After malloc/realloc/calloc failures, return ENOMEM explicitly insteadKen Raeburn2008-04-304-9/+9
| | | | | | | of reading it from errno. This may make static analysis tools less confused about when we return zero vs nonzero values. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20312 dc483132-0cff-0310-8789-dd5450dbe970
* Set close-on-exec flag in most places where file descriptors areKen Raeburn2007-10-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* profile library memory leaks introduced when malloc returns 0Ezra Peisach2007-09-263-2/+7
| | | | | | | | | | | | | | | | | | | | I have a modified version of valgrind that will allow me to have malloc fail in a controlled way. A number of memory leaks in error return passes exist in the profile library. They are essentially inconsequental - but my goal is to eventually create a test harness that tries to cover all code - including error returns... prof_parse.c: (profile_parse_file): Free node being created if parse_line() fails. prof_file.c (profile_open_file): free prf_data_t on malloc failure prof_tree.c (profile_create_node): The magic element must be set before calling profile_free_node for it to release memory. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19981 dc483132-0cff-0310-8789-dd5450dbe970
* Avoid use of unchecked sprintf in libraries. Use asprintf if theKen Raeburn2007-07-121-9/+8
| | | | | | | 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
* profile stores empty string values without double quotesJeffrey Altman2007-04-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prof_parse.c (need_double_quotes): The profile library will happily read in right hand values that represent the empty string by parsing "". However, when storing the same empty string back to a file, the empty string is written without the double quotes. This means that [section] foo = "" becomes [section] foo = which is invalid input. A subsequent attempt to parse the profile will result in an invalid input error. KFW and KFM's realm editors can inadvertently produce an invalid krb5 profile if one of the ignored sections of the input profile contains a right hand value that is "". This patch was produced by Asanka Herath and it was reviewed by jaltman and lxs. ticket: new tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19529 dc483132-0cff-0310-8789-dd5450dbe970
* Fix PROG_LIBPATH, and use -l instead of an explicit filename to build ↵Ken Raeburn2007-03-251-3/+3
| | | | | | profile_tcl git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19263 dc483132-0cff-0310-8789-dd5450dbe970
* Delete more stuff for 'clean' and 'distclean' targetsKen Raeburn2007-03-021-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19198 dc483132-0cff-0310-8789-dd5450dbe970
* use strdupKen Raeburn2006-10-281-4/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18747 dc483132-0cff-0310-8789-dd5450dbe970
* Use $(VALGRIND) when running programs using $(KRB5_RUN_ENV) orKen Raeburn2006-10-131-1/+1
| | | | | | | | | | | | | | | | | | $(RUN_SETUP). Replaces old hack with MAYBE_VALGRIND added to RUN_ENV in a way that would break in some of the tests. Set VALGRIND in site.exp in tests/dejagnu. (Not used yet.) Runs some shell scripts under valgrind, rather than changing them to run only the executables under valgrind; this is mostly okay, just creates lots of extra log data, and requires --trace-children=yes. This should work for any instrumentation program invocation that gets followed immediately by the name and argument list for the program being instrumented. For example, VALGRIND="env LD_PRELOAD=..." should work, though I haven't tested it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18699 dc483132-0cff-0310-8789-dd5450dbe970
* autoconf 2.60 compatibilityKen Raeburn2006-06-281-2/+2
| | | | | | | | | | | 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
* Fix krb5_get_profile to create a new profile duplicating the list ofKen Raeburn2006-06-242-0/+35
| | | | | | | | | | | | | | | | files from the one in the provided context, instead of constructing and checking the file list from scratch. Uses a new function in the profile library, not put into the public API yet. * util/profile/prof_init.c (profile_copy): New function. * util/profile/prof_int.h (profile_copy): Declare it. * lib/krb5/os/Makefile.in (LOCALINCLUDES): Look in the profile source dir. * lib/krb5/os/init_os_ctx.c (krb5_get_profile): Replace all the previous code with a call to profile_copy. ticket: 3925 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18209 dc483132-0cff-0310-8789-dd5450dbe970
* Allow whitespace in front of comments. Patch from Jeremie KoenigRuss Allbery2006-06-121-3/+3
| | | | | | | Ticket: 1988 Version_Reported: 1.3.6 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18118 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Set and substitute KSU_LIBS, SETENVOBJ, DO_TCL. GenerateKen Raeburn2006-05-182-20/+2
| | | | | | | | | makefiles for util/et, util/profile, lib/kdb, clients and those clients subdirectories built on UNIX, rather than running configure there. Deleted configure.in scripts for those directories, and changed Makefile.in definitions of thisconfigdir and mydir. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18018 dc483132-0cff-0310-8789-dd5450dbe970
* Compute dependencies for profile_tcl.oKen Raeburn2006-04-151-1/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17931 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (profile_tcl): Link with MLIBS instead of DEPLIBS and LIBSKen Raeburn2006-04-151-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17930 dc483132-0cff-0310-8789-dd5450dbe970
* Remove ChangeLog files from the source tree. From now on, theSam Hartman2006-04-111-1333/+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-111-49/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17888 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in ($(srcdir)/profile_tcl.c): Don't invoke swig automaticallyKen Raeburn2006-04-042-1/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17841 dc483132-0cff-0310-8789-dd5450dbe970
* set DEFS empty in more placesKen Raeburn2006-04-042-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17838 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_int.h (SIZEOF_INT, SIZEOF_SHORT, SIZEOF_LONG)[_WIN32]: Don't defineKen Raeburn2006-03-314-19/+17
| | | | | | | | | * configure.in: Don't test sizes of types. * prof_init.c: Include stdint.h and inttypes.h if available. (prof_int32): Always define as int32_t. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17815 dc483132-0cff-0310-8789-dd5450dbe970
* make depend, now with dependency sortingKen Raeburn2006-03-311-25/+25
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17811 dc483132-0cff-0310-8789-dd5450dbe970
* Instead of arbitrary division of headers into include and include/krb5, withKen Raeburn2006-03-111-8/+8
| | | | | | | | | | | | 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
* Add a new recursive target "generated-files-mac", for producing theKen Raeburn2006-03-112-0/+6
| | | | | | | generated files that lxs wants to feed into the Mac build system. (First approximation, may want some fine tuning later.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17728 dc483132-0cff-0310-8789-dd5450dbe970
* Merge from plugin branchKen Raeburn2006-03-072-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Add plugin support: - plugin routines in support library (may break windows build!) - plugin support in KDC location code - sample Python-based plugin for KDC location, not built without tweaking sources - changed service location interface to use an enum instead of passing profile string and DNS strings and port numbers - changed pathnames for plugin locations, including kdb back end - remove locate_service from accessor API Also, do build shared libraries for Darwin just like any other UNIX box. Not present yet: - use new plugin interface for kdb back end - Windows support - Mac bundle support (but dlopen support works) - search path for libkrb5 plugins (only one hard-coded directory for now) - sorting of plugin collections for predictable ordering See the various ChangeLogs for specifics. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17706 dc483132-0cff-0310-8789-dd5450dbe970
* Back out unwanted change to profile_tcl.cSam Hartman2006-01-111-745/+311
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17586 dc483132-0cff-0310-8789-dd5450dbe970
* Remove krb5_callconv from non-exported internal functionSam Hartman2006-01-111-311/+745
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17585 dc483132-0cff-0310-8789-dd5450dbe970
* make dependTom Yu2005-11-291-16/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17505 dc483132-0cff-0310-8789-dd5450dbe970
* Delete setting and testing of STAT_ONCE_PER_SECOND, just always do itKen Raeburn2005-10-213-10/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17449 dc483132-0cff-0310-8789-dd5450dbe970
* Delete .cvsignore files; contents have already been Sam Hartman2005-08-241-7/+0
| | | | | | set on svn:ignore properties. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17353 dc483132-0cff-0310-8789-dd5450dbe970
* All configure.in scripts: Use K5_AC_INIT instead of AC_INITKen Raeburn2005-08-202-1/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17342 dc483132-0cff-0310-8789-dd5450dbe970
* Update dependenciesKen Raeburn2005-06-211-8/+16
| | | | | | | | | 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
* * profile.swg (errcode_t* tcl8 argout typemap): Cast return value fromKen Raeburn2005-06-063-20/+27
| | | | | | | | error_message to char* to silence Sun compiler warning. (errcode_t tcl8 out typemap): Likewise. * profile_tcl.c: Regenerated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17229 dc483132-0cff-0310-8789-dd5450dbe970
* update dependenciesKen Raeburn2005-04-131-16/+16
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17179 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Don't check for getpwuid_r here.Ken Raeburn2005-03-263-17/+9
| | | | | | | | | * prof_file.c (profile_open_file): Use k5_getpwuid_r. ticket: 2982 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17158 dc483132-0cff-0310-8789-dd5450dbe970
* st_mtim.tv_nsec, not tv_usecKen Raeburn2005-03-133-4/+4
| | | | | | | ticket: 2959 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17122 dc483132-0cff-0310-8789-dd5450dbe970
* profile library should check high-resolution timestamps if availableKen Raeburn2005-03-134-1/+26
| | | | | | | | | | | | | | | | | | | | | With the current profile code, it's possible for a file to be read when partially written, with the writing of the new file contents being completed within the same 1-second clock value, causing the profile code not to re-read the contents. Using a higher-resolution timestamp, available on many systems now, should help reduce that window. (Checking file sizes should also, consider doing that separately.) * configure.in: Check struct stat for fields st_mtimensec, st_mtimespec.tv_nsec, and st_mtim.tv_usec. * prof_file.c (profile_update_file_data): If one of them is found, use it as the fractional part of the timestamp. Do re-read the file if the fractional parts don't match. * prof_int.h (struct _prf_data_t): Add new field frac_ts. ticket: new status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17121 dc483132-0cff-0310-8789-dd5450dbe970
* profile_clear_relation doesn't work, iterator still sees deleted nodesKen Raeburn2005-03-043-0/+50
| | | | | | | | | | | | | | | | The "deleted" flag was being checked when writing out the file, but not when iterating through using the profile handle being used to do the deletions. * prof_tree.c (profile_node_iterator): After checking skip_num counter, also skip over deleted nodes. * prof_test1 (test3): New proc. (top level): Run it. ticket: new target_version: 1.4.1 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17111 dc483132-0cff-0310-8789-dd5450dbe970