summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/samsync.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-11-29 17:51:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:13 -0500
commit5ef59e9a0a5d19c67762cb4464654dd032476a95 (patch)
treec65cf5c960473d40bc031052f33ac983fa9c8353 /source4/torture/rpc/samsync.c
parentb7781099e62a1b004c54d50accc8cdb78cecb3d8 (diff)
downloadsamba-5ef59e9a0a5d19c67762cb4464654dd032476a95.tar.gz
samba-5ef59e9a0a5d19c67762cb4464654dd032476a95.tar.bz2
samba-5ef59e9a0a5d19c67762cb4464654dd032476a95.zip
r4003: run successful against a nt4 sp6 pdc with one nt4 sp6 trust and a w2k3 trust
metze (This used to be commit 5101cd51a24fdcda8dd8fc4da446782948290f9b)
Diffstat (limited to 'source4/torture/rpc/samsync.c')
-rw-r--r--source4/torture/rpc/samsync.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index 05b585d0e1..42ac6fc1dc 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -555,8 +555,14 @@ static BOOL samsync_handle_user(TALLOC_CTX *mem_ctx, struct samsync_state *samsy
} else if (NT_STATUS_IS_OK(nt_status)) {
TEST_INT_EQUAL(user->rid, info3->base.rid);
TEST_INT_EQUAL(user->primary_gid, info3->base.primary_gid);
- TEST_INT_EQUAL(user->acct_flags, info3->base.acct_flags);
- TEST_STRING_EQUAL(user->account_name, info3->base.account_name);
+ /* this is 0x0 from NT4 sp6 */
+ if (info3->base.acct_flags) {
+ TEST_INT_EQUAL(user->acct_flags, info3->base.acct_flags);
+ }
+ /* this is NULL from NT4 sp6 */
+ if (info3->base.account_name.string) {
+ TEST_STRING_EQUAL(user->account_name, info3->base.account_name);
+ }
TEST_STRING_EQUAL(user->full_name, info3->base.full_name);
TEST_STRING_EQUAL(user->logon_script, info3->base.logon_script);
TEST_STRING_EQUAL(user->profile_path, info3->base.profile_path);
@@ -574,8 +580,9 @@ static BOOL samsync_handle_user(TALLOC_CTX *mem_ctx, struct samsync_state *samsy
* doco I read -- abartlet) */
/* This copes with the two different versions of 0 I see */
+ /* with NT4 sp6 we have the || case */
if (!((user->last_logoff == 0)
- && (info3->base.last_logoff == 0x7fffffffffffffffLL))) {
+ || (info3->base.last_logoff == 0x7fffffffffffffffLL))) {
TEST_TIME_EQUAL(user->last_logoff, info3->base.last_logoff);
}
return ret;
@@ -813,6 +820,10 @@ static BOOL samsync_handle_trusted_domain(TALLOC_CTX *mem_ctx, struct samsync_st
q.in.level = levels[i];
status = dcerpc_lsa_QueryTrustedDomainInfo(samsync_state->p_lsa, mem_ctx, &q);
if (!NT_STATUS_IS_OK(status)) {
+ if (q.in.level == 8 && NT_STATUS_EQUAL(status,NT_STATUS_INVALID_PARAMETER)) {
+ info[levels[i]] = NULL;
+ continue;
+ }
printf("QueryInfoTrustedDomain level %d failed - %s\n",
levels[i], nt_errstr(status));
return False;
@@ -820,9 +831,11 @@ static BOOL samsync_handle_trusted_domain(TALLOC_CTX *mem_ctx, struct samsync_st
info[levels[i]] = q.out.info;
}
- TEST_SID_EQUAL(info[8]->full_info.info_ex.sid, dom_sid);
- TEST_STRING_EQUAL(info[8]->full_info.info_ex.name, trusted_domain->domain_name);
- TEST_STRING_EQUAL(info[1]->name.domain_name, trusted_domain->domain_name);
+ if (info[8]) {
+ TEST_SID_EQUAL(info[8]->full_info.info_ex.sid, dom_sid);
+ TEST_STRING_EQUAL(info[8]->full_info.info_ex.netbios_name, trusted_domain->domain_name);
+ }
+ TEST_STRING_EQUAL(info[1]->name.netbios_name, trusted_domain->domain_name);
TEST_INT_EQUAL(info[3]->flags.flags, trusted_domain->flags);
TEST_SEC_DESC_EQUAL(trusted_domain->sdbuf, lsa, &trustdom_handle);