[jcifs] midlc-0.5.2 / jarapac-0.3.8 released / Critical Fixes, LsaLookupSids, and winreg.idl

Michael B Allen mba2000 at ioplex.com
Thu Dec 16 08:10:28 GMT 2004

It  has  been known for some time that decoder routines of Java stubs would
need  to be adjusted to allocate objects as necessary. In addition to plain
objects  such  as  lsa_TrustInformation.sid any embedded objects and arrays
need  to  be  allocated  on  the  fly if they are null unlike in C where an
embedded  object  occupies the memory of the enclosing structure. The issue
became  a  show  stopper  when  implementing  the somewhat more complicated
lsa_LookupSids  function.  So the Java emitter has been modified to perform 
this  allocation.  There  are  two  instances  that  are  still outstanding
however.  One  is  unions.  The  Java  stubs do not actually create a class 
definition  for a union. Instead inheritence is used. The type of the union
arm  is  used  in  it's place. Functions that accept unions accept the very
generic  NdrObject  that  all Java stub class definitions extend. It is not
clear how an embedded or [out] only union will be handled. The second issue
is  custom  classes  that  require  constructor  parameters.  Consider  the
UnicodeString  class.  This  class has an alternate contructor that permits 
specifying  wheather  or not the string is zero terminated. It is not clear
how  an  emdedded  or  [out]  only  rpc.unicode_string  that  is  not  zero
terminated will be handled. 

Also  an  alignment bug was fixed. A pointer to a type smaller than 4 would 
have an alignment of the ndr_size of the type (e.g. short was 2 rather than

Finally, jarapac has some updated idl including LsaLookupSids (thanks Ralf)
and the beginnings of some winreg.idl 


Greedo shoots first? Not in my Star Wars.

More information about the jcifs mailing list