diff options
author | Günther Deschner <gd@samba.org> | 2010-05-26 21:22:13 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-05-26 22:58:36 +0200 |
commit | 66e9b8c888c8c7b1bbb46c9e562bd5be1fd3118d (patch) | |
tree | 2a52a589893a4193a9c9c33c0c24f10d2610cf6f | |
parent | e94e13bd8d013d2c58cf4f2c647056b5a1b53e79 (diff) | |
download | samba-66e9b8c888c8c7b1bbb46c9e562bd5be1fd3118d.tar.gz samba-66e9b8c888c8c7b1bbb46c9e562bd5be1fd3118d.tar.bz2 samba-66e9b8c888c8c7b1bbb46c9e562bd5be1fd3118d.zip |
s4-smbtorture: add usergetinfo to RAP-SAM.
Guenther
-rw-r--r-- | source4/torture/rap/sam.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source4/torture/rap/sam.c b/source4/torture/rap/sam.c index 01493223b2..53b0512c2d 100644 --- a/source4/torture/rap/sam.c +++ b/source4/torture/rap/sam.c @@ -186,12 +186,37 @@ static bool test_oemchangepassword(struct torture_context *tctx, return ret; } +static bool test_usergetinfo(struct torture_context *tctx, + struct smbcli_state *cli) +{ + struct rap_NetUserGetInfo r; + int i; + uint16_t levels[] = { 0, 1, /*2,*/ 10, /*11*/ }; + + for (i=0; i < ARRAY_SIZE(levels); i++) { + + r.in.UserName = TEST_RAP_USER; + r.in.level = levels[i]; + r.in.bufsize = 8192; + + torture_comment(tctx, + "Testing rap_NetUserGetInfo(%s) level %d\n", r.in.UserName, r.in.level); + + torture_assert_ntstatus_ok(tctx, + smbcli_rap_netusergetinfo(cli->tree, tctx, &r), + "smbcli_rap_netusergetinfo failed"); + } + + return true; +} + struct torture_suite *torture_rap_sam(TALLOC_CTX *mem_ctx) { struct torture_suite *suite = torture_suite_create(mem_ctx, "SAM"); torture_suite_add_1smb_test(suite, "userpasswordset2", test_userpasswordset2); torture_suite_add_1smb_test(suite, "oemchangepassword", test_oemchangepassword); + torture_suite_add_1smb_test(suite, "usergetinfo", test_usergetinfo); return suite; } |