[jcifs] Hosts and shares enumeration
eglass1 at comcast.net
eglass1 at comcast.net
Tue Jun 29 13:18:46 GMT 2004
Looking at this, I also noticed that the getSmbTransport call on line 638 is still
using a hardcoded "0" port. This might have been intentional -- I just noticed
that the others were changed to url.getPort(), so it kind of jumped out at me.
Eric
-------------- Original message --------------
> Hi, All !
>
> I see one small issue in jcifs(version 0.9.3).
>
> SmbFile doesn't inherit auth information on the listFiles method.
>
> So, when I run
> auth = new NtlmPasswordAuthentication(domain, username, password);
> workgroup = new SmbFile("smb://myworkgroupname/", auth);
> SmbFile[] hosts = workgroup.listFiles();
> It returns list of all hosts in workgroup.
>
> Next, I'm tring to retrieve shares list from hosts:
> SmbFile[] shares = host[0].listFiles();
> And I see SmbAuthException(Access is denied).
>
> When I try this code:
> SmbFile hostToList = new SmbFile(workgroup, host[0].getName, auth);
> SmbFile[] shares = host[0].listFiles();
> It works fine.
>
> Also, when I enumerate share, then I can't enumerate directories, because I
> see SmbAuthException.
>
>
> WBR, Alex.
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the jcifs
mailing list