diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-01-02 15:51:35 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-01-04 11:56:11 +0100 |
commit | f9b1fb02df8e9192ec4adb81b47a25942f4308a9 (patch) | |
tree | f6ff03abc6bb081a5df3909ea6c282218c8a0b93 /source4 | |
parent | 6a1201a67b36bc1bb3214ee911b130c4affb8dec (diff) | |
download | samba-f9b1fb02df8e9192ec4adb81b47a25942f4308a9.tar.gz samba-f9b1fb02df8e9192ec4adb81b47a25942f4308a9.tar.bz2 samba-f9b1fb02df8e9192ec4adb81b47a25942f4308a9.zip |
s4:torture/nbt/dgram.c: NBT samlogon requests without _EX return the PDC name as UNC path
metze
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/nbt/dgram.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c index 7678057f94..d25724e176 100644 --- a/source4/torture/nbt/dgram.c +++ b/source4/torture/nbt/dgram.c @@ -289,6 +289,10 @@ static bool nbt_test_netlogon2(struct torture_context *tctx) torture_assert_str_equal(tctx, response->data.samlogon.data.nt5_ex.user_name, TEST_NAME"$", "Got incorrect user in netlogon response"); + torture_assert(tctx, + strstr(response->data.samlogon.data.nt5_ex.pdc_name, "\\\\") != NULL, + "PDC name should be in UNC form"); + join_ctx = torture_join_domain(tctx, TEST_NAME, ACB_WSTRUST, &machine_credentials); @@ -339,6 +343,10 @@ static bool nbt_test_netlogon2(struct torture_context *tctx) torture_assert_int_equal(tctx, response->data.samlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN, "Got incorrect netlogon response command"); + torture_assert(tctx, + strstr(response->data.samlogon.data.nt5_ex.pdc_name, "\\\\") != NULL, + "PDC name should be in UNC form"); + /* setup (another) temporary mailslot listener for replies */ dgmslot = dgram_mailslot_temp(dgmsock, NBT_MAILSLOT_GETDC, netlogon_handler, NULL); @@ -381,6 +389,10 @@ static bool nbt_test_netlogon2(struct torture_context *tctx) torture_assert_int_equal(tctx, response->data.samlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE, "Got incorrect netlogon response command"); + torture_assert(tctx, + strstr(response->data.samlogon.data.nt5_ex.pdc_name, "\\\\") != NULL, + "PDC name should be in UNC form"); + dgmslot->private_data = NULL; ZERO_STRUCT(logon); @@ -420,6 +432,10 @@ static bool nbt_test_netlogon2(struct torture_context *tctx) torture_assert_int_equal(tctx, response->data.samlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN, "Got incorrect netlogon response command"); + torture_assert(tctx, + strstr(response->data.samlogon.data.nt5_ex.pdc_name, "\\\\") != NULL, + "PDC name should be in UNC form"); + torture_leave_domain(tctx, join_ctx); return true; } @@ -531,6 +547,9 @@ static bool nbt_test_ntlogon(struct torture_context *tctx) torture_assert_str_equal(tctx, response->data.samlogon.data.nt5_ex.user_name, TEST_NAME"$", "Got incorrect user in netlogon response"); + torture_assert(tctx, + strstr(response->data.samlogon.data.nt5_ex.pdc_name, "\\\\") != NULL, + "PDC name should be in UNC form"); /* setup a temporary mailslot listener for replies */ dgmslot = dgram_mailslot_temp(dgmsock, NBT_MAILSLOT_GETDC, @@ -575,6 +594,9 @@ static bool nbt_test_ntlogon(struct torture_context *tctx) torture_assert_str_equal(tctx, response->data.samlogon.data.nt5_ex.user_name, TEST_NAME"$", "Got incorrect user in netlogon response"); + torture_assert(tctx, + strstr(response->data.samlogon.data.nt5_ex.pdc_name, "\\\\") != NULL, + "PDC name should be in UNC form"); /* setup (another) temporary mailslot listener for replies */ dgmslot = dgram_mailslot_temp(dgmsock, NBT_MAILSLOT_GETDC, |