summaryrefslogtreecommitdiffstats
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2002-09-02 13:47:51 +0000
committerVolker Lendecke <vlendec@samba.org>2002-09-02 13:47:51 +0000
commite0a8b7e0d0705c8f1597cc24cf62d830a5dea2ca (patch)
tree4adaa649d7b5a025bac880006e4878314ed7b49d /source3/rpc_server
parentd38ab3857f841dee9f7ec2170730b87d5af6e480 (diff)
downloadsamba-e0a8b7e0d0705c8f1597cc24cf62d830a5dea2ca.tar.gz
samba-e0a8b7e0d0705c8f1597cc24cf62d830a5dea2ca.tar.xz
samba-e0a8b7e0d0705c8f1597cc24cf62d830a5dea2ca.zip
usrmgr expects unicode as ProductType.
This looks a bit like a hack ;-) Volker (This used to be commit f673eac06ab4af97a4d28427f7444696402ae680)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_reg_nt.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c
index cd9596d2a72..f96de7e5339 100644
--- a/source3/rpc_server/srv_reg_nt.c
+++ b/source3/rpc_server/srv_reg_nt.c
@@ -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;
fstring name;
+ char *value_ascii = "";
+ fstring value;
+ int value_length;
REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol );
REGISTRY_VALUE *val = NULL;
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()) {
case ROLE_DOMAIN_PDC:
case ROLE_DOMAIN_BDC:
- regval_ctr_addvalue( &regvals, REGSTR_PRODUCTTYPE, REG_SZ, REG_PT_LANMANNT, strlen(REG_PT_LANMANNT)+1 );
+ value_ascii = REG_PT_LANMANNT;
break;
case ROLE_STANDALONE:
- regval_ctr_addvalue( &regvals, REGSTR_PRODUCTTYPE, REG_SZ, REG_PT_SERVERNT, strlen(REG_PT_SERVERNT)+1 );
+ value_ascii = REG_PT_SERVERNT;
break;
case ROLE_DOMAIN_MEMBER:
- regval_ctr_addvalue( &regvals, REGSTR_PRODUCTTYPE, REG_SZ, REG_PT_WINNT, strlen(REG_PT_WINNT)+1 );
+ value_ascii = REG_PT_WINNT;
break;
}
+ value_length = push_ucs2(value, value, value_ascii,
+ sizeof(value),
+ STR_TERMINATE|STR_NOALIGN);
+ regval_ctr_addvalue(&regvals, REGSTR_PRODUCTTYPE, REG_SZ,
+ value, value_length);
val = dup_registry_value( regval_ctr_specific_value( &regvals, 0 ) );