mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
Merge branch 'tdr' of /home/jelmer/samba4
This commit is contained in:
commit
c223beee2a
@ -23,7 +23,7 @@
|
||||
#include "includes.h"
|
||||
#include "system/filesys.h"
|
||||
#include "system/network.h"
|
||||
#include "tdr/tdr.h"
|
||||
#include "lib/tdr/tdr.h"
|
||||
|
||||
#define TDR_BASE_MARSHALL_SIZE 1024
|
||||
|
@ -21,12 +21,11 @@
|
||||
#include "includes.h"
|
||||
#include "torture/torture.h"
|
||||
#include "lib/tdr/tdr.h"
|
||||
#include "param/param.h"
|
||||
|
||||
static bool test_push_uint8(struct torture_context *tctx)
|
||||
{
|
||||
uint8_t v = 4;
|
||||
struct tdr_push *tdr = tdr_push_init(tctx, lp_iconv_convenience(tctx->lp_ctx));
|
||||
struct tdr_push *tdr = tdr_push_init(tctx, global_iconv_convenience);
|
||||
|
||||
torture_assert_ntstatus_ok(tctx, tdr_push_uint8(tdr, &v), "push failed");
|
||||
torture_assert_int_equal(tctx, tdr->data.length, 1, "length incorrect");
|
||||
@ -38,7 +37,7 @@ static bool test_pull_uint8(struct torture_context *tctx)
|
||||
{
|
||||
uint8_t d = 2;
|
||||
uint8_t l;
|
||||
struct tdr_pull *tdr = tdr_pull_init(tctx, lp_iconv_convenience(tctx->lp_ctx));
|
||||
struct tdr_pull *tdr = tdr_pull_init(tctx, global_iconv_convenience);
|
||||
tdr->data.data = &d;
|
||||
tdr->data.length = 1;
|
||||
tdr->offset = 0;
|
||||
@ -53,7 +52,7 @@ static bool test_pull_uint8(struct torture_context *tctx)
|
||||
static bool test_push_uint16(struct torture_context *tctx)
|
||||
{
|
||||
uint16_t v = 0xF32;
|
||||
struct tdr_push *tdr = tdr_push_init(tctx, lp_iconv_convenience(tctx->lp_ctx));
|
||||
struct tdr_push *tdr = tdr_push_init(tctx, global_iconv_convenience);
|
||||
|
||||
torture_assert_ntstatus_ok(tctx, tdr_push_uint16(tdr, &v), "push failed");
|
||||
torture_assert_int_equal(tctx, tdr->data.length, 2, "length incorrect");
|
||||
@ -66,7 +65,7 @@ static bool test_pull_uint16(struct torture_context *tctx)
|
||||
{
|
||||
uint8_t d[2] = { 782 & 0xFF, (782 & 0xFF00) / 0x100 };
|
||||
uint16_t l;
|
||||
struct tdr_pull *tdr = tdr_pull_init(tctx, lp_iconv_convenience(tctx->lp_ctx));
|
||||
struct tdr_pull *tdr = tdr_pull_init(tctx, global_iconv_convenience);
|
||||
tdr->data.data = d;
|
||||
tdr->data.length = 2;
|
||||
tdr->offset = 0;
|
||||
@ -81,7 +80,7 @@ static bool test_pull_uint16(struct torture_context *tctx)
|
||||
static bool test_push_uint32(struct torture_context *tctx)
|
||||
{
|
||||
uint32_t v = 0x100F32;
|
||||
struct tdr_push *tdr = tdr_push_init(tctx, lp_iconv_convenience(tctx->lp_ctx));
|
||||
struct tdr_push *tdr = tdr_push_init(tctx, global_iconv_convenience);
|
||||
|
||||
torture_assert_ntstatus_ok(tctx, tdr_push_uint32(tdr, &v), "push failed");
|
||||
torture_assert_int_equal(tctx, tdr->data.length, 4, "length incorrect");
|
||||
@ -96,7 +95,7 @@ static bool test_pull_uint32(struct torture_context *tctx)
|
||||
{
|
||||
uint8_t d[4] = { 782 & 0xFF, (782 & 0xFF00) / 0x100, 0, 0 };
|
||||
uint32_t l;
|
||||
struct tdr_pull *tdr = tdr_pull_init(tctx, lp_iconv_convenience(tctx->lp_ctx));
|
||||
struct tdr_pull *tdr = tdr_pull_init(tctx, global_iconv_convenience);
|
||||
tdr->data.data = d;
|
||||
tdr->data.length = 4;
|
||||
tdr->offset = 0;
|
||||
@ -110,7 +109,7 @@ static bool test_pull_uint32(struct torture_context *tctx)
|
||||
|
||||
static bool test_pull_charset(struct torture_context *tctx)
|
||||
{
|
||||
struct tdr_pull *tdr = tdr_pull_init(tctx, lp_iconv_convenience(tctx->lp_ctx));
|
||||
struct tdr_pull *tdr = tdr_pull_init(tctx, global_iconv_convenience);
|
||||
const char *l = NULL;
|
||||
tdr->data.data = (uint8_t *)talloc_strdup(tctx, "bla");
|
||||
tdr->data.length = 4;
|
||||
@ -132,7 +131,7 @@ static bool test_pull_charset(struct torture_context *tctx)
|
||||
|
||||
static bool test_pull_charset_empty(struct torture_context *tctx)
|
||||
{
|
||||
struct tdr_pull *tdr = tdr_pull_init(tctx, lp_iconv_convenience(tctx->lp_ctx));
|
||||
struct tdr_pull *tdr = tdr_pull_init(tctx, global_iconv_convenience);
|
||||
const char *l = NULL;
|
||||
tdr->data.data = (uint8_t *)talloc_strdup(tctx, "bla");
|
||||
tdr->data.length = 4;
|
||||
@ -151,7 +150,7 @@ static bool test_pull_charset_empty(struct torture_context *tctx)
|
||||
static bool test_push_charset(struct torture_context *tctx)
|
||||
{
|
||||
const char *l = "bloe";
|
||||
struct tdr_push *tdr = tdr_push_init(tctx, lp_iconv_convenience(tctx->lp_ctx));
|
||||
struct tdr_push *tdr = tdr_push_init(tctx, global_iconv_convenience);
|
||||
torture_assert_ntstatus_ok(tctx, tdr_push_charset(tdr, &l, 4, 1, CH_UTF8),
|
||||
"push failed");
|
||||
torture_assert_int_equal(tctx, 4, tdr->data.length, "offset invalid");
|
@ -8,6 +8,7 @@ if test x"$ac_cv_header_execinfo_h" = x"yes" -a x"$ac_cv_func_ext_backtrace" = x
|
||||
EXECINFO_CFLAGS="$CFLAGS"
|
||||
EXECINFO_CPPFLAGS="$CPPFLAGS"
|
||||
EXECINFO_LDFLAGS="$LDFLAGS"
|
||||
LIB_REMOVE_USR_LIB(EXECINFO_LDFLAGS)
|
||||
else
|
||||
SMB_ENABLE(EXECINFO,NO)
|
||||
fi
|
||||
|
@ -271,7 +271,7 @@ sub Parser($$$$)
|
||||
$self->pidl("");
|
||||
$self->pidl_hdr("/* autogenerated by pidl */");
|
||||
$self->pidl_hdr("#include \"$baseheader\"");
|
||||
$self->pidl_hdr(choose_header("tdr/tdr.h", "tdr.h"));
|
||||
$self->pidl_hdr(choose_header("lib/tdr/tdr.h", "tdr.h"));
|
||||
$self->pidl_hdr("");
|
||||
|
||||
foreach (@$idl) { $self->ParserInterface($_) if ($_->{TYPE} eq "INTERFACE"); }
|
||||
|
@ -89,7 +89,7 @@ socketwrappersrcdir := $(samba4srcdir)/../lib/socket_wrapper
|
||||
nsswrappersrcdir := $(samba4srcdir)/../lib/nss_wrapper
|
||||
libstreamsrcdir := $(samba4srcdir)/lib/stream
|
||||
libutilsrcdir := $(samba4srcdir)/../lib/util
|
||||
libtdrsrcdir := $(samba4srcdir)/lib/tdr
|
||||
libtdrsrcdir := ../lib/tdr
|
||||
libcryptosrcdir := $(samba4srcdir)/../lib/crypto
|
||||
libtorturesrcdir := ../lib/torture
|
||||
libcompressionsrcdir := $(samba4srcdir)/../lib/compression
|
||||
|
@ -77,7 +77,7 @@ nsswrappersrcdir := ../lib/nss_wrapper
|
||||
appwebsrcdir := lib/appweb
|
||||
libstreamsrcdir := lib/stream
|
||||
libutilsrcdir := ../lib/util
|
||||
libtdrsrcdir := lib/tdr
|
||||
libtdrsrcdir := ../lib/tdr
|
||||
libcryptosrcdir := ../lib/crypto
|
||||
libtorturesrcdir := ../lib/torture
|
||||
smb_serversrcdir := smb_server
|
||||
|
@ -27,6 +27,7 @@ if test x"$ac_cv_header_sasl_sasl_h" = x"yes" -a x"$ac_cv_lib_ext_sasl2_sasl_cli
|
||||
SASL_CFLAGS="$CFLAGS"
|
||||
SASL_CPPFLAGS="$CPPFLAGS"
|
||||
SASL_LDFLAGS="$LDFLAGS"
|
||||
LIB_REMOVE_USR_LIB(SASL_LDFLAGS)
|
||||
else
|
||||
SMB_ENABLE(cyrus_sasl,NO)
|
||||
fi
|
||||
|
@ -99,11 +99,13 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
|
||||
AC_MSG_WARN([cannot run when cross-compiling]))
|
||||
CFLAGS="$OLD_CFLAGS"
|
||||
|
||||
ac_cv_$1_libs_only_other="`$PKG_CONFIG --libs-only-other '$2'` `$PKG_CONFIG --libs-only-L '$2'`"
|
||||
LIB_REMOVE_USR_LIB(ac_cv_$1_libs_only_other)
|
||||
SMB_EXT_LIB($1,
|
||||
[`$PKG_CONFIG --libs-only-l '$2'`],
|
||||
[`$PKG_CONFIG --cflags-only-other '$2'`],
|
||||
[`$PKG_CONFIG --cflags-only-I '$2'`],
|
||||
[`$PKG_CONFIG --libs-only-other '$2'` `$PKG_CONFIG --libs-only-L '$2'`])
|
||||
[$ac_cv_$1_libs_only_other])
|
||||
ac_cv_$1_found=yes
|
||||
|
||||
else
|
||||
|
@ -20,7 +20,7 @@ mkinclude ../lib/socket_wrapper/config.mk
|
||||
mkinclude ../lib/nss_wrapper/config.mk
|
||||
mkinclude lib/stream/config.mk
|
||||
mkinclude ../lib/util/config.mk
|
||||
mkinclude lib/tdr/config.mk
|
||||
mkinclude ../lib/tdr/config.mk
|
||||
mkinclude ../lib/crypto/config.mk
|
||||
mkinclude ../lib/torture/config.mk
|
||||
mkinclude lib/basic.mk
|
||||
|
@ -44,7 +44,7 @@ TORTURE_LOCAL_OBJ_FILES = \
|
||||
$(torturesrcdir)/../../lib/compression/testsuite.o \
|
||||
$(torturesrcdir)/../../lib/util/charset/tests/charset.o \
|
||||
$(torturesrcdir)/../libcli/security/tests/sddl.o \
|
||||
$(torturesrcdir)/../lib/tdr/testsuite.o \
|
||||
$(libtdrsrcdir)/testsuite.o \
|
||||
$(torturesrcdir)/../../lib/tevent/testsuite.o \
|
||||
$(torturesrcdir)/../param/tests/share.o \
|
||||
$(torturesrcdir)/../param/tests/loadparm.o \
|
||||
|
Loading…
x
Reference in New Issue
Block a user