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 /ipa-client | |
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 'ipa-client')
-rw-r--r-- | ipa-client/Makefile.am | 5 | ||||
-rw-r--r-- | ipa-client/ipa-getkeytab.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/ipa-client/Makefile.am b/ipa-client/Makefile.am index 655a68664..ebb9a8392 100644 --- a/ipa-client/Makefile.am +++ b/ipa-client/Makefile.am @@ -12,9 +12,13 @@ if HAVE_GCC endif export AM_CFLAGS +KRB5_UTIL_DIR=../util +KRB5_UTIL_SRCS=$(KRB5_UTIL_DIR)/ipa_krb5.c + INCLUDES = \ -I. \ -I$(srcdir) \ + -I$(KRB5_UTIL_DIR) \ -DPREFIX=\""$(prefix)"\" \ -DBINDIR=\""$(bindir)"\" \ -DLIBDIR=\""$(libdir)"\" \ @@ -38,6 +42,7 @@ sbin_PROGRAMS = \ ipa_getkeytab_SOURCES = \ ipa-getkeytab.c \ + $(KRB5_UTIL_SRCS) \ $(NULL) ipa_getkeytab_LDADD = \ diff --git a/ipa-client/ipa-getkeytab.c b/ipa-client/ipa-getkeytab.c index a54c57c7e..858865269 100644 --- a/ipa-client/ipa-getkeytab.c +++ b/ipa-client/ipa-getkeytab.c @@ -27,10 +27,10 @@ #include <stdio.h> #include <stdarg.h> #include <stdlib.h> +#include <stdint.h> #include <string.h> #include <errno.h> #include <time.h> -#define KRB5_PRIVATE 1 #include <krb5.h> #ifdef WITH_MOZLDAP #include <mozldap/ldap.h> @@ -44,6 +44,8 @@ #include <libintl.h> #define _(STRING) gettext(STRING) +#include "ipa_krb5.h" + /* Salt types */ #define NO_SALT -1 #define KRB5_KDB_SALTTYPE_NORMAL 0 @@ -152,7 +154,7 @@ static int prep_ksdata(krb5_context krbctx, const char *str, ksdata[i].salttype = KRB5_KDB_SALTTYPE_NORMAL; } - krb5_free_ktypes(krbctx, ktypes); + ipa_krb5_free_ktypes(krbctx, ktypes); nkeys = i; @@ -322,7 +324,7 @@ static int create_keys(krb5_context krbctx, break; case KRB5_KDB_SALTTYPE_NOREALM: - krberr = krb5_principal2salt_norealm(krbctx, princ, &ksdata[i].salt); + krberr = ipa_krb5_principal2salt_norealm(krbctx, princ, &ksdata[i].salt); if (krberr) { fprintf(stderr, _("Failed to create key!\n")); return 0; @@ -848,7 +850,7 @@ int main(int argc, char *argv[]) } fprintf(stdout, "%s\n", enc); } - krb5_free_ktypes(krbctx, ktypes); + ipa_krb5_free_ktypes(krbctx, ktypes); exit (0); } |