s4-smbtorture: move up torture_assert_sid_equal at least to the torture/ndr level.
authorGünther Deschner <gd@samba.org>
Wed, 24 Mar 2010 17:29:52 +0000 (18:29 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 24 Mar 2010 17:30:18 +0000 (18:30 +0100)
Guenther

source4/torture/ndr/lsa.c
source4/torture/ndr/ndr.h

index e9e01d3c551dbe7149fb9c9706a37d9bbc5083a6..6e53fdf4d6ded59db9933ba810c73df6f6d7e670 100644 (file)
 #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,
index aca6e58397c2986b161cb477f7f899f3d774f7a8..517bcb6b34b3627d3050af00331b39d3b0185d38 100644 (file)
@@ -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__ */