All of lore.kernel.org
 help / color / mirror / Atom feed
* krb5 required when building with sasl support
@ 2009-02-04 16:42 Matthias Koenig
  2009-02-04 16:58 ` Ondrej Valousek
  0 siblings, 1 reply; 7+ messages in thread
From: Matthias Koenig @ 2009-02-04 16:42 UTC (permalink / raw)
  To: autofs mailing list

Hi,

it seems that it is necessary to link also against krb5 when
building the LDAP lookup module with SASL support.
This is missing currently in the configure.in it only
links with -lsasl.
The following patch should fix this.

Regards,
Matthias

Index: autofs-5.0.4/configure.in
===================================================================
--- autofs-5.0.4.orig/configure.in	2008-11-04 02:36:48.000000000 +0100
+++ autofs-5.0.4/configure.in	2009-02-04 17:30:01.000000000 +0100
@@ -256,8 +256,13 @@ AC_ARG_WITH(sasl,
 if test -z "$HAVE_SASL" -o "$HAVE_SASL" != "0" -a "$HAVE_LIBXML" == "1"
 then
 	HAVE_SASL=0
-	AC_CHECK_LIB(sasl2, sasl_client_start, HAVE_SASL=1 LIBSASL="$LIBSASL -lsasl2", , -lsasl2 $LIBS)
+        HAVE_KRB5=0
+	AC_CHECK_LIB(sasl2, sasl_client_start, HAVE_SASL=1,, -lsasl2 $LIBS)
+        AC_CHECK_LIB(krb5, krb5_mk_req_extended, HAVE_KRB5=1,, $LIBS)
 	if test "$HAVE_SASL" == "1"; then
+		test "$HAVE_KRB5" != "1" && \
+                    AC_MSG_FAILURE([You need krb5 libs to build with SASL support])
+                LIBSASL="$LIBSASL -lsasl2 -lkrb5"
 		AC_DEFINE(WITH_SASL,1,
 			[Define if using SASL authentication with the LDAP module])
 	fi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: krb5 required when building with sasl support
  2009-02-04 16:42 krb5 required when building with sasl support Matthias Koenig
@ 2009-02-04 16:58 ` Ondrej Valousek
  2009-02-05 18:27   ` Guillaume Rousse
  0 siblings, 1 reply; 7+ messages in thread
From: Ondrej Valousek @ 2009-02-04 16:58 UTC (permalink / raw)
  Cc: autofs mailing list

+1 - I have spotted this, too....
O.
Matthias Koenig wrote:
> Hi,
>
> it seems that it is necessary to link also against krb5 when
> building the LDAP lookup module with SASL support.
> This is missing currently in the configure.in it only
> links with -lsasl.
> The following patch should fix this.
>
> Regards,
> Matthias
>
> Index: autofs-5.0.4/configure.in
> ===================================================================
> --- autofs-5.0.4.orig/configure.in	2008-11-04 02:36:48.000000000 +0100
> +++ autofs-5.0.4/configure.in	2009-02-04 17:30:01.000000000 +0100
> @@ -256,8 +256,13 @@ AC_ARG_WITH(sasl,
>  if test -z "$HAVE_SASL" -o "$HAVE_SASL" != "0" -a "$HAVE_LIBXML" == "1"
>  then
>  	HAVE_SASL=0
> -	AC_CHECK_LIB(sasl2, sasl_client_start, HAVE_SASL=1 LIBSASL="$LIBSASL -lsasl2", , -lsasl2 $LIBS)
> +        HAVE_KRB5=0
> +	AC_CHECK_LIB(sasl2, sasl_client_start, HAVE_SASL=1,, -lsasl2 $LIBS)
> +        AC_CHECK_LIB(krb5, krb5_mk_req_extended, HAVE_KRB5=1,, $LIBS)
>  	if test "$HAVE_SASL" == "1"; then
> +		test "$HAVE_KRB5" != "1" && \
> +                    AC_MSG_FAILURE([You need krb5 libs to build with SASL support])
> +                LIBSASL="$LIBSASL -lsasl2 -lkrb5"
>  		AC_DEFINE(WITH_SASL,1,
>  			[Define if using SASL authentication with the LDAP module])
>  	fi
>
> _______________________________________________
> autofs mailing list
> autofs@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/autofs
>   

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: krb5 required when building with sasl support
  2009-02-04 16:58 ` Ondrej Valousek
@ 2009-02-05 18:27   ` Guillaume Rousse
  2009-02-06 11:35     ` Matthias Koenig
  0 siblings, 1 reply; 7+ messages in thread
From: Guillaume Rousse @ 2009-02-05 18:27 UTC (permalink / raw)
  To: autofs mailing list

Ondrej Valousek a écrit :
> +1 - I have spotted this, too....
<aol>
/me too
</aol>

