summaryrefslogtreecommitdiffstats
path: root/source4/torture/rap/rap.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-03-15 16:35:58 +0100
committerGünther Deschner <gd@samba.org>2011-03-15 21:16:35 +0100
commitebe0aa0e9cf8440c85c168e6ce7e8bc755d458a4 (patch)
tree4c318e7269d228855f79c9c3236748fb8495f12f /source4/torture/rap/rap.c
parent7a91282c9fb114e1ef52f89da4c6719683a623e5 (diff)
downloadsamba-ebe0aa0e9cf8440c85c168e6ce7e8bc755d458a4.tar.gz
samba-ebe0aa0e9cf8440c85c168e6ce7e8bc755d458a4.tar.xz
samba-ebe0aa0e9cf8440c85c168e6ce7e8bc755d458a4.zip
s4-smbtorture: check for username and computername presence in rap_netsessionenum test.
Guenther
Diffstat (limited to 'source4/torture/rap/rap.c')
-rw-r--r--source4/torture/rap/rap.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 923a95de78e..7622bddd5a7 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -1612,7 +1612,7 @@ static bool test_netsessionenum(struct torture_context *tctx,
struct smbcli_state *cli)
{
struct rap_NetSessionEnum r;
- int i;
+ int i,n;
uint16_t levels[] = { 2 };
for (i=0; i < ARRAY_SIZE(levels); i++) {
@@ -1626,6 +1626,25 @@ static bool test_netsessionenum(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx,
smbcli_rap_netsessionenum(cli->tree, tctx, &r),
"smbcli_rap_netsessionenum failed");
+
+ for (n=0; n < r.out.count; n++) {
+ switch (r.in.level) {
+ case 2:
+ torture_comment(tctx, "ComputerName: %s\n",
+ r.out.info[n].info2.ComputerName);
+
+ torture_comment(tctx, "UserName: %s\n",
+ r.out.info[n].info2.UserName);
+
+ torture_assert(tctx, r.out.info[n].info2.ComputerName,
+ "ComputerName empty");
+ torture_assert(tctx, r.out.info[n].info2.UserName,
+ "UserName empty");
+ break;
+ default:
+ break;
+ }
+ }
}
return true;