When I use 'svc', which compiled from examples/libmsrpc/test/svcctl/svc.c, I found a bug in listting services: if there are utf-8 chars(such as Chinese) in services displayname,we can only see a part of the string. By debugging,I found the bug is from cac_unistr_ascii() function, ------ source/libmsrpc/libmsrpc_internal.c:687 char *cac_unistr_ascii( TALLOC_CTX * mem_ctx, UNISTR src ) { char *buf; uint32 len; if ( !mem_ctx || !src.buffer ) return NULL; len = unistrlen( src.buffer ) + 1; buf = TALLOC_ZERO_ARRAY( mem_ctx, char, len ); if ( !buf ) return NULL; rpcstr_pull( buf, src.buffer, len, -1, STR_TERMINATE ); // the 'len' is too short when conver to utf-8 : unicode string length is not equal to utf-8 string length,in this function, I use len*4 as the 3th param. return buf; } ------
The libmsrpc code is currently unmaintained and has been removed in the upcoming 3.2.0 release. Marking as LATER in hopes that someone steps up.