1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3-lsa: avoid all init_lsa* functions.

Guenther
This commit is contained in:
Günther Deschner 2008-12-08 18:03:01 +01:00
parent b0f7137883
commit e2fa47a04c
2 changed files with 27 additions and 35 deletions

View File

@ -50,23 +50,17 @@ NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli,
struct lsa_QosInfo qos;
uint16_t system_name = '\\';
ZERO_STRUCT(attr);
attr.len = 0x18;
if (sec_qos) {
init_lsa_sec_qos(&qos, 0xc, 2, 1, 0);
init_lsa_obj_attr(&attr,
0x18,
NULL,
NULL,
0,
NULL,
&qos);
} else {
init_lsa_obj_attr(&attr,
0x18,
NULL,
NULL,
0,
NULL,
NULL);
qos.len = 0xc;
qos.impersonation_level = 2;
qos.context_mode = 1;
qos.effective_only = 0;
attr.sec_qos = &qos;
}
return rpccli_lsa_OpenPolicy(cli, mem_ctx,
@ -88,23 +82,17 @@ NTSTATUS rpccli_lsa_open_policy2(struct rpc_pipe_client *cli,
struct lsa_ObjectAttribute attr;
struct lsa_QosInfo qos;
ZERO_STRUCT(attr);
attr.len = 0x18;
if (sec_qos) {
init_lsa_sec_qos(&qos, 0xc, 2, 1, 0);
init_lsa_obj_attr(&attr,
0x18,
NULL,
NULL,
0,
NULL,
&qos);
} else {
init_lsa_obj_attr(&attr,
0x18,
NULL,
NULL,
0,
NULL,
NULL);
qos.len = 0xc;
qos.impersonation_level = 2;
qos.context_mode = 1;
qos.effective_only = 0;
attr.sec_qos = &qos;
}
return rpccli_lsa_OpenPolicy2(cli, mem_ctx,

View File

@ -198,7 +198,9 @@ static NTSTATUS lookup_lsa_rids(TALLOC_CTX *mem_ctx,
mapped_count++;
}
init_lsa_translated_sid(&prid[i], type, rid, dom_idx);
prid[i].sid_type = type;
prid[i].rid = rid;
prid[i].sid_index = dom_idx;
}
*pmapped_count = mapped_count;
@ -768,8 +770,10 @@ static NTSTATUS _lsa_lookup_sids_internal(pipes_struct *p,
mapped_count += 1;
}
init_lsa_translated_name2(&names[i], name->type,
name->name, name->dom_idx, 0);
names[i].sid_type = name->type;
names[i].name.string = name->name;
names[i].sid_index = name->dom_idx;
names[i].unknown = 0;
}
status = NT_STATUS_NONE_MAPPED;