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]));
I've checked in a fix for this, but I think there is something else tricky going on. Let me know how the fix works.
Tim, your fix will not work with older versions of autoconf (e.g. 2.53 on UnitedLinux / SuSE SLES 8) from config.log: ----------------------------------------------------------- configure:25726: checking for krb5_keytab_entry.keyblock configure:25753: gcc -c -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I /usr/include/afs -I/usr/include/heimdal -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/usr/include/heimdal conftest.c >&5 configure: In function `main': configure:25744: invalid operands to binary != configure:25756: $? = 1 configure: failed program was: #line 25731 "configure" #include "confdefs.h" #include <krb5.h> #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { static krb5_keytab_entry ac_aggr; if (ac_aggr.keyblock) return 0; ; return 0; } configure:25772: result: no ----------------------------------------------------------- i think it would be better to check for the key/keyblock-members in the same manner as it is already done for the other variables (e.g. HAVE_KRB5_KEYBLOCK_KEYVALUE)
Created attachment 231 [details] more portable patch for configure.in
tested the new patch on various versions (autoconf) now without any problems. tim, what do you think of it?
Committed the proposed patch, thanks.
make sure you close the bug when it has been fixed.
Hmm. Did not see the difference between resolved and closed... ;-)
database cleanup