[jcifs] Calling NetServerEnum2 with no domain parameter

Michael B Allen ioplex at gmail.com
Fri Jun 24 21:33:54 MDT 2011


The 1.3.16 release now uses the correct parameter descriptors for the
NetrServerEnum2 RAP call.

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/

On Thu, Nov 12, 2009 at 8:26 AM, Chris Bearchell
<chris-bearchell at softwareimaging.com> wrote:
> Hi,
>
> I have an application, running on a phone, from which I would like to enumerate
> available domains/workgroups. I've been trying the following:
>
> SmbFile root = new SmbFile("smb://", NtlmPasswordAuthentication.ANONYMOUS);
> SmbFile[] domains = root.listFiles();
>
> The problem I was seeing was that the server responds with error 2320 (The
> computer is not active in this domain). Digging deeper with Wireshark I noticed
> that when calling the Windows API NetServerEnum() I see the following
> NetServerEnum2 request:
>
> Microsoft Windows Lanman Remote API Protocol
>  Function Code: NetServerEnum2 (104)
>  Parameter Descriptor: WrLehDO
>  Return Descriptor: B16BBDz
>  Detail Level: 1
>  Receive Buffer Length: 4200
>  Server Type: 0x80000000
>  Enumeration Domain (Null pointer)
>
> However, from the phone I see the following request
>
> Microsoft Windows Lanman Remote API Protocol
>  Function Code: NetServerEnum2 (104)
>  Parameter Descriptor: WrLehDz
>  Return Descriptor: B16BBDz
>  Detail Level: 1
>  Receive Buffer Length: 16384
>  Server Type: 0x80000000
>  Enumeration Domain (Null pointer)
>
> The obvious difference was the parameter descriptor, which put me on to the
> following from the Microsoft Open Specifications Developer Center:
>
> http://msdn.microsoft.com/en-us/library/cc240217%28PROT.10%29.aspx
> 'ParamDesc (variable): MUST be set to "WrLehDO" if the Domain parameter is not
> specified, or set to "WrLehDz".'
>
>
> Looking at NetServerEnum2.java, "WrLehDz" is always specified for a
> NetServerEnum2 request regardless of the domain parameter. I would like to
> contribute a fix for this issue. I am new to jCIFS and this list and am not sure
> on how I can proceed. Could someone on the list advise?
>
> Thanks,
> Chris
>
>
>


More information about the jCIFS mailing list