More seriously, I think the proper solution would rather be fixing 
underliking in SASL (http://wiki.mandriva.com/en/Underlinking).

Anyway, it doesn't hurt to workaround the problem in autofs.


-- 
BOFH excuse #151:

Some one needed the powerstrip, so they pulled the switch plug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: krb5 required when building with sasl support
  2009-02-05 18:27   ` Guillaume Rousse
@ 2009-02-06 11:35     ` Matthias Koenig
  2009-02-06 12:23       ` Ondrej Valousek
  2009-02-06 13:18       ` Guillaume Rousse
  0 siblings, 2 replies; 7+ messages in thread
From: Matthias Koenig @ 2009-02-06 11:35 UTC (permalink / raw)
  To: Guillaume Rousse; +Cc: autofs mailing list

Guillaume Rousse <Guillaume.Rousse@inria.fr> writes:

> More seriously, I think the proper solution would rather be fixing 
> underliking in SASL (http://wiki.mandriva.com/en/Underlinking).

Hmm, are you really sure, that libsasl depends on kerberos symbols?
In this case you would be right.
I assumed that they're independent from each other and after
a quick grep I couldn't find any krb5_* symbols in libsasl.
At least the lookup_ldap.h header from autofs explicitly includes
the krb5.h header.

Matthias

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: krb5 required when building with sasl support
  2009-02-06 11:35     ` Matthias Koenig
@ 2009-02-06 12:23       ` Ondrej Valousek
  2009-02-06 13:09         ` Guillaume Rousse
  2009-02-06 13:18       ` Guillaume Rousse
  1 sibling, 1 reply; 7+ messages in thread
From: Ondrej Valousek @ 2009-02-06 12:23 UTC (permalink / raw)
  Cc: autofs mailing list

sasl could be (theoretically) built without GSSAPI support and in this
case it would not require Kerberos. But the facts are:
- sasl support in autofs can not be obviously compiled without gssapi
- in these days sasl is many times meant as synonym for sasl/gssapi so
it probably does not make any sense not to include gssapi once we
include sasl.

Ondrej

Matthias Koenig wrote:
> Guillaume Rousse <Guillaume.Rousse@inria.fr> writes:
>
>   
>> More seriously, I think the proper solution would rather be fixing 
>> underliking in SASL (http://wiki.mandriva.com/en/Underlinking).
>>     
>
> Hmm, are you really sure, that libsasl depends on kerberos symbols?
> In this case you would be right.
> I assumed that they're independent from each other and after
> a quick grep I couldn't find any krb5_* symbols in libsasl.
> At least the lookup_ldap.h header from autofs explicitly includes
> the krb5.h header.
>
> Matthias
>
> _______________________________________________
> autofs mailing list
> autofs@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/autofs
>   

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: krb5 required when building with sasl support
  2009-02-06 12:23       ` Ondrej Valousek
@ 2009-02-06 13:09         ` Guillaume Rousse
  0 siblings, 0 replies; 7+ messages in thread
From: Guillaume Rousse @ 2009-02-06 13:09 UTC (permalink / raw)
  Cc: autofs mailing list

Ondrej Valousek a écrit :
> sasl could be (theoretically) built without GSSAPI support and in this
> case it would not require Kerberos. But the facts are:
> - sasl support in autofs can not be obviously compiled without gssapi
> - in these days sasl is many times meant as synonym for sasl/gssapi so
> it probably does not make any sense not to include gssapi once we
> include sasl.

But you should be able to link against SASL without prior knowledge of 
its own dependencies. That's the point of avoiding distributing 
underlinked libraries.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: krb5 required when building with sasl support
  2009-02-06 11:35     ` Matthias Koenig
  2009-02-06 12:23       ` Ondrej Valousek
@ 2009-02-06 13:18       ` Guillaume Rousse
  1 sibling, 0 replies; 7+ messages in thread
From: Guillaume Rousse @ 2009-02-06 13:18 UTC (permalink / raw)
  Cc: autofs mailing list

Matthias Koenig a écrit :
> Guillaume Rousse <Guillaume.Rousse@inria.fr> writes:
> 
>> More seriously, I think the proper solution would rather be fixing 
>> underliking in SASL (http://wiki.mandriva.com/en/Underlinking).
> 
> Hmm, are you really sure, that libsasl depends on kerberos symbols?
> In this case you would be right.
> I assumed that they're independent from each other and after
> a quick grep I couldn't find any krb5_* symbols in libsasl.
> At least the lookup_ldap.h header from autofs explicitly includes
> the krb5.h header.
Indeed. I just checked libsasl is built with -Wl,--no-undefined flag, 
and doesn't have undefined symbols either.

I guess the issue (in my case) is not to detect SASL presence, but to 
add -lkrb5 when building autofs ldap plugin (which can't use 
-Wl,--no-undefined safety option, as it is a plugin).

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-02-06 13:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-04 16:42 krb5 required when building with sasl support Matthias Koenig
2009-02-04 16:58 ` Ondrej Valousek
2009-02-05 18:27   ` Guillaume Rousse
2009-02-06 11:35     ` Matthias Koenig
2009-02-06 12:23       ` Ondrej Valousek
2009-02-06 13:09         ` Guillaume Rousse
2009-02-06 13:18       ` Guillaume Rousse

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.