[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Wed Jan 4 05:38:06 MST 2012
The branch, master has been updated
via bf0da0b LDAP-CLDAP: demonstrate that pdc name is an unc path
via f9b1fb0 s4:torture/nbt/dgram.c: NBT samlogon requests without _EX return the PDC name as UNC path
from 6a1201a dlz_bind9: create session info from PAC using auth context
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit bf0da0b4f7fcdc655def21f84619850c0d699c3e
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Jan 4 11:46:47 2012 +0100
LDAP-CLDAP: demonstrate that pdc name is an unc path
For LOGON_SAM_LOGON_RESPONSE and LOGON_SAM_LOGON_USER_UNKNOWN,
I assume all levels without _EX in the name, pdc name is
in unc path form.
[MS-ADTS] 7.3.1.* uses UnicodeLogonServer, which seems to be in unc form,
while NetbiosComputerName is not in unc form.
metze
Autobuild-User: Stefan Metzmacher <metze at samba.org>
Autobuild-Date: Wed Jan 4 13:37:42 CET 2012 on sn-devel-104
commit f9b1fb02df8e9192ec4adb81b47a25942f4308a9
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jan 2 15:51:35 2012 +0100
s4:torture/nbt/dgram.c: NBT samlogon requests without _EX return the PDC name as UNC path
metze
-----------------------------------------------------------------------
Summary of changes:
source4/torture/ldap/cldap.c | 6 ++++++
source4/torture/nbt/dgram.c | 22 ++++++++++++++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c
index 6de33b8..b3f6276 100644
--- a/source4/torture/ldap/cldap.c
+++ b/source4/torture/ldap/cldap.c
@@ -123,6 +123,9 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, "");
+ torture_assert(tctx,
+ strstr(search.out.netlogon.data.nt5_ex.pdc_name, "\\\\") != NULL,
+ "PDC name should be in UNC form");
printf("Trying with User=Administrator\n");
search.in.user = "Administrator";
@@ -130,6 +133,9 @@ static bool test_cldap_netlogon(struct torture_context *tctx, const char *dest)
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_VAL(search.out.netlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN);
CHECK_STRING(search.out.netlogon.data.nt5_ex.user_name, search.in.user);
+ torture_assert(tctx,
+ strstr(search.out.netlogon.data.nt5_ex.pdc_name, "\\\\") != NULL,
+ "PDC name should be in UNC form");
search.in.version = NETLOGON_NT_VERSION_5 | NETLOGON_NT_VERSION_5EX;
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index 7678057..d25724e 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,
--
Samba Shared Repository
More information about the samba-cvs
mailing list