[Samba] Samba 3.0.0 CVS 3.0.1pre2: "libads/kerberos_verify.c", line 77: improper member use: keyblock

Eric Boehm boehm at nortelnetworks.com
Thu Oct 16 12:41:05 GMT 2003


This has been submitted to https://bugzilla.samba.org/ as Bug 636

I'm trying to build Samba 3.0.0 CVS 3.0.1pre2 under Solaris 8 with

MIT Kerberos 5 1.3.1
OpenLDAP 2.1.22

using the Sun Workshop 6U2 compiler

Arguments to configure are:

configured by ./configure, generated by GNU Autoconf 2.53,
  with options \"'--with-readline' '--with-libiconv=/usr/local' '--with-ldap' '-
-with-krb5=/usr/local/kerberos' '--with-ldapsam' '--with-automount' '--with-libs
mbclient' '--with-acl-support' '--with-winbind' '--prefix=/usr/local' 'CC=cc' 'C
FLAGS=-xarch=v9a' 'CPPFLAGS=-I/usr/local/include -I/usr/local/openldap/include -
I/usr/local/sasl/include -I/usr/local/kerberos/include -I/usr/local/BerkeleyDB.4
.1/include -I/usr/local/openssl/include' 'LDFLAGS=-L/usr/local/lib/sparcv9 -L/us
r/local/openldap/lib -L/usr/local/sasl/lib -L/usr/local/kerberos/lib -L/usr/loca
l/BerkeleyDB.4.1/lib -L/usr/local/openssl/lib -R/usr/local/lib/sparcv9 -R/usr/lo
cal/openldap/lib -R/usr/local/sasl/lib -R/usr/local/kerberos/lib -R/usr/local/Be
rkeleyDB.4.1/lib -R/usr/local/openssl/lib'\"


I get the following error trying to compile libads/kerberos_verify.c

"libads/kerberos_verify.c", line 77: improper member use: keyblock

The relevant code below looks okay to me


static krb5_error_code create_keytab(krb5_context context,
                                     krb5_principal host_princ,
                                     char *host_princ_s,
                                     krb5_data password,
                                     krb5_enctype *enctypes,
                                     krb5_keytab *keytab,
                                     char *keytab_name)
{
        krb5_keytab_entry entry;
        krb5_kvno kvno = 1;
        krb5_error_code ret;
        krb5_keyblock *key;
        int i;

[... lines deleted ...]


                entry.keyblock  = *key;

The problem is that the structure member name is key, not keyblock.

>From krb5.h

typedef struct krb5_keytab_entry_st {
    krb5_magic magic;
    krb5_principal principal;   /* principal of this key */
    krb5_timestamp timestamp;   /* time entry written to keytable */
    krb5_kvno vno;              /* key version number */
    krb5_keyblock key;          /* the secret key */
} krb5_keytab_entry;

Here's a possible patch

--- libads/kerberos_verify.c~   Tue Oct 14 13:28:27 2003
+++ libads/kerberos_verify.c    Thu Oct 16 08:37:20 2003
@@ -74,7 +74,7 @@
                /* this will have to be detected in configure...heimdal
                   calls it keyblock, MIT calls it key, but it does not
                   matter we are creating keytabs with MIT */
-               entry.keyblock  = *key;
+               entry.key       = *key;
 
                DEBUG(10,("adding keytab-entry for (%s) with encryption type (%d)\n",
                                host_princ_s, enctypes[i]));

-- 
Eric M. Boehm                  /"\  ASCII Ribbon Campaign
boehm at nortelnetworks.com       \ /  No HTML or RTF in mail
                                X   No proprietary word-processing
Respect Open Standards         / \  files in mail



More information about the samba mailing list