diff options
author | Volker Lendecke <vlendec@samba.org> | 2002-09-02 13:47:51 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2002-09-02 13:47:51 +0000 |
commit | e0a8b7e0d0705c8f1597cc24cf62d830a5dea2ca (patch) | |
tree | 4adaa649d7b5a025bac880006e4878314ed7b49d /source3/rpc_server | |
parent | d38ab3857f841dee9f7ec2170730b87d5af6e480 (diff) | |
download | samba-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.c | 14 |
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( ®vals, REGSTR_PRODUCTTYPE, REG_SZ, REG_PT_LANMANNT, strlen(REG_PT_LANMANNT)+1 ); + value_ascii = REG_PT_LANMANNT; break; 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; 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; } + 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 ) ); |