svn commit: samba r2199 - in branches/SAMBA_4_0/source: librpc/idl torture/rpc

tridge at samba.org tridge at samba.org
Fri Sep 3 05:16:25 GMT 2004


Author: tridge
Date: 2004-09-03 05:16:25 +0000 (Fri, 03 Sep 2004)
New Revision: 2199

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=2199&nolog=1

Log:
the unknown 16 bit number in lsa_LookupPrivDisplayName() is a language
ID, so the client can choose what language they get the privilege
description in.

this is the first time I've seen a language ID on the wire in CIFS.

Modified:
   branches/SAMBA_4_0/source/librpc/idl/lsa.idl
   branches/SAMBA_4_0/source/torture/rpc/lsa.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/lsa.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/lsa.idl	2004-09-02 22:51:12 UTC (rev 2198)
+++ branches/SAMBA_4_0/source/librpc/idl/lsa.idl	2004-09-03 05:16:25 UTC (rev 2199)
@@ -458,10 +458,11 @@
 	NTSTATUS lsa_LookupPrivDisplayName (
 		[in,ref]     policy_handle *handle,
 		[in,ref]     lsa_Name *name,
-		[in]         uint16 unknown,     /* 0x0409 */
-		[in]         uint16 unknown2,    /* 0x0409 */
 		[out]        lsa_Name *disp_name,
-		[out]        uint16 unknown3     /* 0x0409 */
+		/* see http://www.microsoft.com/globaldev/nlsweb/ for
+		   language definitions */
+		[in,out,ref] uint16 *language_id,
+		[in]         uint16 unknown
 		);
 
 	/* Function:        0x22 */

Modified: branches/SAMBA_4_0/source/torture/rpc/lsa.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/lsa.c	2004-09-02 22:51:12 UTC (rev 2198)
+++ branches/SAMBA_4_0/source/torture/rpc/lsa.c	2004-09-03 05:16:25 UTC (rev 2199)
@@ -642,19 +642,26 @@
 {
 	struct lsa_LookupPrivDisplayName r;
 	NTSTATUS status;
+	/* produce a reasonable range of language output without screwing up
+	   terminals */
+	uint16 language_id = (random() % 4) + 0x409;
 
 	printf("testing LookupPrivDisplayName(%s)\n", priv_name->name);
 	
 	r.in.handle = handle;
 	r.in.name = priv_name;
+	r.in.language_id = &language_id;
+	r.out.language_id = &language_id;
 	r.in.unknown = 0;
-	r.in.unknown2 = 0;
 
 	status = dcerpc_lsa_LookupPrivDisplayName(p, mem_ctx, &r);
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("LookupPrivDisplayName failed - %s\n", nt_errstr(status));
 		return False;
 	}
+	printf("%s -> \"%s\"  (language 0x%x/0x%x)\n", 
+	       priv_name->name, r.out.disp_name->name, 
+	       *r.in.language_id, *r.out.language_id);
 
 	return True;
 }



More information about the samba-cvs mailing list