mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
init samr and lsa names so the debug display looks right
(This used to be commit 343728fad4
)
This commit is contained in:
parent
13e10b47fb
commit
7f086443f5
@ -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;
|
||||
|
@ -21,6 +21,17 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
|
||||
/*
|
||||
this makes the debug code display the right thing
|
||||
*/
|
||||
static void init_samr_Name(struct samr_Name *name, const char *s)
|
||||
{
|
||||
name->name = s;
|
||||
name->name_len = strlen_m(s)*2;
|
||||
name->name_size = name->name_len;
|
||||
}
|
||||
|
||||
static BOOL test_Close(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||
struct policy_handle *handle)
|
||||
{
|
||||
@ -69,7 +80,7 @@ static BOOL test_CreateUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||
uint32 rid;
|
||||
struct samr_Name name;
|
||||
|
||||
name.name = "samrtorturetest";
|
||||
init_samr_Name(&name, "samrtorturetest");
|
||||
|
||||
r.in.handle = handle;
|
||||
r.in.username = &name;
|
||||
|
Loading…
Reference in New Issue
Block a user