missing krb5 dependencies after recent changes in nightly bits

Vita Batrla vitezslav.batrla at oracle.com
Wed Jun 5 15:40:11 UTC 2024


I found the changeset that introduced the regression.
The git bisect command says the culprit is:

$ git bisect bad                                                                c95a2785e209cbd0fcec5f6a553a95e12ff19fa1 is the first bad commit                commit c95a2785e209cbd0fcec5f6a553a95e12ff19fa1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 7 12:03:05 2024 +0100

    lib/addns: rewrite signed dns update code to use gensec instead of plain gssapi
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>

 lib/addns/dns.h                  |  18 ++-
 lib/addns/dnsgss.c               | 240 +++++++++++----------------------------
 lib/addns/wscript_build          |   2 +-
 source3/utils/net_ads.c          |   2 +
 source3/utils/net_ads_join_dns.c |  86 ++++++--------
 source3/utils/net_dns.c          |  94 +++++++++++++--
 source3/utils/net_dns.h          |   3 +
 source3/utils/net_proto.h        |   4 +-
 8 files changed, 200 insertions(+), 249 deletions(-)

I suspect this change in lib/addns/wscript_build:

@@ -11,6 +11,6 @@ bld.SAMBA_LIBRARY('addns',                                    
                       error.c                                                  
                       dnsquery_srv.c                                           
                   ''',                                                         
                   public_deps='samba-util gssapi ndr resolv dns_lookup',       
                   public_deps='samba-util gensec ndr resolv dns_lookup',       

This snippet caused lib/addns to drop dependency on gssapi. My guess is
that since this changeset got integrated, the build using MIT Krb5 fails if
the headers are outside of /usr/include in a non-standard location. That
might be because .c files that include "dns.h" will indirectly also include
"krb5.h", but they may miss the right CFLAGS. The right CFLAGS might have
been pulled in past from gssapi dependency, and gssapi pulled them from
krb5-config.

Does it make any sense or not?
Thanks,

Vita

On Mon, Jun 03, 2024 at 07:55:19PM +0200, Vita Batrla wrote:
> Hello,
> 
> From time to time I compile Samba source code from:
> https://github.com/samba-team/samba.git
> 
> - it used to work few weeks ago
> - it doesn't work as of today
> 
> Please find the error messages in attached file.  The build system is
> Solaris and it uses MIT Kerberos libraries from the system. The krb5.h
> isn't in a standard location (it needs to be learned from krb5-config
> binary). This might be a difference.
> 
> Is this a known issue? I attach a patch that seems to fix the problem.  I
> would be glad if someone here can check the problem and fix the code if it
> is not yet already fixed (not synced to github clone).
> 
> Thanks,
> 
> Vita

> [1119/3103] Compiling libcli/netlogon/netlogon.c
> [1120/3103] Compiling libcli/cldap/cldap.c
> In file included from ../../lib/addns/dns.h:30,
>                  from ../../source4/libcli/resolve/dns_ex.c:42:
> ../../lib/replace/system/kerberos.h:33:10: fatal error: krb5.h: No such file or 
> directory
>    33 | #include <krb5.h>
>       |          ^~~~~~~~
> compilation terminated.
> 
> Waf: Leaving directory `/builds/$LOGNAME/samba-nightly.ul/components/samba/build/amd64/bin/default'
> Build failed 
>  -> task in 'LP_RESOLVE' failed with exit status 1 (run with -v to display more information)
> 
> 
> ....
> 
> [1203/3103] Compiling source3/libsmb/cliconnect.c
> [1204/3103] Compiling source3/libsmb/cli_smb2_fnum.c
> In file included from ../../source3/libads/kerberos_proto.h:33,
>                  from ../../source3/libsmb/namequery.c:33:
> ../../lib/replace/system/kerberos.h:33:10: fatal error: krb5.h: No such file or directory
>    33 | #include <krb5.h>
>       |          ^~~~~~~~
> compilation terminated.
> 
> Waf: Leaving directory `/builds/$LOGNAME/samba-nightly.ul/components/samba/build/amd64/bin/default'
> Build failed
>  -> task in 'LIBNMB' failed with exit status 1 (run with -v to display more information)
> 
> ...
> 
> [1948/3103] Compiling lib/tdb/tools/tdbtorture.c
> [1949/3103] Linking bin/default/lib/talloc/pytalloc.cpython-311.so
> In file included from ../../source3/libads/kerberos_proto.h:33,
>                  from ../../source3/include/ads.h:79,
>                  from ../../source3/utils/net_proto.h:26,
>                  from ../../source3/utils/net.h:183,
>                  from ../../source3/utils/net_ads_join_dns.c:24:
> ../../lib/replace/system/kerberos.h:33:10: fatal error: krb5.h: No such file or directory
>    33 | #include <krb5.h>
>       |          ^~~~~~~~
> compilation terminated.
> 
> In file included from ../../source3/libads/kerberos_proto.h:33,
>                  from ../../source3/include/ads.h:79,
>                  from ../../source3/utils/net_proto.h:26,
>                  from ../../source3/utils/net.h:183,
>                  from ../../source3/utils/net_dns.c:23:
> ../../lib/replace/system/kerberos.h:33:10: fatal error: krb5.h: No such file or directory
>    33 | #include <krb5.h>
>       |          ^~~~~~~~
> compilation terminated.
> 
> Waf: Leaving directory `/builds/$LOGNAME/samba-nightly.ul/components/samba/build/amd64/bin/default'
> Build failed
>  -> task in 'DNS_UTIL' failed with exit status 1 (run with -v to display more information)
>  -> task in 'DNS_UTIL' failed with exit status 1 (run with -v to display more information)
> 

> diff -rup samba-4.19.6-master/source3/utils/wscript_build samba-4.19.6-master.new/source3/utils/wscript_build
> --- samba-4.19.6-master/source3/utils/wscript_build	2024-06-03 13:10:11.000000000 +0200
> +++ samba-4.19.6-master.new/source3/utils/wscript_build	2024-06-03 19:39:18.683596593 +0200
> @@ -9,7 +9,7 @@ bld.SAMBA3_SUBSYSTEM('CONN_TDB',
>  
>  bld.SAMBA3_SUBSYSTEM('DNS_UTIL',
>                       source='net_dns.c net_ads_join_dns.c',
> -                     deps='addns')
> +                     deps='addns krb5')
>  
>  bld.SAMBA3_BINARY('profiles',
>                   source='profiles.c',
> diff -rup samba-4.19.6-master/source3/wscript_build samba-4.19.6-master.new/source3/wscript_build
> --- samba-4.19.6-master/source3/wscript_build	2024-06-03 13:10:11.000000000 +0200
> +++ samba-4.19.6-master.new/source3/wscript_build	2024-06-03 19:24:17.763401587 +0200
> @@ -908,6 +908,7 @@ bld.SAMBA3_SUBSYSTEM('LIBNMB',
>                            addns
>                            lmhosts
>                            resolv
> +			  krb5
>                            ''')
>  
>  bld.SAMBA3_SUBSYSTEM('SERVICES',
> diff -rup samba-4.19.6-master/source4/libcli/wscript_build samba-4.19.6-master.new/source4/libcli/wscript_build
> --- samba-4.19.6-master/source4/libcli/wscript_build	2024-06-03 13:10:11.000000000 +0200
> +++ samba-4.19.6-master.new/source4/libcli/wscript_build	2024-06-03 19:22:02.200073053 +0200
> @@ -65,7 +65,7 @@ bld.SAMBA_SUBSYSTEM('LIBCLI_RESOLVE',
>  bld.SAMBA_SUBSYSTEM('LP_RESOLVE',
>  	source='resolve/bcast.c resolve/nbtlist.c resolve/wins.c resolve/dns_ex.c resolve/host.c resolve/lmhosts.c resolve/resolve_lp.c',
>  	autoproto='resolve/lp_proto.h',
> -	deps='cli-nbt samba-hostconfig netif addns'
> +	deps='cli-nbt samba-hostconfig netif addns krb5'
>  	)
>  
>  




More information about the samba-technical mailing list