diff options
author | Günther Deschner <gd@samba.org> | 2009-06-17 01:30:22 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-06-17 01:30:22 +0200 |
commit | fbe85c70ef0aed6ff3c20585ae1f001c0417665c (patch) | |
tree | 8f151c8cc5eaec155f844793494a7195141ed490 | |
parent | bdd214b38c9c97550cf8122f75c6a14e0b0397d0 (diff) | |
download | samba-fbe85c70ef0aed6ff3c20585ae1f001c0417665c.tar.gz samba-fbe85c70ef0aed6ff3c20585ae1f001c0417665c.tar.bz2 samba-fbe85c70ef0aed6ff3c20585ae1f001c0417665c.zip |
s4-smbtorture: add test for NetUserSetInfo level 0 (user rename).
Guenther
-rw-r--r-- | source4/torture/libnetapi/libnetapi_user.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source4/torture/libnetapi/libnetapi_user.c b/source4/torture/libnetapi/libnetapi_user.c index 7269988163..2731cbd772 100644 --- a/source4/torture/libnetapi/libnetapi_user.c +++ b/source4/torture/libnetapi/libnetapi_user.c @@ -349,6 +349,7 @@ bool torture_libnetapi_user(struct torture_context *tctx) uint32_t getgr_levels[] = { 0, 1 }; int i; + struct USER_INFO_0 u0; struct USER_INFO_1007 u1007; uint32_t parm_err = 0; @@ -430,11 +431,21 @@ bool torture_libnetapi_user(struct torture_context *tctx) } } + torture_comment(tctx, "testing NetUserSetInfo level 0\n"); + + u0.usri0_name = TORTURE_TEST_USER2; + + status = NetUserSetInfo(hostname, TORTURE_TEST_USER, 0, (uint8_t *)&u0, &parm_err); + if (status) { + NETAPI_STATUS(tctx, ctx, status, "NetUserSetInfo"); + goto out; + } + /* delete */ torture_comment(tctx, "testing NetUserDel\n"); - status = NetUserDel(hostname, TORTURE_TEST_USER); + status = NetUserDel(hostname, TORTURE_TEST_USER2); if (status) { NETAPI_STATUS(tctx, ctx, status, "NetUserDel"); goto out; @@ -442,7 +453,7 @@ bool torture_libnetapi_user(struct torture_context *tctx) /* should not exist anymore */ - status = NetUserGetInfo(hostname, TORTURE_TEST_USER, 0, &buffer); + status = NetUserGetInfo(hostname, TORTURE_TEST_USER2, 0, &buffer); if (status == 0) { NETAPI_STATUS(tctx, ctx, status, "NetUserGetInfo"); status = -1; |