summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorDanilo Almeida <dalmeida@mit.edu>1999-08-05 20:26:47 +0000
committerDanilo Almeida <dalmeida@mit.edu>1999-08-05 20:26:47 +0000
commit74cab5052fd1b9ac4b053e0f1281572465c2bbf8 (patch)
tree4c6ffc0e5711d748a0c03fec2a1d0413af222901 /src/lib
parent62ebfa031824163ac9c464c53939b4a48d1ee25e (diff)
* init_ctx.c (get_profile_etype_list): Use profile_release_string
to free string allocated by profile_get_string. (krb5_init_context): Use a real context for krb5_win_ccdll_load. * get_in_tkt.c (krb5_appdefault_string): * conv_princ.c (krb5_425_conv_principal): Use profile_free_list to free values allocated by profile_get_values. * get_in_tkt.c (_krb5_conf_boolean, krb5_appdefault_boolean): Rename krb5_conf_boolean to _krb5_conf_boolean to denote that it is not public so that folks outside the libraries won't be tempted to use it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11624 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/krb/ChangeLog17
-rw-r--r--src/lib/krb5/krb/conv_princ.c6
-rw-r--r--src/lib/krb5/krb/get_in_tkt.c23
-rw-r--r--src/lib/krb5/krb/init_ctx.c6
4 files changed, 34 insertions, 18 deletions
diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog
index 10c4a2a44..f2cac0a2a 100644
--- a/src/lib/krb5/krb/ChangeLog
+++ b/src/lib/krb5/krb/ChangeLog
@@ -1,3 +1,20 @@
+1999-08-05 Danilo Almeida <dalmeida@mit.edu>
+
+ * init_ctx.c (get_profile_etype_list): Use profile_release_string
+ to free string allocated by profile_get_string.
+ (krb5_init_context): Use a real context for krb5_win_ccdll_load.
+
+ * get_in_tkt.c (krb5_appdefault_string):
+ * conv_princ.c (krb5_425_conv_principal): Use profile_free_list
+ to free values allocated by profile_get_values.
+
+1999-08-04 Danilo Almeida <dalmeida@mit.edu>
+
+ * get_in_tkt.c (_krb5_conf_boolean, krb5_appdefault_boolean):
+ Rename krb5_conf_boolean to _krb5_conf_boolean to denote that
+ it is not public so that folks outside the libraries won't
+ be tempted to use it.
+
1999-08-03 Danilo Almeida <dalmeida@mit.edu>
* get_creds.c (krb5_validate_or_renew_creds): Intialize out_creds
diff --git a/src/lib/krb5/krb/conv_princ.c b/src/lib/krb5/krb/conv_princ.c
index a58467f13..f89c3d490 100644
--- a/src/lib/krb5/krb/conv_princ.c
+++ b/src/lib/krb5/krb/conv_princ.c
@@ -263,10 +263,6 @@ krb5_425_conv_principal(context, name, instance, realm, princ)
not_service:
retval = krb5_build_principal(context, princ, strlen(realm), realm, name,
instance, 0);
- if (full_name) {
- for (cpp = full_name; *cpp; cpp++)
- krb5_xfree(*cpp);
- krb5_xfree(full_name);
- }
+ profile_free_list(full_name);
return retval;
}
diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c
index 1002195ae..ebf8e4477 100644
--- a/src/lib/krb5/krb/get_in_tkt.c
+++ b/src/lib/krb5/krb/get_in_tkt.c
@@ -571,7 +571,8 @@ static char *conf_no[] = {
0,
};
-int krb5_conf_boolean(s)
+int
+_krb5_conf_boolean(s)
char *s;
{
char **p;
@@ -651,18 +652,18 @@ goodbye:
return(ENOENT);
if (!nameval[0]) {
- free(nameval);
- return(ENOENT);
+ retval = ENOENT;
+ } else {
+ *ret_value = malloc(strlen(nameval[0]) + 1);
+ if (!*ret_value)
+ retval = ENOMEM;
+ else
+ strcpy(*ret_value, nameval[0]);
}
- *ret_value = nameval[0];
-
- for (cpp = &nameval[1]; *cpp; cpp++)
- free(*cpp);
+ profile_free_list(nameval);
- free(nameval);
-
- return 0;
+ return retval;
}
/* not static so verify_init_creds() can call it */
@@ -683,7 +684,7 @@ krb5_appdefault_boolean(context, realm, option, ret_value)
if (retval)
return(retval);
- *ret_value = krb5_conf_boolean(string);
+ *ret_value = _krb5_conf_boolean(string);
free(string);
return(0);
diff --git a/src/lib/krb5/krb/init_ctx.c b/src/lib/krb5/krb/init_ctx.c
index 2d8759241..10ba78e8f 100644
--- a/src/lib/krb5/krb/init_ctx.c
+++ b/src/lib/krb5/krb/init_ctx.c
@@ -72,7 +72,6 @@ krb5_init_context(context)
krb5_init_ets(ctx);
#if (defined(_MSDOS) || defined(_WIN32))
- krb5_win_ccdll_load(context); /* Load the krbcc32.dll if necessary */
/*
* krb5_vercheck() is defined in win_glue.c, and this is
* where we handle the timebomb and version server checks.
@@ -169,6 +168,9 @@ krb5_init_context(context)
ctx->fcc_default_format = tmp + 0x0500;
ctx->scc_default_format = tmp + 0x0500;
+#if (defined(_MSDOS) || defined(_WIN32))
+ krb5_win_ccdll_load(ctx); /* Load the krbcc32.dll if necessary */
+#endif
*context = ctx;
return 0;
@@ -319,7 +321,7 @@ get_profile_etype_list(context, ktypes, profstr, ctx_count, ctx_list)
}
old_ktypes[j] = (krb5_enctype) 0;
- free(retval);
+ profile_release_string(retval);
}
*ktypes = old_ktypes;