diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-04-07 03:03:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:52 -0500 |
commit | 270248ac023ecb68042ae23e501cbf3817984b89 (patch) | |
tree | 0a89f477ef7234ce8ac8749aedbdd4cbda21fac3 /source4/torture/rpc | |
parent | 5497a1341cde83567d3513b9a76dc498589299d0 (diff) | |
download | samba-270248ac023ecb68042ae23e501cbf3817984b89.tar.gz samba-270248ac023ecb68042ae23e501cbf3817984b89.tar.bz2 samba-270248ac023ecb68042ae23e501cbf3817984b89.zip |
r22118: Add another RPC-CRACKNAMES test, but allow a way to skip sub-parts of
this test we don't yet support in Samba4. I want to at least try and
test this parts of this codebase...
Andrew Bartlett
(This used to be commit cb2e4ca220ca03cd1893e7f6c18de0ab181817b8)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/drsuapi_cracknames.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/source4/torture/rpc/drsuapi_cracknames.c b/source4/torture/rpc/drsuapi_cracknames.c index 0cb5b35879..e78f55eb5f 100644 --- a/source4/torture/rpc/drsuapi_cracknames.c +++ b/source4/torture/rpc/drsuapi_cracknames.c @@ -462,6 +462,7 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, enum drsuapi_DsNameStatus status; enum drsuapi_DsNameStatus alternate_status; enum drsuapi_DsNameFlags flags; + BOOL skip; } crack[] = { { .format_offered = DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL, @@ -574,16 +575,15 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, .expected_str = talloc_asprintf(mem_ctx, "%s\n", dns_domain), .status = DRSUAPI_DS_NAME_STATUS_OK }, -#if 0 /* perhaps we don't really need to look for this one */ { .format_offered = DRSUAPI_DS_NAME_FORMAT_DISPLAY, .format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779, .str = "CN=Microsoft Corporation,L=Redmond,S=Washington,C=US", .comment = "display name for Microsoft Support Account", .status = DRSUAPI_DS_NAME_STATUS_OK, - .alternate_status = DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE + .alternate_status = DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE, + .skip = lp_parm_bool(-1, "torture", "samba4", False) }, -#endif { .format_offered = DRSUAPI_DS_NAME_FORMAT_GUID, .format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779, @@ -637,7 +637,8 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, .str = GUID_string2(mem_ctx, &priv->dcinfo.ntds_guid), .comment = "NTDS GUID", .expected_str = priv->dcinfo.ntds_dn, - .status = DRSUAPI_DS_NAME_STATUS_OK + .status = DRSUAPI_DS_NAME_STATUS_OK, + .skip = GUID_all_zero(&priv->dcinfo.ntds_guid) }, { .format_offered = DRSUAPI_DS_NAME_FORMAT_DISPLAY, @@ -839,9 +840,17 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, { .format_offered = DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL, .format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779, + .comment = "invalid user principal name", .str = "foo@bar", .status = DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY }, + { + .format_offered = DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL, + .format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779, + .comment = "invalid user principal name in valid domain", + .str = talloc_asprintf(mem_ctx, "invalidusername@%s", dns_domain), + .status = DRSUAPI_DS_NAME_STATUS_NOT_FOUND + } }; int i; @@ -859,6 +868,10 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, comment = talloc_asprintf(mem_ctx, "'%s' desired format:%d\n", names[0].str, r.in.req.req1.format_desired); } + if (crack[i].skip) { + printf("skipping: %s", comment); + continue; + } status = dcerpc_drsuapi_DsCrackNames(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { const char *errstr = nt_errstr(status); |