The configure script is generating warnings with header files from openafs-1.4.7 The build process exits with an error at the talloc build The linking of the smbd with the fake-kaserver option fails beacause of inability to resolve DES_pcbc and DES_setkey calls.
Created attachment 3638 [details] A patch proposal to fix the mentioned problems
Comment on attachment 3638 [details] A patch proposal to fix the mentioned problems diff -urN samba-3.2.3.orig/source/configure samba-3.2.3/source/configure --- samba-3.2.3.orig/source/configure 2008-09-26 21:01:25.120601000 +0200 +++ samba-3.2.3/source/configure 2008-09-26 21:10:56.595590574 +0200 @@ -53356,12 +53356,82 @@ if test x"$samba_cv_WITH_AFS" != x"no" || test x"$samba_cv_WITH_FAKE_KASERVER" != x"no"; then + { echo "$as_me:$LINENO: checking for DES_pcbc_encrypt in -lcrypto" >&5 +echo $ECHO_N "checking for DES_pcbc_encrypt in -lcrypto... $ECHO_C" >&6; } +if test "${ac_cv_lib_crypto_DES_pcbc_encrypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char DES_pcbc_encrypt (); +int +main () +{ +return DES_pcbc_encrypt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_crypto_DES_pcbc_encrypt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_crypto_DES_pcbc_encrypt=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_DES_pcbc_encrypt" >&5 +echo "${ECHO_T}$ac_cv_lib_crypto_DES_pcbc_encrypt" >&6; } +if test $ac_cv_lib_crypto_DES_pcbc_encrypt = yes; then + LIBS="$LIBS -lcrypto" +fi + + # see if this box has the afs-headers in /usr/include/afs { echo "$as_me:$LINENO: checking for /usr/include/afs" >&5 echo $ECHO_N "checking for /usr/include/afs... $ECHO_C" >&6; } if test -d /usr/include/afs; then - CFLAGS="$CFLAGS -I/usr/include/afs" - CPPFLAGS="$CPPFLAGS -I/usr/include/afs" + mkdir -p ./include/afs + for f in afs.h auth.h param.h prs_fs.h stds.h venus.h ; do + cp -a /usr/include/afs/$f ./iclude/afs/ + done + CFLAGS="$CFLAGS -Iinclude/afs" + CPPFLAGS="$CPPFLAGS -Iinclude/afs" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else diff -urN samba-3.2.3.orig/source/configure.in samba-3.2.3/source/configure.in --- samba-3.2.3.orig/source/configure.in 2008-09-26 21:01:27.208591000 +0200 +++ samba-3.2.3/source/configure.in 2008-09-26 21:10:07.023786290 +0200 @@ -2834,11 +2834,17 @@ if test x"$samba_cv_WITH_AFS" != x"no" || test x"$samba_cv_WITH_FAKE_KASERVER" != x"no"; then + AC_CHECK_LIB( crypto, DES_pcbc_encrypt, LIBS="$LIBS -lcrypto" ) + # see if this box has the afs-headers in /usr/include/afs AC_MSG_CHECKING(for /usr/include/afs) if test -d /usr/include/afs; then - CFLAGS="$CFLAGS -I/usr/include/afs" - CPPFLAGS="$CPPFLAGS -I/usr/include/afs" + mkdir -p ./include/afs + for f in afs.h auth.h param.h prs_fs.h stds.h venus.h ; do + cp -a /usr/include/afs/$f ./iclude/afs/ + done + CFLAGS="$CFLAGS -Iinclude/afs" + CPPFLAGS="$CPPFLAGS -Iinclude/afs" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) diff -urN samba-3.2.3.orig/source/lib/afs.c samba-3.2.3/source/lib/afs.c --- samba-3.2.3.orig/source/lib/afs.c 2008-09-26 21:01:22.943600000 +0200 +++ samba-3.2.3/source/lib/afs.c 2008-09-28 18:07:11.986286809 +0200 @@ -23,6 +23,7 @@ #define NO_ASN1_TYPEDEFS 1 +#include <afs/param.h> #include <afs/stds.h> #include <afs/afs.h> #include <afs/auth.h> diff -urN samba-3.2.3.orig/source/lib/afs_settoken.c samba-3.2.3/source/lib/afs_settoken.c --- samba-3.2.3.orig/source/lib/afs_settoken.c 2008-09-22 18:51:18.683589000 +0200 +++ samba-3.2.3/source/lib/afs_settoken.c 2008-09-26 21:14:26.275582872 +0200 @@ -23,6 +23,7 @@ #define NO_ASN1_TYPEDEFS 1 +#include <afs/param.h> #include <afs/stds.h> #include <afs/afs.h> #include <afs/auth.h> diff -urN samba-3.2.3.orig/source/modules/vfs_afsacl.c samba-3.2.3/source/modules/vfs_afsacl.c --- samba-3.2.3.orig/source/modules/vfs_afsacl.c 2008-08-27 13:23:20.000000000 +0200 +++ samba-3.2.3/source/modules/vfs_afsacl.c 2008-09-26 21:15:08.956586527 +0200 @@ -22,6 +22,7 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_VFS +#include <afs/param.h> #include <afs/stds.h> #include <afs/afs.h> #include <afs/auth.h>
Created attachment 3644 [details] Proposed patch reviewed (some changes) Fixed some des related bugs of the patch proposal
Created attachment 3658 [details] Proposed patch With this patch the fake-kaserver and vfs-afsacl options build and work as expected
Created attachment 4102 [details] A patch to fix afs related problems This patch is finally GPLv3 compatible. Its only questionable behavior is the introduction of dynamic linking with openssl libraries (for DES support).
Closing as fixed. Pushed patch from 6316 to 3.4 and master.