summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/lsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/rpc/lsa.c')
-rw-r--r--source4/torture/rpc/lsa.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 1e6f8be990..3b7b65f779 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -21,6 +21,16 @@
#include "includes.h"
+/*
+ this makes the debug code display the right thing
+*/
+static void init_lsa_Name(struct lsa_Name *name, const char *s)
+{
+ name->name = s;
+ name->name_len = strlen_m(s)*2;
+ name->name_size = name->name_len;
+}
+
static BOOL test_OpenPolicy(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
struct lsa_ObjectAttribute attr;
@@ -114,9 +124,7 @@ static BOOL test_LookupNames(struct dcerpc_pipe *p,
names = talloc(mem_ctx, tnames->count * sizeof(names[0]));
for (i=0;i<tnames->count;i++) {
- names[i].name_len = 2*strlen(tnames->names[i].name.name);
- names[i].name_size = 2*strlen(tnames->names[i].name.name);
- names[i].name = tnames->names[i].name.name;
+ init_lsa_Name(&names[i], tnames->names[i].name.name);
}
r.in.handle = handle;