[jcifs] filtering the users home share (Was Re: davenport filters)

Michael B Allen mba2000 at ioplex.com
Fri Dec 17 21:54:33 GMT 2004


On Fri, 17 Dec 2004 11:37:42 +0000 (UTC)
Mike Manley <Mike at technomyth.co.uk> wrote:

> At the moment, modifying jcifs.smb.smbFile to give access to the
> information I want would seem the simplest way of doing this. My only
> other option would be to dig deeper into the internal of davenport to see
> if I can somehow pass the username through to the file filter as part of
> the init.

What attributes are in the HttpSession? You could modify davenport to
add a "username" attribute or something like that.

I an not entirely against the idea of adding:

public Principal getPrincipal() {
	return auth;
}

Then you can do:

String username = f.getPrincipal().getName();

I only hesitate because the plan is to stop development of 1.x and work
on 2.x. But this is a pretty simple change. I'll think about it.

In 2.x when we try to integrate subject based security more things will be
very different. I believe the security context should probably be associated
with the current thread (the only problem with that is that without language
support the security context cannot easily be inherited).

Mike

-- 
Greedo shoots first? Not in my Star Wars.


More information about the jcifs mailing list