[jcifs] jcifs/jarapac errors trying to get apolicy_handle/SCmanager connection

Michael B Allen mba2000 at ioplex.com
Sat Dec 4 18:00:33 GMT 2004

On Sat, 04 Dec 2004 14:22:27 +0100
Marcus Crafter <crafterm at managesoft.com> wrote:

> > The easiest and simplest to do what you want (and probably the only way
> > to do it right) you need to write a Win32 program using the SC manager
> > calls necessary to perform the desired operation. Then take a packet
> > capture of that. Then write your Jarapac/JCIFS MSRPC test program
> > starting with the SC manager midl in jarapac/examples (I specifically
> > explored those calls after Michael asked about this a few weeks ago).
> > Then take a capture of that and open them side by side in Ethereal.
> Yes. This is the plan we've followed the past few weeks to get the 
> service related RPC calls Michael had submitted to work. As an aside we 
> did try with the latest midl compiler and jarapac code last week but 
> there seemed to be something preventing the generated code from 
> compiling (m_sid variable or similar that didn't seem to be referenced 
> anyware in the idl).

I'm not aware of any m_sid variable. Note that policy_handle and sid_t are
defined in rpc.idl so you'll need to import "rpc.idl" and run midlc/javac
on rpc.idl/rpc.java. Ditto for unicode_string and uuid_t if you run
into those. Try just the jarapac/examples/TestSvcctl.java first. Then
add your midl to the mix. Note that the MIDL Michael originally used
was wrong because the compiler was wrong. You're going to need to start
over as of midlc-0.5.1. Also, it might be a good exercise to run your
idl through MS' compiler to sanity check it as validation is midlc is
totally non-existant (I could run my grocery list through it and it
would actually generate code).

> If you'd like more information about this I can send in what we have. 
> Just thought I'd let you know.

Feel free to post whatever you have. I may not have a good answer for you
(really depends on how well you formulate the question) but right now
RPCs and Kerberos are the focus around here so I'm happy to see dialog
about it.


Greedo shoots first? Not in my Star Wars.

More information about the jcifs mailing list