summaryrefslogtreecommitdiffstats
path: root/source4/torture/rpc/samsync.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-11-10 12:30:35 +0100
committerGünther Deschner <gd@samba.org>2008-11-10 21:46:25 +0100
commite004307000d40fbe235827bc71229f4a5757c313 (patch)
tree61cfd2ce6f106f2387a26b6d010e6ffe7f0a3d11 /source4/torture/rpc/samsync.c
parentc8a8c2388b32977a54daf854f14c278a18824594 (diff)
downloadsamba-e004307000d40fbe235827bc71229f4a5757c313.tar.gz
samba-e004307000d40fbe235827bc71229f4a5757c313.tar.xz
samba-e004307000d40fbe235827bc71229f4a5757c313.zip
s4-netlogon: change parameters string to lsa_BinaryString.
Guenther
Diffstat (limited to 'source4/torture/rpc/samsync.c')
-rw-r--r--source4/torture/rpc/samsync.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index 12ddc934c96..d97b9ba4983 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -260,6 +260,15 @@ static struct sec_desc_buf *samsync_query_lsa_sec_desc(TALLOC_CTX *mem_ctx,
} \
} while (0)
+#define TEST_BINARY_STRING_EQUAL(s1, s2) do {\
+ if (!((!s1.array || s1.array[0]=='\0') && (!s2.array || s2.array[0]=='\0')) \
+ && memcmp(s1.array, s2.array, s1.length * 2) != 0) {\
+ printf("%s: string mismatch: " #s1 ":%s != " #s2 ": %s\n", \
+ __location__, (const char *)s1.array, (const char *)s2.array);\
+ ret = false;\
+ } \
+} while (0)
+
#define TEST_SID_EQUAL(s1, s2) do {\
if (!dom_sid_equal(s1, s2)) {\
printf("%s: dom_sid mismatch: " #s1 ":%s != " #s2 ": %s\n", \
@@ -535,7 +544,7 @@ static bool samsync_handle_user(struct torture_context *tctx, TALLOC_CTX *mem_ct
TEST_INT_EQUAL(q.out.info->info21.password_expired, user->password_expired);
TEST_STRING_EQUAL(q.out.info->info21.comment, user->comment);
- TEST_STRING_EQUAL(q.out.info->info21.parameters, user->parameters);
+ TEST_BINARY_STRING_EQUAL(q.out.info->info21.parameters, user->parameters);
TEST_INT_EQUAL(q.out.info->info21.country_code, user->country_code);
TEST_INT_EQUAL(q.out.info->info21.code_page, user->code_page);