summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-24 18:29:52 +0100
committerGünther Deschner <gd@samba.org>2010-03-24 18:30:18 +0100
commitfb70368a975e6c78c6ce557fc6011569dbdc6d75 (patch)
tree4b130a4f8d0a78f6ed77509dc0e4738bbd55108c
parent254d85d537a57ae3a7f7154987da4049846a85db (diff)
downloadsamba-fb70368a975e6c78c6ce557fc6011569dbdc6d75.tar.gz
samba-fb70368a975e6c78c6ce557fc6011569dbdc6d75.tar.bz2
samba-fb70368a975e6c78c6ce557fc6011569dbdc6d75.zip
s4-smbtorture: move up torture_assert_sid_equal at least to the torture/ndr level.
Guenther
-rw-r--r--source4/torture/ndr/lsa.c11
-rw-r--r--source4/torture/ndr/ndr.h11
2 files changed, 11 insertions, 11 deletions
diff --git a/source4/torture/ndr/lsa.c b/source4/torture/ndr/lsa.c
index e9e01d3c55..6e53fdf4d6 100644
--- a/source4/torture/ndr/lsa.c
+++ b/source4/torture/ndr/lsa.c
@@ -21,17 +21,6 @@
#include "includes.h"
#include "torture/ndr/ndr.h"
#include "librpc/gen_ndr/ndr_lsa.h"
-#include "libcli/security/security.h"
-
-#define torture_assert_sid_equal(torture_ctx,got,expected,cmt)\
- do { struct dom_sid *__got = (got), *__expected = (expected); \
- if (!dom_sid_equal(__got, __expected)) { \
- torture_result(torture_ctx, TORTURE_FAIL, \
- __location__": "#got" was %s, expected %s: %s", \
- dom_sid_string(torture_ctx, __got), dom_sid_string(torture_ctx, __expected), cmt); \
- return false; \
- } \
- } while(0)
static const uint8_t lsarlookupnames_in_data[] = {
0x00, 0x00, 0x00, 0x00, 0x2a, 0xab, 0xb8, 0x84, 0x36, 0xc6, 0xed, 0x4f,
diff --git a/source4/torture/ndr/ndr.h b/source4/torture/ndr/ndr.h
index aca6e58397..517bcb6b34 100644
--- a/source4/torture/ndr/ndr.h
+++ b/source4/torture/ndr/ndr.h
@@ -22,6 +22,7 @@
#include "torture/torture.h"
#include "librpc/ndr/libndr.h"
+#include "libcli/security/security.h"
_PUBLIC_ struct torture_test *_torture_suite_add_ndr_pull_test(
struct torture_suite *suite,
@@ -41,4 +42,14 @@ _PUBLIC_ struct torture_test *_torture_suite_add_ndr_pull_test(
(ndr_pull_flags_fn_t)ndr_pull_ ## name, data_blob_talloc(suite, data, sizeof(data)), \
sizeof(struct name), flags, (bool (*) (struct torture_context *, void *)) check_fn);
+#define torture_assert_sid_equal(torture_ctx,got,expected,cmt)\
+ do { struct dom_sid *__got = (got), *__expected = (expected); \
+ if (!dom_sid_equal(__got, __expected)) { \
+ torture_result(torture_ctx, TORTURE_FAIL, \
+ __location__": "#got" was %s, expected %s: %s", \
+ dom_sid_string(torture_ctx, __got), dom_sid_string(torture_ctx, __expected), cmt); \
+ return false; \
+ } \
+ } while(0)
+
#endif /* __TORTURE_NDR_H__ */