diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-27 23:41:48 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-27 23:41:48 +0100 |
commit | 35f12009af7e70c7bf45f751bdbd12f8146a7c0b (patch) | |
tree | 5ddf16c4690218e158889d3b26b8258931a48b3a /source4/torture/rpc/schannel.c | |
parent | aafe9ca1aa829f64d4bad1df3ee1d5997fb17d71 (diff) | |
parent | a4ad2658500e83613eeb5c01a6dfb5d067803d16 (diff) | |
download | samba-35f12009af7e70c7bf45f751bdbd12f8146a7c0b.tar.gz samba-35f12009af7e70c7bf45f751bdbd12f8146a7c0b.tar.bz2 samba-35f12009af7e70c7bf45f751bdbd12f8146a7c0b.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source4/torture/rpc/schannel.c')
-rw-r--r-- | source4/torture/rpc/schannel.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c index 15d40a2e17..a8aa046280 100644 --- a/source4/torture/rpc/schannel.c +++ b/source4/torture/rpc/schannel.c @@ -182,18 +182,21 @@ static bool test_lsa_ops(struct torture_context *tctx, struct dcerpc_pipe *p) struct lsa_GetUserName r; NTSTATUS status; bool ret = true; - struct lsa_StringPointer authority_name_p; + struct lsa_String *account_name_p = NULL; + struct lsa_String *authority_name_p = NULL; printf("\nTesting GetUserName\n"); r.in.system_name = "\\"; - r.in.account_name = NULL; + r.in.account_name = &account_name_p; r.in.authority_name = &authority_name_p; - authority_name_p.string = NULL; + r.out.account_name = &account_name_p; /* do several ops to test credential chaining and various operations */ status = dcerpc_lsa_GetUserName(p, tctx, &r); - + + authority_name_p = *r.out.authority_name; + if (NT_STATUS_EQUAL(status, NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED)) { printf("not considering %s to be an error\n", nt_errstr(status)); } else if (!NT_STATUS_IS_OK(status)) { @@ -204,18 +207,18 @@ static bool test_lsa_ops(struct torture_context *tctx, struct dcerpc_pipe *p) return false; } - if (strcmp(r.out.account_name->string, "ANONYMOUS LOGON") != 0) { + if (strcmp(account_name_p->string, "ANONYMOUS LOGON") != 0) { printf("GetUserName returned wrong user: %s, expected %s\n", - r.out.account_name->string, "ANONYMOUS LOGON"); + account_name_p->string, "ANONYMOUS LOGON"); return false; } - if (!r.out.authority_name || !r.out.authority_name->string) { + if (!authority_name_p || !authority_name_p->string) { return false; } - if (strcmp(r.out.authority_name->string->string, "NT AUTHORITY") != 0) { + if (strcmp(authority_name_p->string, "NT AUTHORITY") != 0) { printf("GetUserName returned wrong user: %s, expected %s\n", - r.out.authority_name->string->string, "NT AUTHORITY"); + authority_name_p->string, "NT AUTHORITY"); return false; } } |