Stefan (metze) Metzmacher metze at samba.org
Wed May 18 13:51:53 GMT 2005

Hash: SHA1

Volker Lendecke schrieb:
> Hi!
> As per metze's request, here is my current unixinfo idl. It needs changing,
> for speed reasons i want the getpwuid operation to take an array of uid's and
> give back the corresponding array of records. Maybe someone can help me
> getting the correct idl syntax for this?
> BTW, this is for winbind retrieving the id map from a samba DC so that you
> don't need nss_ldap and/or idmap_ldap anymore.
> Thanks,
> Volker
> 	/******************/
> 	/* Function: 0x04 */
> 	NTSTATUS unixinfo_GetPWUid (
> 	    [in]	hyper uid,
> 	    [out]	utf8string gecos,
> 	    [out]	utf8string homedir,
> 	    [out]	utf8string shell
> 	    );
> }

you should maybe use something like this:
	typedef struct {
		uint32 count;
		[size_is(count)] hyper uids[];
	} unixinfo_GetPWUidRequest1;

	typedef [switch_type(int32)] union {
		[case(1)] unixinfo_GetPWUidRequest1 req1;
	} unixinfo_GetPWUidRequest;

	typedef struct {
		utf8string gecos;
		utf8string homedir;
		utf8string shell;
	} unixinfo_GetPWUidInfo1;

	typedef struct {
		uint32 count;
		[size_is(count)] unixinfo_GetPWUidInfo1 infos[];
	} unixinfo_GetPWUidReply1;

	typedef [switch_type(int32)] union {
		[case(1)] unixinfo_GetPWUidReply1 req1;
	} unixinfo_GetPWUidReply;

	NTSTATUS unixinfo_GetPWUid (
		[in,out]		int32 level,
		[in,switch_is(level)]	unixinfo_GetPWUidRequest req,
		[out,switch_is(level)]	unixinfo_GetPWUidReply rep

BTW: all functions should use this toplevel structure, to handle future updates and new info levels

also I think it would make sense to return the domain and account name too.
or maybe add another info level to get this info too

- --

Stefan Metzmacher <metze at samba.org> www.samba.org

More information about the samba-technical mailing list