mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
s4-smbtorture: move up torture_assert_sid_equal at least to the torture/ndr level.
Guenther
This commit is contained in:
parent
254d85d537
commit
fb70368a97
@ -21,17 +21,6 @@
|
|||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "torture/ndr/ndr.h"
|
#include "torture/ndr/ndr.h"
|
||||||
#include "librpc/gen_ndr/ndr_lsa.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[] = {
|
static const uint8_t lsarlookupnames_in_data[] = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x2a, 0xab, 0xb8, 0x84, 0x36, 0xc6, 0xed, 0x4f,
|
0x00, 0x00, 0x00, 0x00, 0x2a, 0xab, 0xb8, 0x84, 0x36, 0xc6, 0xed, 0x4f,
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include "torture/torture.h"
|
#include "torture/torture.h"
|
||||||
#include "librpc/ndr/libndr.h"
|
#include "librpc/ndr/libndr.h"
|
||||||
|
#include "libcli/security/security.h"
|
||||||
|
|
||||||
_PUBLIC_ struct torture_test *_torture_suite_add_ndr_pull_test(
|
_PUBLIC_ struct torture_test *_torture_suite_add_ndr_pull_test(
|
||||||
struct torture_suite *suite,
|
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)), \
|
(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);
|
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__ */
|
#endif /* __TORTURE_NDR_H__ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user