summaryrefslogtreecommitdiffstats
path: root/src/util/profile
Commit message (Collapse)AuthorAgeFilesLines
...
* make-depend updatesKen Raeburn2003-05-241-8/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15490 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_file.c (r_access): Static function. Only include ifEzra Peisach2003-04-282-0/+7
| | | | | | SHARE_TREE_DATA defined. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15376 dc483132-0cff-0310-8789-dd5450dbe970
* * profile.hin, prof_file.c (profile_flush_file_data): Stop copying the ↵Alexandra Ellwood2003-03-066-104/+107
| | | | | | resource fork. We stopped writing resources to the krb5 configuration in KfM 4.5.x. In KfM 5.0 will no longer read preferences from the resource fork so we can destroy it on copy. * prof-int.h: No longer include MoreFiles. Removed framework style includes for Kerberos headers. * prof_FSp_glue.c, prof_init.c, profile.hin: Moved Mac FSSpec-based functions into a separate file so they will only be built with KfM. These functions will be exported but not in the headers because they are deprecated git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15239 dc483132-0cff-0310-8789-dd5450dbe970
* Use com_err_deplib rather than an explicit path so we do not have ourSam Hartman2003-03-021-1/+1
| | | | | | | shared libraries depend at a make level on com_err if we use the system com_err library. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15212 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_file.c (profile_flush_file_data): [_WIN32]: Don't call syncKen Raeburn2003-01-172-0/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15126 dc483132-0cff-0310-8789-dd5450dbe970
* * profile.pbexp: New fileKen Raeburn2003-01-132-0/+35
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15119 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_int.h (SHARE_TREE_DATA): Define only on MacKen Raeburn2003-01-132-2/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15118 dc483132-0cff-0310-8789-dd5450dbe970
* Use passwd entry for ~ expansion if $HOME isn't set.Ken Raeburn2003-01-103-20/+43
| | | | | | | | | Also fix a minor logic bug in checking file access. ticket: 1237 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15110 dc483132-0cff-0310-8789-dd5450dbe970
* Use markers in Makefile.in rather than rules in configure.in to indicate whenKen Raeburn2003-01-103-4/+12
| | | | | | | | to use the lib.in and libobj.in makefile fragments. Pushing this per-directory info into Makefile.in will make it a little easier to work on combining configure scripts for multiple directories. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15107 dc483132-0cff-0310-8789-dd5450dbe970
* Try to do atomic file swap on UNIX when updating profileKen Raeburn2003-01-092-3/+34
| | | | | | | | | | * prof_file.c (make_hard_link): New function. (profile_flush_file_data): Use it to attempt a safe profile file replacement. ticket: 1301 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15101 dc483132-0cff-0310-8789-dd5450dbe970
* Support \r as additional line separator on Mac OS XKen Raeburn2003-01-093-3/+60
| | | | | | | | | | | | * prof_parse.c (profile_parse_file) [PROFILE_SUPPORTS_FOREIGN_NEWLINES]: Look for \r and treat it as a line break. * prof_int.h: Don't include prof_err.h. (PROFILE_SUPPORTS_FOREIGN_NEWLINES) [macintosh]: Define new macro. ticket: 1237 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15100 dc483132-0cff-0310-8789-dd5450dbe970
* Merge some Mac-specific changes from meeroh's branch:Ken Raeburn2002-12-317-115/+176
| | | | | | | | | | | | | | | | | | | | | | | | * profile.hin: Don't test MACINTOSH any more. On Mac OS X, include TargetConditionals.h, set some pragmas, define COPY_RESOURCE_FORK, and error out if TARGET_RT_MAC_CFM is defined; don't set the old m68k CFM pragmas. Always use PROFILE_USES_PATHS code, don't test or define it. (FSp_profile_init, FSp_profile_init_path): Declare, on Mac OS X. * prof_int.h (NO_SYS_TYPES_H, NO_SYS_STAT_H) [macintosh]: Don't define these. * prof_file.c: Always inclued sys/types.h and sys/stat.h. (GetMacOSTempFilespec): Deleted. (profile_flush_file_data) [COPY_RESOURCE_FORK]: Copy Mac resource fork from old file to new before renaming. (rw_access, profile_update_file_data, profile_flush_file_data, profile_free_file_data): Assume PROFILE_USES_PATHS, don't test. * prof_init.c (profile_ser_size, profile_ser_externalize, profile_ser_internalize): Likewise. (FSp_profile_init, FSp_profile_init_path): Define, on MacOS X. * profile.exp: Add FSp_* functions. * prof_file.c (r_access): New function. (profile_open_file): Use it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15073 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_file.c: Cast return from prof_mutex_lock andEzra Peisach2002-12-232-7/+13
| | | | | | | prof_mutex_unlock to void to avoid warnings of code with no side effects. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15066 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_int.h: Define USE_PTHREADS and include pthread.h if on MacOS X.Ken Raeburn2002-12-213-3/+43
| | | | | | | | | | | | | | (struct global_shared_profile_data) [USE_PTHREADS]: Add a mutex. (g_shared_trees_mutex) [USE_PTHREADS]: New macro, references the global mutex. (prof_mutex_lock, prof_mutex_unlock) [SHARE_TREE_DATA]: Define to use pthread functions or do nothing. (profile_free_file_data): Delete declaration. (profile_dereference_data): Declare. * prof_file.c (profile_free_file_data): Now static. (profile_open_file, profile_dereference_data) [SHARE_TREE_DATA]: Grab lock while manipulating global data list or its contents. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15061 dc483132-0cff-0310-8789-dd5450dbe970
* Merge in data tree sharing, minus locking support, plus a bugfix or twoKen Raeburn2002-12-204-9/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | * prof_int.h (SHARE_TREE_DATA): Define. (struct _prf_file_t) [SHARE_TREE_DATA]: Make data field a pointer rather than an array. (struct global_shared_profile_data): New type, for profile library global data. (krb5int_profile_shared_data): Declare new variable. (g_shared_trees): New macro, refers to a field in the global data. (PROFILE_FILE_SHARED): New flag macro. * prof_file.c (krb5int_profile_shared_data): Initialize here. (profile_open_file) [SHARE_TREE_DATA]: Scan g_shared_trees for an entry with the same filename. If found, increment its reference count, update it, and return it; otherwise, allocate a new one, and add it to the list after filling it in. (profile_dereference_data): New function. Decrement reference count if SHARE_TREE_DATA, and free the data if appropriate. (profile_free_file): Call profile_dereference_data. (profile_free_file_data) [SHARE_TREE_DATA]: If the SHARED flag is set, remove it from the g_shared_trees list before freeing. Free up the allocated space. * prof_set.c (rw_setup) [SHARE_TREE_DATA]: If the object's data is shared, copy it into a new data structure not in the global shared list, and dereference the old one. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15060 dc483132-0cff-0310-8789-dd5450dbe970
* update dependenciesTom Yu2002-12-121-8/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15047 dc483132-0cff-0310-8789-dd5450dbe970
* Checkpoint first step of merge.Ken Raeburn2002-12-078-101/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved per-file data into a separate object from the profile handle. Dropped some old MacOS 9 code. * prof_int.h: Include Mac OS X versions of header files if appropriate. Only include prof_err.h if profile.h doesn't define ERROR_TABLE_BASE_prof. (struct _prf_data_t): Move most of contents of _prf_file_t here. Add reference count. (prf_data_t): New typedef. (struct _prf_file_t): Include an array of one _prf_data_t structure. * prof_file.c (profile_open_file): Fill in "data" field. Drop some old Mac specific code. (profile_flush_file_data): Renamed from profile_flush_file, now takes prf_data_t argument. (profile_flush_file_data): Likewise. (profile_free_file): Now calls profile_free_file_data. (profile_free_file_data): New function, with most of old profile_free_file code. * prof_init.c (profile_init_path): Removed old Mac version. (profile_ser_size, profile_ser_externalize): Get file data from new "data" field. * prof_set.c (rw_setup, profile_update_relation, profile_clear_relation, profile_rename_section, profile_add_relation): Likewise. * prof_tree.c (profile_node_iterator): Likewise. * test_profile.c (do_batchmode): Likewise. * prof_int.h (profile_flush_file): Now a macro. * prof_err.et (PROF_MAGIC_FILE_DATA): New error code value. ticket: 1237 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15037 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_get.c (conf_yes, conf_no): Entries now point to const.Ken Raeburn2002-12-072-4/+10
| | | | | | (profile_parse_boolean): Updated type of 'p' correspondingly. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15036 dc483132-0cff-0310-8789-dd5450dbe970
* update dependenciesTom Yu2002-11-271-1/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15016 dc483132-0cff-0310-8789-dd5450dbe970
* Implement an install-headers target to install public headers into KRB5_INCDIR;Sam Hartman2002-10-072-0/+6
| | | | | | | | probably called by setting DESTDIR. ticket: 1208 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14912 dc483132-0cff-0310-8789-dd5450dbe970
* Move test_* from all to check targetSam Hartman2002-10-032-1/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14909 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (LOCALINCLUDES): Don't reference et directory.Ken Raeburn2002-09-112-10/+13
| | | | | | (dependencies updated) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14838 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in: Revert $(S)=>/ change, for Windows supportKen Raeburn2002-08-292-2/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14786 dc483132-0cff-0310-8789-dd5450dbe970
* Ignore a bunch of files generated by building in the source tree, excludingKen Raeburn2002-08-291-0/+6
| | | | | | | those covered by CVSROOT/cvsignore patterns. Static UNIX build only, at the moment, may need updates for other configurations. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14783 dc483132-0cff-0310-8789-dd5450dbe970
* Quote targets of some copy operations within the build tree. NeededKen Raeburn2002-08-272-1/+5
| | | | | | | now for Windows since we use "/" as a directory separator in places where Windows would also look for command options. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14776 dc483132-0cff-0310-8789-dd5450dbe970
* Change $(S)=>/ and $(U)=>.. globallyKen Raeburn2002-08-232-2/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14761 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (EXTRADEPSRCS): New variable.Ken Raeburn2002-08-152-0/+14
| | | | | | (.d): Depend on includes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14721 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_parse.c (strip_line): Simplify loop by preserving "p" rather thanKen Raeburn2002-06-192-9/+6
| | | | | | recomputing it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14542 dc483132-0cff-0310-8789-dd5450dbe970
* use strdupKen Raeburn2002-06-193-9/+26
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14541 dc483132-0cff-0310-8789-dd5450dbe970
* update dependenciesKen Raeburn2002-06-151-7/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14522 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_get.c (profile_get_integer): Set errno to 0 before strtol call, so weKen Raeburn2002-06-042-8/+22
| | | | | | | can distinguish error from LONG_MIN/MAX. Break out different error conditions and comment them. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14464 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_get.c (conf_yes, conf_no): Now const.Ken Raeburn2002-05-082-3/+8
| | | | | | (profile_parse_boolean): Local variable P points to const. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14435 dc483132-0cff-0310-8789-dd5450dbe970
* shlib version number updates from 1.2.x branchKen Raeburn2002-03-071-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14233 dc483132-0cff-0310-8789-dd5450dbe970
* make a log entry more readableKen Raeburn2002-03-061-4/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14225 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (LIBMINOR): BumpKen Raeburn2002-02-202-1/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14153 dc483132-0cff-0310-8789-dd5450dbe970
* prof_init.c, prof_tree.c: Fixed calls to ↵Alexandra Ellwood2002-01-233-3/+17
| | | | | | profile_update_file/profile_open_file to handle the possibility that we have lost permission to read one of the configuration files in the file list (say it's in AFS). We should only fail catastrophically if we can't read all of the files in the profile git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14116 dc483132-0cff-0310-8789-dd5450dbe970
* * test_profile.c (main): Call profile_release() before exitingEzra Peisach2001-12-052-0/+6
| | | | | | in case of error return. (memory leak testing) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14039 dc483132-0cff-0310-8789-dd5450dbe970
* In directories building libraries, generate dependencies for .so/.po files tooKen Raeburn2001-10-201-7/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13828 dc483132-0cff-0310-8789-dd5450dbe970
* Update automatic dependencies to work on Windows by using $(OUTPRE) andKen Raeburn2001-10-111-13/+13
| | | | | | | $(OBJEXT). Change a couple of UNIX rules to not trigger incorrectly on Windows. Rebuild dependencies. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13801 dc483132-0cff-0310-8789-dd5450dbe970
* Don't conditionalize prototypes; delete macros supporting it. (Maybe overdone;Ken Raeburn2001-10-104-83/+74
| | | | | | don't worry about restoring them when importing new versions of code.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13792 dc483132-0cff-0310-8789-dd5450dbe970
* KRB5_EXPORTVAR is defined lots of places but never used; delete itKen Raeburn2001-10-062-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13787 dc483132-0cff-0310-8789-dd5450dbe970
* Danilo also says we can get rid of _MSDOS (Win16) tests, and explicit ↵Ken Raeburn2001-10-066-24/+12
| | | | | | FAR/NEAR specs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13786 dc483132-0cff-0310-8789-dd5450dbe970
* Danilo says we can get rid of the DLLIMP stuff nowKen Raeburn2001-10-045-43/+46
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13775 dc483132-0cff-0310-8789-dd5450dbe970
* dependenciesKen Raeburn2001-09-021-5/+13
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13726 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_tree.c (struct profile_iterator): Member "names" now points to const.Ken Raeburn2001-07-195-6/+19
| | | | | | | | | | (profile_node_iterator_create): Argument "names" now points to const. (profile_node_iterator): Local variable "cpp" now points to const. * prof_int.h (profile_node_iterator_create): Decl updated. * prof_get.c (profile_get_values): Argument "names" now points to const. * profile.hin (profile_get_values): Decl updated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13615 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_int.h: Provide prototypes for profile_ser_size,Ezra Peisach2001-07-022-0/+13
| | | | | | profile_ser_externalize, profile_ser_internalize. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13546 dc483132-0cff-0310-8789-dd5450dbe970
* * test_profile.c: Include <string.h> for strcmp() prototypeEzra Peisach2001-06-112-1/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13337 dc483132-0cff-0310-8789-dd5450dbe970
* * argv_parse.c (argv_parse): Cast argument to isspace() as int.Ezra Peisach2001-06-113-5/+11
| | | | | | | | | | * prof_parse.c (skip_over_blanks, parse_std_line, need_double_quotes): Likewise On some systems, isspace() is a macro indexing an array. Gcc warns on indexing an array with a char. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13335 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (MLIBS): Do not link against libgen.a for testEzra Peisach2001-06-112-1/+6
| | | | | | programs. (only needed for krb5 an_to_ln code). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13329 dc483132-0cff-0310-8789-dd5450dbe970
* * krb5.conf: Test with trailing whitespace on "default_realm"Tom Yu2001-02-022-2/+7
| | | | | | line. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12990 dc483132-0cff-0310-8789-dd5450dbe970