<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>210762</bug_id>
          
          <creation_ts>2008-02-19 21:42 0000</creation_ts>
          <short_desc>net-fs/autofs-5.0.3-r1: build errors with app-crypt/heimdal-0.7.2-r3 in cyrus-sasl.c function sasl_do_kinit</short_desc>
          <delta_ts>2008-05-15 16:01:23 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>2007.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>Martin.vGagern@gmx.net</reporter>
          <assigned_to>stefaan@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>Martin.vGagern@gmx.net</who>
            <bug_when>2008-02-19 21:42:42 0000</bug_when>
            <thetext>gcc -march=prescott -O2 -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I../include -I../lib -fPIC -D_GNU_SOURCE -DAUTOFS_LIB_DIR=\&quot;/usr/lib/autofs\&quot; -DAUTOFS_MAP_DIR=\&quot;/etc/autofs\&quot; -DLDAP_DEPRECATED=1  -I/usr/include/libxml2 -DLDAP_THREAD_SAFE -c cyrus-sasl.c
cyrus-sasl.c: In function ‘sasl_do_kinit’:
cyrus-sasl.c:455: error: request for member ‘length’ in something not a structure or union
cyrus-sasl.c:456: error: request for member ‘data’ in something not a structure or union
cyrus-sasl.c:458: error: request for member ‘length’ in something not a structure or union
cyrus-sasl.c:459: error: request for member ‘data’ in something not a structure or union
make[1]: *** [cyrus-sasl.o] Error 1

Looking at the preprocessed output (gcc -E), these are the relevant parts of the included header files.
/usr/include/krb5_asn1.h:18:typedef char *heim_general_string;
/usr/include/krb5_asn1.h:266:typedef heim_general_string Realm;
/usr/include/krb5.h:289:typedef Realm krb5_realm;
/usr/include/krb5-protos.h:2384:krb5_realm*
/usr/include/krb5-protos.h:2385:krb5_princ_realm (
/usr/include/krb5-protos.h:2386:        krb5_context /*context*/,
/usr/include/krb5-protos.h:2387:        krb5_principal /*principal*/);
They all come from the app-crypt/heimdal-0.7.2-r3 ebuild.

These are the USE flags used for related packages:
app-crypt/heimdal-0.7.2-r3 (X berkdb ipv6 ldap ssl)
dev-libs/cyrus-sasl-2.1.22-r2 (berkdb crypt gdbm java kerberos ldap mysql pam postgres ssl -authdaemond -elibc_FreeBSD -ntlm_unsupported_patch -sample -srp -urandom)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>stefaan@gentoo.org</who>
            <bug_when>2008-04-28 13:26:05 0000</bug_when>
            <thetext>Please see http://www.mail-archive.com/autofs@linux.kernel.org/msg06165.html.

It builds fine with mit-krb5.  I&apos;m afraid I don&apos;t know enough about kerberos / sasl / ... to fix this.  I would suggest you file a bug upstream.  It seems like the autofs mailing list is the place to go.  
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>Martin.vGagern@gmx.net</who>
            <bug_when>2008-04-28 15:14:53 0000</bug_when>
            <thetext>Created an attachment (id=151247)
Use krb5_realm_{length,data}

(In reply to comment #1)
&gt; It builds fine with mit-krb5.  I&apos;m afraid I don&apos;t know enough about kerberos /
&gt; sasl / ... to fix this.

I just worte a proposed fix for this, which I would expect to work fine for both mit-krb5 and heimdal. There are two macros called krb5_realm_length and krb5_realm_data provided by the heimdal headers, and matching macros are easily provided for MIT.

&gt; I would suggest you file a bug upstream.  It seems
&gt; like the autofs mailing list is the place to go.  

Just posted there, including my patch. I hope my message gets through without me being subscribed to the list. If it does, I&apos;ll post a reference to the archived thread here as the URL of this issue report.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>stefaan@gentoo.org</who>
            <bug_when>2008-05-03 09:20:00 0000</bug_when>
            <thetext>Thanks for the patch!  Now it builds with both heimdal and mit krb5.  It&apos;s been included in autofs-5.0.3-r5.
Closing as fixed. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>Martin.vGagern@gmx.net</who>
            <bug_when>2008-05-15 16:01:23 0000</bug_when>
            <thetext>(In reply to comment #2)
&gt; Just posted there, including my patch. I hope my message gets through without
&gt; me being subscribed to the list. If it does, I&apos;ll post a reference to the
&gt; archived thread here as the URL of this issue report.

My original post didn&apos;t make it. Now I subscribed and reposted the issue:
http://thread.gmane.org/gmane.linux.kernel.autofs/4203
</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>151247</attachid>
            <date>2008-04-28 15:14 0000</date>
            <desc>Use krb5_realm_{length,data}</desc>
            <filename>210762a.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGF1dG9mcy01LjAuMy5vcmlnL21vZHVsZXMvY3lydXMtc2FzbC5jCTIwMDgtMDQtMjggMTY6
MTc6MDMuMDAwMDAwMDAwICswMjAwCisrKyBhdXRvZnMtNS4wLjMvbW9kdWxlcy9jeXJ1cy1zYXNs
LmMJMjAwOC0wNC0yOCAxNjo0MTo1OC4wMDAwMDAwMDAgKzAyMDAKQEAgLTY2LDYgKzY2LDE1IEBA
CiAjZW5kaWYKICNlbmRpZgogCisvKioKKyAqIFRoZSB0eXBlIG9mIGEgcHJpbmNpcGFsIGlzIGRp
ZmZlcmVudCBmb3IgTUlUIEtyYjUgYW5kIEhlaW1kYWwuCisgKiBUaGVzZSBtYWNyb3MgYXJlIHBy
b3ZpZGVkIGJ5IEhlaW1kYWwsIGFuZCBpbnRyb2R1Y2VkIGhlcmUgZm9yIE1JVC4KKyAqLworI2lm
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