diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2010-11-04 19:29:01 +0100 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2010-11-22 16:01:35 -0500 |
commit | 3b7a86024b53fd0ac1a98e92bd93a170a1979aec (patch) | |
tree | c3fb64a3896c46f6822ac63d786320c0f7ec2e9b /daemons/ipa-slapi-plugins | |
parent | ce75d1c6d6595bcb26dbacf7393098a8f9accb3f (diff) | |
download | freeipa-3b7a86024b53fd0ac1a98e92bd93a170a1979aec.tar.gz freeipa-3b7a86024b53fd0ac1a98e92bd93a170a1979aec.tar.xz freeipa-3b7a86024b53fd0ac1a98e92bd93a170a1979aec.zip |
Use internal implementation of internal Kerberos functions
Don't use KRB5_PRIVATE.
The patch implements and uses the following krb5 functions that are
otherwise private in recent MIT Kerberos releases:
* krb5_principal2salt_norealm
* krb5_free_ktypes
Signed-off-by: Simo Sorce <ssorce@redhat.com>
Diffstat (limited to 'daemons/ipa-slapi-plugins')
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am | 4 | ||||
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd.h | 1 | ||||
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am b/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am index 6f6092d20..41d9f2378 100644 --- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am +++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am @@ -1,11 +1,14 @@ NULL = PLUGIN_COMMON_DIR=../common +KRB5_UTIL_DIR= ../../../util +KRB5_UTIL_SRCS=$(KRB5_UTIL_DIR)/ipa_krb5.c INCLUDES = \ -I. \ -I$(srcdir) \ -I$(PLUGIN_COMMON_DIR) \ + -I$(KRB5_UTIL_DIR) \ -DPREFIX=\""$(prefix)"\" \ -DBINDIR=\""$(bindir)"\" \ -DLIBDIR=\""$(libdir)"\" \ @@ -28,6 +31,7 @@ libipa_pwd_extop_la_SOURCES = \ ipapwd_encoding.c \ ipapwd_prepost.c \ ipa_pwd_extop.c \ + $(KRB5_UTIL_SRCS) \ $(NULL) libipa_pwd_extop_la_LDFLAGS = -avoid-version diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd.h b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd.h index 523934ccd..bc521071e 100644 --- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd.h +++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd.h @@ -52,7 +52,6 @@ #include <prio.h> #include <ssl.h> #include <dirsrv/slapi-plugin.h> -#define KRB5_PRIVATE 1 #include <krb5.h> #include <lber.h> #include <time.h> diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c index 451350163..bba636773 100644 --- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c +++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c @@ -54,6 +54,7 @@ #include "ipapwd.h" #include "util.h" +#include "ipa_krb5.h" /* krbTicketFlags */ #define KTF_DISALLOW_POSTDATED 0x00000001 @@ -341,7 +342,7 @@ static Slapi_Value **encrypt_encode_key(struct ipapwd_krbcfg *krbcfg, case KRB5_KDB_SALTTYPE_NOREALM: - krberr = krb5_principal2salt_norealm(krbctx, princ, &salt); + krberr = ipa_krb5_principal2salt_norealm(krbctx, princ, &salt); if (krberr) { LOG_FATAL("krb5_principal2salt failed [%s]\n", krb5_get_error_message(krbctx, krberr)); |