summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-10-20 04:55:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:01 -0500
commitdfbdd10c383538f676afeae8a24cba23a49492c5 (patch)
tree08ae492fd9bd6080bbd61bb67b1b52a2e0fc3c6a
parent11b16c2580a95afcd7740328282be1e0bbf74dc9 (diff)
downloadsamba-dfbdd10c383538f676afeae8a24cba23a49492c5.tar.gz
samba-dfbdd10c383538f676afeae8a24cba23a49492c5.tar.bz2
samba-dfbdd10c383538f676afeae8a24cba23a49492c5.zip
r11205: Another test for cracknames.
Andrew Bartlett (This used to be commit 3810282a24b8aea36627f43321e76f34057e3135)
-rw-r--r--source4/torture/rpc/drsuapi_cracknames.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/torture/rpc/drsuapi_cracknames.c b/source4/torture/rpc/drsuapi_cracknames.c
index b37825d85c..0c41a8d5f9 100644
--- a/source4/torture/rpc/drsuapi_cracknames.c
+++ b/source4/torture/rpc/drsuapi_cracknames.c
@@ -211,6 +211,7 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
const char *FQDN_1779_name;
struct ldb_dn *FQDN_1779_dn;
struct ldb_dn *realm_dn;
+ const char *realm_dn_str;
const char *realm_canonical;
const char *realm_canonical_ex;
const char *user_principal_name;
@@ -311,7 +312,8 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return ret;
}
- realm_dn = ldb_dn_explode(mem_ctx, r.out.ctr.ctr1->array[0].result_name);
+ realm_dn_str = r.out.ctr.ctr1->array[0].result_name;
+ realm_dn = ldb_dn_explode(mem_ctx, realm_dn_str);
realm_canonical = ldb_dn_canonical_string(mem_ctx, realm_dn);
if (strcmp(realm_canonical,
@@ -559,6 +561,13 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
.str = talloc_asprintf(mem_ctx, "krbtgt"),
.status = DRSUAPI_DS_NAME_STATUS_NOT_FOUND
},
+ {
+ .format_offered = DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL,
+ .format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779,
+ .str = talloc_asprintf(mem_ctx, "kadmin/changepw"),
+ .status = DRSUAPI_DS_NAME_STATUS_OK,
+ .expected_str = talloc_asprintf(mem_ctx, "CN=krbtgt,CN=Users,%s", realm_dn_str)
+ },
{
.format_offered = DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL,
.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779,