From 823681bc9965b58404afda205782896c8226d053 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 17 Jun 2009 01:06:14 +0200 Subject: s4-smbtorture: use TORTURE_TEST_USER define in libnetapi user test. Guenther --- source4/torture/libnetapi/libnetapi_user.c | 32 ++++++++++++++---------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'source4') diff --git a/source4/torture/libnetapi/libnetapi_user.c b/source4/torture/libnetapi/libnetapi_user.c index c6343301e3..7269988163 100644 --- a/source4/torture/libnetapi/libnetapi_user.c +++ b/source4/torture/libnetapi/libnetapi_user.c @@ -22,7 +22,8 @@ #include #include "torture/libnetapi/proto.h" -#define TORTURE_TEST_USER "testuser" +#define TORTURE_TEST_USER "torture_testuser" +#define TORTURE_TEST_USER2 "torture_testuser2" #define NETAPI_STATUS(tctx, x,y,fn) \ torture_warning(tctx, "FAILURE: line %d: %s failed with status: %s (%d)\n", \ @@ -342,7 +343,6 @@ static NET_API_STATUS test_netusergetgroups(struct torture_context *tctx, bool torture_libnetapi_user(struct torture_context *tctx) { NET_API_STATUS status = 0; - const char *username, *username2; uint8_t *buffer = NULL; uint32_t levels[] = { 0, 1, 2, 3, 4, 10, 11, 20, 23 }; uint32_t enum_levels[] = { 0, 1, 2, 3, 4, 10, 11, 20, 23 }; @@ -360,16 +360,14 @@ bool torture_libnetapi_user(struct torture_context *tctx) torture_comment(tctx, "NetUser tests\n"); - username = "torture_test_user"; - username2 = "torture_test_user2"; - /* cleanup */ - NetUserDel(hostname, username); - NetUserDel(hostname, username2); + + NetUserDel(hostname, TORTURE_TEST_USER); + NetUserDel(hostname, TORTURE_TEST_USER2); /* add a user */ - status = test_netuseradd(tctx, hostname, username); + status = test_netuseradd(tctx, hostname, TORTURE_TEST_USER); if (status) { NETAPI_STATUS(tctx, ctx, status, "NetUserAdd"); goto out; @@ -379,7 +377,7 @@ bool torture_libnetapi_user(struct torture_context *tctx) for (i=0; i