summaryrefslogtreecommitdiffstats
path: root/src/util/profile
Commit message (Collapse)AuthorAgeFilesLines
...
* * configure.in: Use AC_C_CONST instead of AC_CONST andEzra Peisach2000-11-012-2/+7
| | | | | | AC_CHECK_FUNCS instead of AC_HAVE_FUNCS. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12829 dc483132-0cff-0310-8789-dd5450dbe970
* * krb5.conf: Test with a space after ']' and '{'Ezra Peisach2000-08-023-3/+14
| | | | | | | * prof_parse.c (parse_std_line): Spaces after '{' or ']' should not be a fatal error. This is a common lossage in krb5.conf files. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12595 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_init.c: Cleanup internal type warnings in calls to profile_initEzra Peisach2000-07-245-8/+23
| | | | | | | | | | | | * test_parse.c (main): Cast arguments to error_message. * prof_file.c (profile_open_file): Variable with argument to malloc should be unsigned. * profile.hin: Revert changes to const_profile_filespect_t and profile_filespec_t to preserve interface. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12585 dc483132-0cff-0310-8789-dd5450dbe970
* Fix email address in ChangeLogEzra Peisach2000-06-261-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12437 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_init.c (profile_init_path): Use profile_filespec_t insteadEzra Peisach2000-06-263-8/+17
| | | | | | | | | | | of char *. (change provided by Nathan Neulinger <nneul@umr.edu>) * profile.hin: Make definition of const_profile_filespec_t to be based on profile_filespec_t. Compile time warnings cleanup. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12436 dc483132-0cff-0310-8789-dd5450dbe970
* Change wsanchez@apple -> tritan@mitWilfredo Sanchez2000-06-011-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12331 dc483132-0cff-0310-8789-dd5450dbe970
* 2000-05-15 Alexandra Ellwood <lxs@mit.edu>Alexandra Ellwood2000-05-152-6/+14
| | | | | | | | | * prof_get.c: prof_parse_boolean () was missing some curly brackets and was failing to check all the values in the list of possible strings. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12257 dc483132-0cff-0310-8789-dd5450dbe970
* 2000-04-03 Jeffrey Altman <jaltman@columbia.edu>Jeffrey Altman2000-04-042-1/+7
| | | | | | | | * prof_get.c: profile_get_boolean() was calling prof_parse_boolean() instead of profile_get_boolean() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12148 dc483132-0cff-0310-8789-dd5450dbe970
* 2000-04-03 Jeffrey Altman <jaltman@columbia.edu>Jeffrey Altman2000-04-042-6/+12
| | | | | | | | * prof_get.c: . Added #include <limits.h> for definitions of INT_MAX, etc. . Changed 'ret_int' to 'ret_boolean' in prof_get_boolean git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12147 dc483132-0cff-0310-8789-dd5450dbe970
* Added profile_get_booleanMiro Jurisic2000-03-245-1/+97
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12136 dc483132-0cff-0310-8789-dd5450dbe970
* Include string.h for strlen prototypeEzra Peisach2000-03-182-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12127 dc483132-0cff-0310-8789-dd5450dbe970
* log tritan's changesTom Yu1999-10-261-0/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11877 dc483132-0cff-0310-8789-dd5450dbe970
* Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES, LOCAL_INCLUDES suchWilfredo Sanchez1999-10-261-3/+1
| | | | | | | that one can override CFLAGS from the command line without losing CPP search patchs and defines. Some associated Makefile cleanup. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11876 dc483132-0cff-0310-8789-dd5450dbe970
* Danilo's const_profile_filespec_t and other changes from 1.1 branchKen Raeburn1999-09-016-14/+32
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11766 dc483132-0cff-0310-8789-dd5450dbe970
* Removed com_err functions from profile.expMiro Jurisic1999-08-182-3/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11681 dc483132-0cff-0310-8789-dd5450dbe970
* Remove profile_free_string because we already have profile_release_stringDanilo Almeida1999-08-053-13/+2
| | | | | | (who named these things anyhow?) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11623 dc483132-0cff-0310-8789-dd5450dbe970
* Add profile_free_string to free strings allocated by profile_get_stringDanilo Almeida1999-08-053-0/+18
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11622 dc483132-0cff-0310-8789-dd5450dbe970
* prof_file.c (profile_open_file)Alexandra Ellwood1999-08-031-0/+6
| | | | | | | Mac OS side now sets profile->magic to PROF_MAGIC_FILE so the rest of the functions think it's a real profile. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11617 dc483132-0cff-0310-8789-dd5450dbe970
* Added line to initialize profile->magic on the Macintosh because all of the ↵Alexandra Ellwood1999-08-031-0/+1
| | | | | | other profile library functions check for it and do nothing if it isn't there git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11614 dc483132-0cff-0310-8789-dd5450dbe970
* Updating changelogJeffrey Altman1999-07-231-0/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11593 dc483132-0cff-0310-8789-dd5450dbe970
* If no filespecs are provided, then return an empty profileJeffrey Altman1999-07-231-9/+13
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11590 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_int.h (profile_t): Delete typedef, since Miro changed prof_int.h toKen Raeburn1999-07-214-20/+25
| | | | | | | | include profile.h, which also has the typedef. * prof_file.c, prof_init.c: Fix typos and missed variable and type name changes from Miro's patch. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11571 dc483132-0cff-0310-8789-dd5450dbe970
* #ifdefed out krb5_*config_file on MacOSMiro Jurisic1999-07-211-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11570 dc483132-0cff-0310-8789-dd5450dbe970
* Profile library now uses MacOS native file specifiers on MacOS, and file ↵Miro Jurisic1999-07-211-13/+44
| | | | | | paths on all other OSes git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11569 dc483132-0cff-0310-8789-dd5450dbe970
* Profile library now uses MacOS native file specifiers on MacOS, and file ↵Miro Jurisic1999-07-213-90/+136
| | | | | | paths on all other OSes git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11566 dc483132-0cff-0310-8789-dd5450dbe970
* Added #ifdef __cplusplus extern "C"Miro Jurisic1999-07-142-0/+12
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11565 dc483132-0cff-0310-8789-dd5450dbe970
* AddedMiro Jurisic1999-07-101-0/+33
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11553 dc483132-0cff-0310-8789-dd5450dbe970
* Check whether profile is valid before partying on itDanilo Almeida1999-06-232-0/+11
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11527 dc483132-0cff-0310-8789-dd5450dbe970
* minor syntax cleanupKen Raeburn1999-06-182-1/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11522 dc483132-0cff-0310-8789-dd5450dbe970
* Fix memory leak in profile_init_path()Danilo Almeida1999-06-172-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11517 dc483132-0cff-0310-8789-dd5450dbe970
* Merged changed from Mac_V2_0_derivatives branchMiro Jurisic1999-06-092-1/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11499 dc483132-0cff-0310-8789-dd5450dbe970
* These are a bunch of intertwined changes to the windows build.Danilo Almeida1999-05-192-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | This log message includes all of the different changes across several Makefile.in files (and win-pre.in and win-post.in): - Remove "-" from recursive windows make invocations so that we can bail on a build error. New MIGNORE option restores the previous bailing behavior. - Update windows readme to reflect current practices. - Add NO_OUTDIR synonym for NO_OUTPRE in windows build. - Top-level windows Makefile now builds util which now builds util/windows, util/et, and util/profile (instead of building them directly). - Remove trailing backslash from rule that creates the windows output dir. This backslash would cause the rule to always be invoked. - Move WCONFIG and WCONFIG_EXE definitions into win-pre.in. - Remove rules in include directory that blindly copy include header files from gssapi, et, and profile. Instead, use/add build rules to the components that generate them that copy only when the file changes. - Use dependencies in include/krb5 to copy header files instead of blindly copying them. Add !if 0/!endif wrapper to Unix version of the rules. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11464 dc483132-0cff-0310-8789-dd5450dbe970
* Do win32 build in subdirDanilo Almeida1999-05-102-15/+21
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11432 dc483132-0cff-0310-8789-dd5450dbe970
* prof_init.c (profile_abandon): New function which frees the profileTheodore Tso1999-04-145-6/+41
| | | | | | | | | | handle and throwing away any changes that might have been made before they are flushed to disk. prof_file.c (profile_close_file): Move functionality of freeing the profile file to the new function profile_free_file(). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11355 dc483132-0cff-0310-8789-dd5450dbe970
* * profile.hin: Fix GSS_DLLIMPTom Yu1999-03-152-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11293 dc483132-0cff-0310-8789-dd5450dbe970
* * profile.hin: Fix prototype of profile_flush() to use long ratherTom Yu1999-03-092-1/+7
| | | | | | | than errcode_t to avoid breaking other stuff that includes profile.h. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11246 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_tree.c (profile_node_iterator): Fix bug where it will loopTheodore Tso1999-03-083-3/+15
| | | | | | | | | | endlessly when searching an empty section. * test_profile.c: Add code so that the "add" code will interpret "NULL" as calling profile_add_relation with a null pointer for the value. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11245 dc483132-0cff-0310-8789-dd5450dbe970
* prof_file.c (profile_flush_file): On the Macintosh, fopen() doesn'tTheodore Tso1999-03-033-2/+19
| | | | | | | | | set errno when fopen fails to open a file. Work around this by setting errno to PROF_FAIL_OPEN in this case. prof_err.et: Add new error code PROF_FAIL_OPEN. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11238 dc483132-0cff-0310-8789-dd5450dbe970
* test_profile.c: Added ability to test profile set functions, and in aTheodore Tso1999-03-0314-81/+531
| | | | | | | | | | | | | | | | | | | | | | batch mode. prof_init.c (profile_flush): Add new public function for flushing changes made to the profile. prof_parse.c (profile_write_tree_file): Add official internal function for flushing out a profile tree to a FILE *. configure.in, prof_file.c (rw_access): Add new function which checks to see whether we have read/write access, and emulate this for losing non-POSIX OS's. prof_file.c (profile_flush_file): Add support for writing modified profile file's. Call profile_flush_file from profile_close_file(). Also fixed minor bugs in prof_tree.c which affected renaming sections and modifying existing relations. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11237 dc483132-0cff-0310-8789-dd5450dbe970
* prof_tree.c: Add new functions profile_get_node_name,Theodore Tso1999-03-039-134/+620
| | | | | | | | | | | | | | | | | | | | | profile_get_node_value, profile_find_node, profile_remove_node, profile_set_relation_value, profile_rename_node. Rewrite profile_find_node_relation and profile_find_node_subsection in terms of profile_find_node. prof_set.c, Makefile.in: Add a new file which exports the public interfaces for setting profile entries. prof_get.c, prof_init.c, prof_int.h: Add the KRB5_DLLIMP and KRB5_CALLCONV to all of the various profile routines so they can be properly exported via a Windows DLL. prof_int.h: Add definition for the flags in the profile structure. prof_err.et: Add new error codes PROF_SET_SECTION_VALUE, PROF_EINVAL, PROF_READ_ONLY, and PROF_EXISTS. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11236 dc483132-0cff-0310-8789-dd5450dbe970
* test_parse.c (main): Add a call to profile_verify_node so we can testTheodore Tso1999-02-193-4/+24
| | | | | | | | | | the internal rep invariants. prof_tree.c (profile_verify_node): Fix bug in profile_verify_node in the group_level test. Also make profile_verify_node check the return code when it is recursively testing the child nodes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11189 dc483132-0cff-0310-8789-dd5450dbe970
* (Forgot to check in ChangeLog earlier...)Theodore Tso1999-02-091-0/+11
| | | | | | | | | | | | prof_tree.c (profile_node_iterator): Added comments indicating that profile_node_iterator, not being an exported interface, returns pointers into the parse tree, and that values should be strdup()'ed before returning them to a calling application. prof_get.c (profile_iterator): Strdup the name and value strings before returning them to the calling application. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11153 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_tree.c (profile_node_iterator): Added comments indicating thatTheodore Tso1999-01-252-2/+39
| | | | | | | | | | | profile_node_iterator, not being an exported interface, returns pointers into the parse tree, and that values should be strdup()'ed before returning them to a calling application. prof_get.c (profile_iterator): Strdup the name and value strings before returning them to the calling application. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11124 dc483132-0cff-0310-8789-dd5450dbe970
* profile.hin: Fix definition of PROTOYPE so that it works under C++Theodore Tso1999-01-212-1/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11113 dc483132-0cff-0310-8789-dd5450dbe970
* prof_tree.c (profile_node_iterator): Make sure the pointer to theTheodore Tso1999-01-023-3/+26
| | | | | | | | | iterator function is non-NULL before checking the magic value. prof_file.c (profile_open_file): Add ability to parse filenames that begin with "~/" and substitute it with "$HOME/". git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11096 dc483132-0cff-0310-8789-dd5450dbe970
* prof_get.c: Add new public profile_iterator functions for iteratingTheodore Tso1998-12-045-5/+62
| | | | | | over values found in the profile file. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11062 dc483132-0cff-0310-8789-dd5450dbe970
* prof_get.c (profile_get_values): If there are no relations found,Theodore Tso1998-11-172-0/+10
| | | | | | return PROF_NO_RELATION, instead of an empty list. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11043 dc483132-0cff-0310-8789-dd5450dbe970
* Makefile.in: Set the myfulldir and mydir variables (which are relativeTheodore Tso1998-11-1413-242/+480
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to buildtop and thisconfigdir, respectively.) configure.in: Build the test script prtest for doing regression test suites of the profile library. prof_err.et (PROF_MAGIC_ITERATOR): Add a new error code for the magic number for the iterator structure. prof_file.c (profile_update_file): Increment the update serial number when the profile file is re-read. prof_tree.c (profile_make_node_final, profile_is_node_final): Add a new attribute for a node, which is whether or not the node is "final". This controls whether or not the next profile file should be searched when looking up a key which matches the section named by the node. (profile_node_iterator_create, profile_node_iterator_free, profile_node_iterator): New functions which take a profile_t and returns all of the names or values for a particular search key. This iterator follows the rules of doing multiple profile file lookups using the "final node" marker to stop searching subsequent profile files. prof_parse.c (parse_std_line): Add support for marking top level sections, subsections, and individual nodes as final, using the '*' character. (dump_profile_to_file): Print finalized sections with the '*' character. prof_get.c: Update routines to use the iterators provided by prof_tree.c. prof_int.c: Add upd_serial member to the prf_file_t structure. Define the symbolic flags used by the profile node iterator. Add function declarations for profile_make_node_final, profile_is_node_final, profile_node_iterator_create, profile_node_iterator_free, profile_node_iterator, and profile_get_value. test_profile.c: Add the query1 command which tests profile_get_value. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11038 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_init.c (profile_init): Fix a problem whereby if the lastGeoffrey King1998-11-052-3/+12
| | | | | | | pathname in a list of pathnames was nonexistent, an error would be returned that they were all nonexistent. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11015 dc483132-0cff-0310-8789-dd5450dbe970
* Makefile.in: Added prof_get.c to the list of files to be compiledTheodore Tso1998-11-0312-608/+710
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | profile.hin: Added declarations for profile_free_list(), profile_get_relation_names(), and profile_get_subsection_names(). (These are new public interfaces to the profile library.) prof_int.h: Removed the profile_section_t structure, which was used only by the now-defunct prof_section.c file. Added the internal interfaces for the new public interfaces. Removed unused declarations which were never implemented(profile_get, profile_update). prof_init.c: Moved all of the profile querying functions (profile_get_values(), profile_get_value(), etc.) to prof_get.c. In the process, removed the really bletcherous (and badly implemented) profile_get_first_values(), which did nothing like what the named implied. Also added to prof_get.c new functions profile_get_subsection_names() and profile_get_relation_names(). (profile_ser_internalize): Rewrote error handling to be clearer, and removed a bug where memory was not freed correctly in an error case. (profile_init): If a list of pathnames is passed in, profile_init will now try to open all of them, now that we've defined query fallback semantics in prof_get.c prof_parse.c: Fix lint warning. prof_tree.c (profile_find_node_relation, profile_find_node_subsection): Allow the returned value or subsection field to be NULL (in case the caller isn't interested in getting the returned value or subsection, and only cares about getting the name). (profile_delete_node_relation, profile_delete_interior_node_relation): Removed these functions and replaced it with profile_remove_node(), which takes a boolean argument section_flag. (profile_find_node_name): Removed this function. (This was a Cygnus/Fusion special used by the now removed profile_find_first_values() function.) test_profile.c: Added commands to test the new profile_get_subsection_names() and profile_get_relation_names() interfaces. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11011 dc483132-0cff-0310-8789-dd5450dbe970