summaryrefslogtreecommitdiff
path: root/source4/torture/rap
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/rap')
-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 923a95de78..7622bddd5a 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;