[jcifs] Bug listing available shares
Allen, Michael B (RSCH)
Michael_B_Allen at ml.com
Tue Jan 15 16:34:10 GMT 2002
Hi samba-technical,
The NetShareEnum response from samba 2.2 and 2.0.9 at least are returning home
directories of other users if new sessions with different credentials are created over existing
transport. Are you aware of this issue? Is there anything we can do about it?
Mike
> -----Original Message-----
> From: Rob Wygand [SMTP:rob at wygand.com]
> Sent: Tuesday, January 15, 2002 1:46 PM
> To: Allen, Michael B (RSCH)
> Cc: jcifs at samba.org
> Subject: Re: [jcifs] Bug listing available shares
>
> Mike,
>
> It *seems* wrong that user X can see user Y's home dir, simply because
> user Y logged into the (our) system first, which is what's happening.
> From what I understand, you should only ever see your home share.
>
<snip>
> rjw
>
> Allen, Michael B (RSCH) wrote:
>
> > Are you using Samba? I just ran this against Samba and I get:
> >
> > [miallen at miallen2 examples]$ java SmnTest
> > smb://miallen:pass1@172.134.34.39
> > tmp
> > IPC$
> > lp
> > miallen
> > smb://foo:pass2@172.134.34.39
> > tmp
> > IPC$
> > lp
> > miallen
> > foo
> > smb://bar:pass3@172.134.34.39
> > tmp
> > IPC$
> > lp
> > miallen
> > foo
> > bar
> >
<snip>
> >
> > I think the problem is a bad interaction with jCIFS reusing the socket
> > and Samba's dynamic generation of home shares. We could slide
> > over to samba technical and ask them about it?
> >
> > Mike
> >
> >
> >>-----Original Message-----
> >>From: Rob Wygand [SMTP:rob at wygand.com]
> >>Sent: Monday, January 14, 2002 8:47 PM
> >>To: jcifs at samba.org
> >>Subject: [jcifs] Bug listing available shares
> >>
> >>Mike,
> >>
> >>When listing shares, I'm seeing some weird caching issue. Basically, if
> >>I list shares on a server as user1, then as user2 I see the home share I
> >>saw in the user1 listing. Then if I list again as user1, I see the
> >>user2's home dir. These should not be showing up at all. here's a sample
> >>program and it's output:
> >>
> >>===== SmnTest.java =====
> >>import jcifs.smb.*;
> >>
> >>public class SmbTest extends Object
> >>{
> >> public static void main (String[] args)
> >> {
> >> try
> >> {
> >> SmbFile[] files = null;
> >>
> >> SmbFile a = new SmbFile ("smb://DOMAIN;user1:pass@10.1.3.161/");
> >> System.out.println (a.getCanonicalPath());
> >> files = a.listFiles();
> >> for (int i = 0; i < files.length; ++i)
> >> {
> >> System.out.println ("\t" + files[i].getName());
> >> }
> >>
> >> SmbFile b = new SmbFile ("smb://DOMAIN;user2:pass2@10.1.3.161/");
> >> System.out.println (a.getCanonicalPath());
> >> files = b.listFiles();
> >> for (int i = 0; i < files.length; ++i)
> >> {
> >> System.out.println ("\t" + files[i].getName());
> >> }
> >>
> >> SmbFile c = new SmbFile ("smb://DOMAIN;user1:pass@10.1.3.161/");
> >> System.out.println (a.getCanonicalPath());
> >> files = c.listFiles();
> >> for (int i = 0; i < files.length; ++i)
> >> {
> >> System.out.println ("\t" + files[i].getName());
> >> }
> >> }
> >> catch (Exception e)
> >> {
> >> System.out.println ("Exception: " + e.toString());
> >> }
> >> }
> >>}
> >>
> >>===== Sample Output =====
> >>[rob at elbereth]$ /usr/java/jdk1.3.1_01/bin/java SmbTest
> >>
> >>smb://DOMAIN;user1:pass@10.1.3.161
> >> rootdir
> >> CVSROOT
> >> IPC$
> >> user1
> >>smb://DOMAIN;user2:pass2@10.1.3.161
> >> rootdir
> >> CVSROOT
> >> IPC$
> >> user1
> >> user2
> >>smb://DOMAIN;user1:pass@10.1.3.161
> >> rootdir
> >> CVSROOT
> >> IPC$
> >> user1
> >> user2
> >>
> >
>
More information about the samba-technical
mailing list