[OpenAFS-devel] krb5 token tools.

Derrick Brashear shadow@gmail.com
Thu, 8 Nov 2007 09:48:51 -0500


On Nov 7, 2007 8:51 AM, Sean O'Malley <omalleys@msu.edu> wrote:
> Am I supposed to have rxk5 support while building krb5 utilities?
> I was trying to build Solaris 10/x86 with sun krb5 against cvs head and it
> was failing miserably.
>
> The two biggest issues were libcom_err.a wasn't being linked.
> I manually added that to the compile. I made a couple of changes to klog.c
> The first I assume is because it wasn't including com_err.h
> the second is a hack I stole from Marcus and the rxk5 peeps, but I think
> the ifdef isn't correct. It should be something like
> #ifndef SUNKRB5 with a test somewhere to define it because you should be
> able to use another krb5 on Solaris.
>
add krb5_cc_register to the list of funcs to check for, in
src/cf/kerberos.m4, and then ifdef the code HAVE_KRB5_CC_REGISTER

> Once I got this compiled, the klog utility worked with krb5 but core
> dumped with the -tmp flag.
>
> Here is what I added:
>
> Index: openafs/src/aklog/klog.c
> ===================================================================
> RCS file: /cvs/openafs/src/aklog/klog.c,v
> retrieving revision 1.4
> diff -u -r1.4 klog.c
> --- openafs/src/aklog/klog.c    5 Nov 2007 21:43:00 -0000       1.4
> +++ openafs/src/aklog/klog.c    7 Nov 2007 03:43:00 -0000
> @@ -390,7 +390,7 @@
>      Silent = (as->parms[aSILENT].items ? 1 : 0);
>
>      if (Silent) {
> -       set_com_err_hook(silent_errors);
> +       afs_set_com_err_hook(silent_errors);
>      }
>
>      if ((code = krb5_init_context(&k5context))) {
> @@ -598,9 +598,11 @@
>                 what = "getting default ccache";
>                 code = krb5_cc_default(k5context, &cc);
>             } else {
> +#ifndef sun
>                 what = "krb5_cc_register";
>                 code = krb5_cc_register(k5context, &krb5_mcc_ops, FALSE);
>                 if (code && code != KRB5_CC_TYPE_EXISTS) goto Failed;
> +#endif
>                 what = "krb5_cc_resolve";
>                 code = krb5_cc_resolve(k5context, "MEMORY:core", &cc);
>                 if (code) goto Failed;
>
>
>
> --------------------------------------
>   Sean O'Malley, Information Technologist
>   Michigan State University
> -------------------------------------
>
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel
>