diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/m4/check_cc.m4 | 6 | ||||
-rw-r--r-- | source4/build/smb_build/summary.pm | 3 | ||||
-rw-r--r-- | source4/configure.ac | 5 | ||||
-rw-r--r-- | source4/heimdal_build/internal.m4 (renamed from source4/heimdal_build/config.m4) | 0 | ||||
-rw-r--r-- | source4/heimdal_build/internal.mk (renamed from source4/heimdal_build/config.mk) | 0 | ||||
-rw-r--r-- | source4/lib/replace/libreplace.m4 | 3 | ||||
-rw-r--r-- | source4/lib/replace/win32.m4 | 8 | ||||
-rw-r--r-- | source4/lib/socket_wrapper/config.m4 | 7 | ||||
-rw-r--r-- | source4/lib/socket_wrapper/socket_wrapper.c | 12 | ||||
-rw-r--r-- | source4/lib/tls/config.m4 | 61 | ||||
-rw-r--r-- | source4/main.mk | 2 |
11 files changed, 58 insertions, 49 deletions
diff --git a/source4/build/m4/check_cc.m4 b/source4/build/m4/check_cc.m4 index 569be38721..51531ca776 100644 --- a/source4/build/m4/check_cc.m4 +++ b/source4/build/m4/check_cc.m4 @@ -30,7 +30,7 @@ fi # check if the compiler can handle negative enum values # and don't truncate the values to INT_MAX # a runtime test is needed here -AC_CACHE_CHECK([that the C compiler understands negative enum values],SMB_BUILD_CC_NEGATIVE_ENUM_VALUES, [ +AC_CACHE_CHECK([that the C compiler understands negative enum values],samba_cv_CC_NEGATIVE_ENUM_VALUES, [ AC_TRY_RUN( [ #include <stdio.h> @@ -45,8 +45,8 @@ AC_CACHE_CHECK([that the C compiler understands negative enum values],SMB_BUILD_ return 0; } ], - SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes,SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=no)]) -if test x"$SMB_BUILD_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then + samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv_CC_NEGATIVE_ENUM_VALUES=no)]) +if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then AC_DEFINE(USE_UINT_ENUMS, 1, [Whether the compiler has uint enum support]) fi diff --git a/source4/build/smb_build/summary.pm b/source4/build/smb_build/summary.pm index a6557fb1fe..4ea1ad525e 100644 --- a/source4/build/smb_build/summary.pm +++ b/source4/build/smb_build/summary.pm @@ -53,9 +53,6 @@ sub show($$) showitem($output, "using libblkid", ["BLKID"]); showitem($output, "using iconv", ["ICONV"]); showitem($output, "using pam", ["PAM"]); - if (enabled($config->{developer})) { - showitem($output, "using VDE", ["VDEPLUG"]); - } showitem($output, "python bindings", ["LIBPYTHON"]); showisexternal($output, "popt", "LIBPOPT"); showisexternal($output, "talloc", "LIBTALLOC"); diff --git a/source4/configure.ac b/source4/configure.ac index 693d4d7fbd..ca38f6add4 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -1,8 +1,7 @@ dnl -*- mode: m4-mode -*- dnl Process this file with autoconf to produce a configure script. -dnl disabled 2.53 requirement - we do work with 2.52 on suse 7.3 for example -dnl AC_PREREQ(2.53) +AC_PREREQ(2.54) AC_INIT([samba],[4],[samba-technical@samba.org]) @@ -14,7 +13,7 @@ AC_DEFINE(CONFIG_H_IS_FROM_SAMBA,1,[Marker for samba's config.h]) m4_include(build/m4/env.m4) m4_include(lib/replace/samba.m4) m4_include(lib/smbreadline/readline.m4) -m4_include(heimdal_build/config.m4) +m4_include(heimdal_build/internal.m4) m4_include(lib/util/fault.m4) m4_include(lib/util/signal.m4) m4_include(lib/util/util.m4) diff --git a/source4/heimdal_build/config.m4 b/source4/heimdal_build/internal.m4 index 18ecbb75cd..18ecbb75cd 100644 --- a/source4/heimdal_build/config.m4 +++ b/source4/heimdal_build/internal.m4 diff --git a/source4/heimdal_build/config.mk b/source4/heimdal_build/internal.mk index 17fc8c93ec..17fc8c93ec 100644 --- a/source4/heimdal_build/config.mk +++ b/source4/heimdal_build/internal.mk diff --git a/source4/lib/replace/libreplace.m4 b/source4/lib/replace/libreplace.m4 index 6a85ff5a82..71fa041672 100644 --- a/source4/lib/replace/libreplace.m4 +++ b/source4/lib/replace/libreplace.m4 @@ -299,4 +299,5 @@ m4_include(libreplace_cc.m4) m4_include(libreplace_ld.m4) m4_include(libreplace_network.m4) m4_include(libreplace_macros.m4) -m4_include(autoconf-2.60.m4) + +m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],[m4_include(autoconf-2.60.m4)]) diff --git a/source4/lib/replace/win32.m4 b/source4/lib/replace/win32.m4 index 9ac84cdf2a..eb364e2cb9 100644 --- a/source4/lib/replace/win32.m4 +++ b/source4/lib/replace/win32.m4 @@ -2,7 +2,7 @@ AC_CHECK_HEADERS(direct.h windows.h winsock2.h ws2tcpip.h) ####################################### # Check for mkdir mode -AC_CACHE_CHECK( [whether mkdir supports mode], ac_mkdir_has_mode, +AC_CACHE_CHECK( [whether mkdir supports mode], libreplace_cv_mkdir_has_mode, AC_TRY_COMPILE([ #include <stdio.h> #ifdef HAVE_DIRECT_H @@ -11,10 +11,10 @@ AC_CACHE_CHECK( [whether mkdir supports mode], ac_mkdir_has_mode, mkdir("foo",0777); return 0; ], - ac_mkdir_has_mode="yes", - ac_mkdir_has_mode="no") ) + libreplace_cv_mkdir_has_mode="yes", + libreplace_cv_mkdir_has_mode="no") ) -if test "$ac_mkdir_has_mode" = "yes" +if test "$libreplace_cv_mkdir_has_mode" = "yes" then AC_DEFINE(HAVE_MKDIR_MODE, 1, [Define if target mkdir supports mode option]) fi diff --git a/source4/lib/socket_wrapper/config.m4 b/source4/lib/socket_wrapper/config.m4 index 8ff91075bb..f3ffb895a9 100644 --- a/source4/lib/socket_wrapper/config.m4 +++ b/source4/lib/socket_wrapper/config.m4 @@ -20,10 +20,3 @@ fi AC_SUBST(DEFAULT_TEST_OPTIONS) AC_SUBST(HAVE_SOCKET_WRAPPER) AC_SUBST(SOCKET_WRAPPER_OBJS) - -# Look for the vdeplug library -AC_CHECK_HEADERS(libvdeplug.h) -if test x"$ac_cv_header_libvdeplug_h" = xyes; then - AC_DEFINE(HAVE_VDEPLUG, 1, [Whether the VDE plug library is available]) - SMB_EXT_LIB(VDEPLUG,[-lvdeplug],[],[],[]) -fi diff --git a/source4/lib/socket_wrapper/socket_wrapper.c b/source4/lib/socket_wrapper/socket_wrapper.c index 86d9f7a312..336179d837 100644 --- a/source4/lib/socket_wrapper/socket_wrapper.c +++ b/source4/lib/socket_wrapper/socket_wrapper.c @@ -697,8 +697,8 @@ static const char *socket_wrapper_pcap_file(void) { static int initialized = 0; static const char *s = NULL; - static const struct swrap_file_hdr h; - static const struct swrap_packet p; + static const struct swrap_file_hdr h = { 0, }; + static const struct swrap_packet p = { { 0, }, { { 0, }, { { 0, } } } }; if (initialized == 1) { return s; @@ -1643,6 +1643,8 @@ _PUBLIC_ ssize_t swrap_recvfrom(int s, void *buf, size_t len, int flags, struct return real_recvfrom(s, buf, len, flags, from, fromlen); } + len = MIN(len, 1500); + /* irix 6.4 forgets to null terminate the sun_path string :-( */ memset(&un_addr, 0, sizeof(un_addr)); ret = real_recvfrom(s, buf, len, flags, (struct sockaddr *)&un_addr, &un_addrlen); @@ -1671,6 +1673,8 @@ _PUBLIC_ ssize_t swrap_sendto(int s, const void *buf, size_t len, int flags, con return real_sendto(s, buf, len, flags, to, tolen); } + len = MIN(len, 1500); + switch (si->type) { case SOCK_STREAM: ret = real_send(s, buf, len, flags); @@ -1764,6 +1768,8 @@ _PUBLIC_ ssize_t swrap_recv(int s, void *buf, size_t len, int flags) return real_recv(s, buf, len, flags); } + len = MIN(len, 1500); + ret = real_recv(s, buf, len, flags); if (ret == -1 && errno != EAGAIN && errno != ENOBUFS) { swrap_dump_packet(si, NULL, SWRAP_RECV_RST, NULL, 0); @@ -1786,6 +1792,8 @@ _PUBLIC_ ssize_t swrap_send(int s, const void *buf, size_t len, int flags) return real_send(s, buf, len, flags); } + len = MIN(len, 1500); + ret = real_send(s, buf, len, flags); if (ret == -1) { diff --git a/source4/lib/tls/config.m4 b/source4/lib/tls/config.m4 index 8b6ad7dcbc..2af9192cca 100644 --- a/source4/lib/tls/config.m4 +++ b/source4/lib/tls/config.m4 @@ -1,33 +1,44 @@ ############################### # start SMB_EXT_LIB_GNUTLS # check for gnutls/gnutls.h and -lgnutls -SMB_EXT_LIB_FROM_PKGCONFIG(GNUTLS, gnutls, - [SMB_ENABLE_GNUTLS=YES], - [SMB_ENABLE_GNUTLS=NO]) -if test x$SMB_ENABLE_GNUTLS = xNO; then - AC_CHECK_HEADERS(gnutls/gnutls.h) - AC_CHECK_LIB_EXT(gnutls, GNUTLS_LIBS, gnutls_global_init) - AC_CHECK_DECL(gnutls_x509_crt_set_version, - [AC_DEFINE(HAVE_GNUTLS_X509_CRT_SET_VERSION,1,gnutls set_version)], [], [ - #include <gnutls/gnutls.h> - #include <gnutls/x509.h> - ]) - if test x"$ac_cv_header_gnutls_gnutls_h" = x"yes" -a x"$ac_cv_lib_ext_gnutls_gnutls_global_init" = x"yes" -a x"$ac_cv_have_decl_gnutls_x509_crt_set_version" = x"yes";then - SMB_ENABLE(GNUTLS,YES) - AC_CHECK_DECL(gnutls_x509_crt_set_subject_key_id, - [AC_DEFINE(HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID,1,gnutls subject_key)], [], [ - #include <gnutls/gnutls.h> - #include <gnutls/x509.h> - ]) +use_gnutls=yes +AC_ARG_ENABLE(gnutls, +[ --enable-gnutls Turn on gnutls support (default=yes)], + [if test x$enable_gnutls = xno; then + use_gnutls=no + fi]) + + +if test x$use_gnutls = xyes; then + SMB_EXT_LIB_FROM_PKGCONFIG(GNUTLS, gnutls, + [SMB_ENABLE_GNUTLS=YES], + [SMB_ENABLE_GNUTLS=NO]) + + if test x$SMB_ENABLE_GNUTLS = xNO; then + AC_CHECK_HEADERS(gnutls/gnutls.h) + AC_CHECK_LIB_EXT(gnutls, GNUTLS_LIBS, gnutls_global_init) + AC_CHECK_DECL(gnutls_x509_crt_set_version, + [AC_DEFINE(HAVE_GNUTLS_X509_CRT_SET_VERSION,1,gnutls set_version)], [], [ + #include <gnutls/gnutls.h> + #include <gnutls/x509.h> + ]) + if test x"$ac_cv_header_gnutls_gnutls_h" = x"yes" -a x"$ac_cv_lib_ext_gnutls_gnutls_global_init" = x"yes" -a x"$ac_cv_have_decl_gnutls_x509_crt_set_version" = x"yes";then + SMB_ENABLE(GNUTLS,YES) + AC_CHECK_DECL(gnutls_x509_crt_set_subject_key_id, + [AC_DEFINE(HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID,1,gnutls subject_key)], [], [ + #include <gnutls/gnutls.h> + #include <gnutls/x509.h> + ]) + fi + SMB_EXT_LIB(GNUTLS, $GNUTLS_LIBS) + fi + if test x$SMB_ENABLE_GNUTLS = xYES; then + #Some older versions have a different type name + AC_CHECK_TYPES([gnutls_datum],,,[#include "gnutls/gnutls.h"]) + AC_CHECK_TYPES([gnutls_datum_t],,,[#include "gnutls/gnutls.h"]) + AC_DEFINE(ENABLE_GNUTLS,1,[Whether we have gnutls support (SSL)]) fi - SMB_EXT_LIB(GNUTLS, $GNUTLS_LIBS) -fi -if test x$SMB_ENABLE_GNUTLS = xYES; then - #Some older versions have a different type name - AC_CHECK_TYPES([gnutls_datum],,,[#include "gnutls/gnutls.h"]) - AC_CHECK_TYPES([gnutls_datum_t],,,[#include "gnutls/gnutls.h"]) - AC_DEFINE(ENABLE_GNUTLS,1,[Whether we have gnutls support (SSL)]) fi # end SMB_EXT_LIB_GNUTLS ############################### diff --git a/source4/main.mk b/source4/main.mk index 3f3aea87e6..f0ce9685f9 100644 --- a/source4/main.mk +++ b/source4/main.mk @@ -1,5 +1,5 @@ mkinclude dynconfig/config.mk -mkinclude heimdal_build/config.mk +mkinclude heimdal_build/internal.mk mkinclude config.mk mkinclude dsdb/config.mk mkinclude smbd/config.mk |