mirror of
https://github.com/samba-team/samba.git
synced 2024-12-31 17:18:04 +03:00
usrmgr expects unicode as ProductType.
This looks a bit like a hack ;-) Volker
This commit is contained in:
parent
8fb4534212
commit
f673eac06a
@ -342,6 +342,9 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
|
|||||||
{
|
{
|
||||||
NTSTATUS status = NT_STATUS_NO_SUCH_FILE;
|
NTSTATUS status = NT_STATUS_NO_SUCH_FILE;
|
||||||
fstring name;
|
fstring name;
|
||||||
|
char *value_ascii = "";
|
||||||
|
fstring value;
|
||||||
|
int value_length;
|
||||||
REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol );
|
REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol );
|
||||||
REGISTRY_VALUE *val = NULL;
|
REGISTRY_VALUE *val = NULL;
|
||||||
REGISTRY_VALUE emptyval;
|
REGISTRY_VALUE emptyval;
|
||||||
@ -380,15 +383,20 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
|
|||||||
switch (lp_server_role()) {
|
switch (lp_server_role()) {
|
||||||
case ROLE_DOMAIN_PDC:
|
case ROLE_DOMAIN_PDC:
|
||||||
case ROLE_DOMAIN_BDC:
|
case ROLE_DOMAIN_BDC:
|
||||||
regval_ctr_addvalue( ®vals, REGSTR_PRODUCTTYPE, REG_SZ, REG_PT_LANMANNT, strlen(REG_PT_LANMANNT)+1 );
|
value_ascii = REG_PT_LANMANNT;
|
||||||
break;
|
break;
|
||||||
case ROLE_STANDALONE:
|
case ROLE_STANDALONE:
|
||||||
regval_ctr_addvalue( ®vals, REGSTR_PRODUCTTYPE, REG_SZ, REG_PT_SERVERNT, strlen(REG_PT_SERVERNT)+1 );
|
value_ascii = REG_PT_SERVERNT;
|
||||||
break;
|
break;
|
||||||
case ROLE_DOMAIN_MEMBER:
|
case ROLE_DOMAIN_MEMBER:
|
||||||
regval_ctr_addvalue( ®vals, REGSTR_PRODUCTTYPE, REG_SZ, REG_PT_WINNT, strlen(REG_PT_WINNT)+1 );
|
value_ascii = REG_PT_WINNT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
value_length = push_ucs2(value, value, value_ascii,
|
||||||
|
sizeof(value),
|
||||||
|
STR_TERMINATE|STR_NOALIGN);
|
||||||
|
regval_ctr_addvalue(®vals, REGSTR_PRODUCTTYPE, REG_SZ,
|
||||||
|
value, value_length);
|
||||||
|
|
||||||
val = dup_registry_value( regval_ctr_specific_value( ®vals, 0 ) );
|
val = dup_registry_value( regval_ctr_specific_value( ®vals, 0 ) );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user