summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/selftest/knownfail1
-rw-r--r--source4/torture/rap/rap.c25
2 files changed, 26 insertions, 0 deletions
diff --git a/source4/selftest/knownfail b/source4/selftest/knownfail
index aff03a58e2..a9cc4446c4 100644
--- a/source4/selftest/knownfail
+++ b/source4/selftest/knownfail
@@ -39,6 +39,7 @@ samba4.rpc.samr.passwords.lockout
samba4.base.charset.*.Testing partial surrogate
.*net.api.delshare.* # DelShare isn't implemented yet
samba4.rap.*netservergetinfo
+samba4.rap.*netsessionenum
samba4.smb2.persistent.handles1
samba4.winbind.struct.*.show_sequence # Not yet working in winbind
samba4.winbind.struct.*.getpwent # Not yet working in winbind
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 8d70b2cf70..ae505b9e31 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -1609,6 +1609,29 @@ static NTSTATUS smbcli_rap_netsessionenum(struct smbcli_tree *tree,
return result;
}
+static bool test_netsessionenum(struct torture_context *tctx,
+ struct smbcli_state *cli)
+{
+ struct rap_NetSessionEnum r;
+ int i;
+ uint16_t levels[] = { 2 };
+
+ for (i=0; i < ARRAY_SIZE(levels); i++) {
+
+ r.in.level = levels[i];
+ r.in.bufsize = 8192;
+
+ torture_comment(tctx,
+ "Testing rap_NetSessionEnum level %d\n", r.in.level);
+
+ torture_assert_ntstatus_ok(tctx,
+ smbcli_rap_netsessionenum(cli->tree, tctx, &r),
+ "smbcli_rap_netsessionenum failed");
+ }
+
+ return true;
+}
+
bool torture_rap_scan(struct torture_context *torture, struct smbcli_state *cli)
{
int callno;
@@ -1644,6 +1667,8 @@ NTSTATUS torture_rap_init(void)
test_netshareenum);
torture_suite_add_1smb_test(suite_basic, "netservergetinfo",
test_netservergetinfo);
+ torture_suite_add_1smb_test(suite_basic, "netsessionenum",
+ test_netsessionenum);
torture_suite_add_1smb_test(suite, "scan", torture_rap_scan);