summaryrefslogtreecommitdiff
path: root/server/util
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-11-11 14:16:41 +0100
committerStephen Gallagher <sgallagh@redhat.com>2009-11-20 11:18:49 -0500
commit9c49fb9a7cb6aa87a7bce1865887d6e4f78ce5fd (patch)
tree01eab02d15e4689f6df79dbe7b95d699987ce43b /server/util
parenteb78b771fe2beefef84295673e36eb3fbb11730a (diff)
downloadsssd-9c49fb9a7cb6aa87a7bce1865887d6e4f78ce5fd.tar.gz
sssd-9c49fb9a7cb6aa87a7bce1865887d6e4f78ce5fd.tar.bz2
sssd-9c49fb9a7cb6aa87a7bce1865887d6e4f78ce5fd.zip
Validate Kerberos credentials with local keytab
Diffstat (limited to 'server/util')
-rw-r--r--server/util/sss_krb5.c16
-rw-r--r--server/util/sss_krb5.h2
2 files changed, 16 insertions, 2 deletions
diff --git a/server/util/sss_krb5.c b/server/util/sss_krb5.c
index 59e278ed..e96e1ba4 100644
--- a/server/util/sss_krb5.c
+++ b/server/util/sss_krb5.c
@@ -83,10 +83,22 @@ void KRB5_CALLCONV sss_krb5_get_init_creds_opt_free (krb5_context context,
krb5_get_init_creds_opt *opt)
{
#ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC
- krb5_get_init_creds_opt_free(context, opt);
+ krb5_get_init_creds_opt_free(context, opt);
#else
- free(opt);
+ free(opt);
#endif
return;
}
+
+void KRB5_CALLCONV sss_krb5_free_unparsed_name(krb5_context context, char *name)
+{
+#ifdef HAVE_KRB5_FREE_UNPARSED_NAME
+ krb5_free_unparsed_name(context, name);
+#else
+ if (name != NULL) {
+ memset(name, 0, strlen(name));
+ free(name);
+ }
+#endif
+}
diff --git a/server/util/sss_krb5.h b/server/util/sss_krb5.h
index 755cf816..342196d3 100644
--- a/server/util/sss_krb5.h
+++ b/server/util/sss_krb5.h
@@ -42,4 +42,6 @@ krb5_error_code KRB5_CALLCONV sss_krb5_get_init_creds_opt_alloc(
void KRB5_CALLCONV sss_krb5_get_init_creds_opt_free (krb5_context context,
krb5_get_init_creds_opt *opt);
+
+void KRB5_CALLCONV sss_krb5_free_unparsed_name(krb5_context context, char *name);
#endif /* __SSS_KRB5_H__ */