summaryrefslogtreecommitdiffstats
path: root/src/util/profile
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2012-02-03 20:43:13 +0000
committerTom Yu <tlyu@mit.edu>2012-02-03 20:43:13 +0000
commit0b872fa797cd65871f946565c0ddc7937e1ba72b (patch)
treee74cdefdb0c3d26f9d3b7cc439c9437e5ca9cd83 /src/util/profile
parent766d43105fd4f15fdc7be9c236f14f237cf7f6a6 (diff)
downloadkrb5-0b872fa797cd65871f946565c0ddc7937e1ba72b.tar.gz
krb5-0b872fa797cd65871f946565c0ddc7937e1ba72b.tar.xz
krb5-0b872fa797cd65871f946565c0ddc7937e1ba72b.zip
Revert r25669 pending clarification of goals and API review
New APIs of this sort should be discussed, and the goals motivating the change clarified. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25670 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/profile')
-rw-r--r--src/util/profile/libprofile.exports5
-rw-r--r--src/util/profile/prof_get.c59
-rw-r--r--src/util/profile/profile.hin9
3 files changed, 2 insertions, 71 deletions
diff --git a/src/util/profile/libprofile.exports b/src/util/profile/libprofile.exports
index 743bc4901..3f02b4f4f 100644
--- a/src/util/profile/libprofile.exports
+++ b/src/util/profile/libprofile.exports
@@ -7,11 +7,8 @@ profile_flush
profile_free_list
profile_get_boolean
profile_get_integer
-profile_get_string
-profile_get_boolean_nodef
-profile_get_integer_nodef
-profile_get_string_nodef
profile_get_relation_names
+profile_get_string
profile_get_subsection_names
profile_get_values
profile_init
diff --git a/src/util/profile/prof_get.c b/src/util/profile/prof_get.c
index b4f6ee82b..3eba78722 100644
--- a/src/util/profile/prof_get.c
+++ b/src/util/profile/prof_get.c
@@ -280,23 +280,6 @@ profile_get_string(profile_t profile, const char *name, const char *subname,
return 0;
}
-errcode_t KRB5_CALLCONV
-profile_get_string_nodef(profile_t profile, const char **names, char **ret_string)
-{
- char *value = NULL;
- errcode_t retval = 0;
-
- if (profile == 0)
- return 0;
-
- retval = profile_get_value(profile, names, &value);
- if (retval == 0) {
- *ret_string = value;
- return 0;
- } else if (retval != PROF_NO_SECTION && retval != PROF_NO_RELATION)
- return retval;
-}
-
static errcode_t
parse_int(const char *value, int *ret_int)
{
@@ -351,30 +334,11 @@ profile_get_integer(profile_t profile, const char *name, const char *subname,
return retval;
}
-errcode_t KRB5_CALLCONV
-profile_get_integer_nodef(profile_t profile, const char **names, int *ret_int)
-{
- char *value = NULL;
- errcode_t retval = 0;
-
- if (profile == 0)
- return 0;
-
- retval = profile_get_value(profile, names, &value);
- if (retval == PROF_NO_SECTION || retval == PROF_NO_RELATION) {
- return retval;
- } else if (retval)
- return retval;
-
- retval = parse_int(value, ret_int);
- free(value);
- return retval;
-}
-
static const char *const conf_yes[] = {
"y", "yes", "true", "t", "1", "on",
0,
};
+
static const char *const conf_no[] = {
"n", "no", "false", "nil", "0", "off",
0,
@@ -434,27 +398,6 @@ profile_get_boolean(profile_t profile, const char *name, const char *subname,
return retval;
}
-errcode_t KRB5_CALLCONV
-profile_get_boolean_nodef(profile_t profile, const char **names,
- int *ret_boolean)
-{
- char *value = NULL;
- errcode_t retval = 0;
-
- if (profile == 0)
- return 0;
-
- retval = profile_get_value(profile, names, &value);
- if (retval == PROF_NO_SECTION || retval == PROF_NO_RELATION) {
- return retval;
- } else if (retval)
- return retval;
-
- retval = profile_parse_boolean(value, ret_boolean);
- free(value);
- return retval;
-}
-
/*
* This function will return the list of the names of subections in the
* under the specified section name.
diff --git a/src/util/profile/profile.hin b/src/util/profile/profile.hin
index db437d6aa..45ad55430 100644
--- a/src/util/profile/profile.hin
+++ b/src/util/profile/profile.hin
@@ -91,15 +91,6 @@ long KRB5_CALLCONV profile_get_boolean
const char *subsubname, int def_val,
int *ret_default);
-long KRB5_CALLCONV profile_get_string_nodef
- (profile_t profile, const char **names, char **ret_string);
-
-long KRB5_CALLCONV profile_get_integer_nodef
- (profile_t profile, const char **names, int *ret_default);
-
-long KRB5_CALLCONV profile_get_boolean_nodef
- (profile_t profile, const char **names, int *ret_default);
-
long KRB5_CALLCONV profile_get_relation_names
(profile_t profile, const char **names, char ***ret_names);