convert_string + librpc/ndr (via openchange) == fail

sean finney seanius at
Wed May 18 01:33:31 MDT 2011

Hi Andrew,

On Wed, May 18, 2011 at 03:00:33PM +1000, Andrew Bartlett wrote:
> > them to handle it as they see fit (they may, for example, internally convert
> > them to unicode before displaying them, allowing the client to reply in
> > unicode).  If ndr_pull_string isn't the right function for that (which it
> > sounds like it isn't), I guess there'd need to be an addition to the API and
> > any code templating tools like pidl to allow pulling a null-terminated
> > uint8 buffer.
> It seems pretty clear we need an 8BIT flag or new string type.  I can't
> see a good way that PIDL would be able to handle the string conversion
> here, so as you suggest, you will need to code them manually on the
> OpenChange side of things.

Wouldn't it be possible to have a new flag, LIBNDR_FLAG_STR_RAW or similar,
which could change the behavior of ndr_pull_string?  i.e.:

	#define bstring	[flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_STR_RAW)] string

which could be used in ndr_pull_string to skip the calls to convert_string().

In the meantime, I've confirmed that going back to just before "allow
badchars" patch (cd4306b0^ to be specific), libmapi and openchangeclient
function normally.

If any openchange devs are following this thread, I think now would be
a good time to chime in...


More information about the samba-technical mailing list