diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-10-28 06:44:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:45:24 -0500 |
commit | f2d16149064b8f09c0fafd68749327409eedf9e9 (patch) | |
tree | 426eaceb4342221a2e738d4583a07e6ce2578ea7 /source4/torture | |
parent | 18e9c4992257f91c3e80ce991f36c5c4b2441430 (diff) | |
download | samba-f2d16149064b8f09c0fafd68749327409eedf9e9.tar.gz samba-f2d16149064b8f09c0fafd68749327409eedf9e9.tar.bz2 samba-f2d16149064b8f09c0fafd68749327409eedf9e9.zip |
r11361: Test user@DOMAIN userPrincipalNames
Andrew Bartlett
(This used to be commit 75b002746af3788c71f99854ce983ff807f12b37)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/drsuapi_cracknames.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/torture/rpc/drsuapi_cracknames.c b/source4/torture/rpc/drsuapi_cracknames.c index d27667edea..40deb18fab 100644 --- a/source4/torture/rpc/drsuapi_cracknames.c +++ b/source4/torture/rpc/drsuapi_cracknames.c @@ -215,6 +215,7 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char *realm_canonical; const char *realm_canonical_ex; const char *user_principal_name; + char *user_principal_name_short; const char *service_principal_name; const char *canonical_name; const char *canonical_ex_name; @@ -398,6 +399,12 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, canonical_ex_name = ldb_dn_canonical_ex_string(mem_ctx, FQDN_1779_dn); user_principal_name = talloc_asprintf(mem_ctx, "%s$@%s", test_dc, dns_domain); + + /* form up a user@DOMAIN */ + user_principal_name_short = talloc_asprintf(mem_ctx, "%s$@%s", test_dc, nt4_domain); + /* variable nt4_domain includs a trailing \ */ + user_principal_name_short[strlen(user_principal_name_short) - 1] = '\0'; + service_principal_name = talloc_asprintf(mem_ctx, "HOST/%s", test_dc); { @@ -418,6 +425,13 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, .status = DRSUAPI_DS_NAME_STATUS_OK }, { + .format_offered = DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL, + .format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779, + .str = user_principal_name_short, + .expected_str = FQDN_1779_name, + .status = DRSUAPI_DS_NAME_STATUS_OK + }, + { .format_offered = DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL, .format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779, .str = service_principal_name, |