libmsrpc feedback

Chris Nicholls cnicholl at
Tue Aug 16 17:00:17 GMT 2005

>>Whenever you get a chance to look at the libmsrpc code, I wouldn't mind
>>hearing your comments on cac_SamGetNamesFromRids(), which calls
>>cli_samr_lookup_rids().  Basically what I've done is return return 2
>>arrays, one has the names that were looked up, and the other has the
>>RIDs that couldnt be found.  However, in order to preserve a mapping
>>between RIDs and names, it also has to return another array that
>>contains the RIDs that were found.
>Why not deal with an array of a structure like
>struct cac_LookupRidsRecord {
>	char *name;
>	uint32 rid;
>	NTSTATUS status;
>Then a developer would know whether a given name was mapped by
>checking NT_STATUS_IS_OK( array[i].status ).
Do you have a problem with using a BOOL instead?

struct cac_LookupRidsRecord {
	char *name;
	uint32 rid;
	BOOL found;

then you could use if(array[i].found)

I guess there isnt that much difference either way...


More information about the samba-technical mailing list