Samba caching directory handles? (Writes to incorrect home dir)

Andrew Bartlett abartlet at pcug.org.au
Tue May 15 13:14:40 GMT 2001


James Sutherland wrote:
> 
> On Tue, 15 May 2001, Andrew Bartlett wrote:
> > James Sutherland wrote:
> > > On Tue, 15 May 2001, Andrew Bartlett wrote:
> > > > James Sutherland wrote:
> > > > > On Tue, 15 May 2001, Andrew Bartlett wrote:
> > > > >
> 
> > > It is: Windows caches the connection even after you log out. Stupid,
> > > broken and insecure, but unless you're planning to send Microsoft a patch
> > > to fix it, I think we're stuck with it :-)
> >
> > But the connection can't be resumed without another session setup, and
> > hence another utmp entry.  Can it?
> 
> It isn't resumed, it's been retained from the previous session.

The vuid is dead at this point, as the user has logged out, and this has
been recorded in utmp/wtmp.  The only way to a valid vuid is with a
username and password, and on generation of that vuid the utmp/wtmp
entires are again updated.  Correct?  (Similarly for PAM session
modules).

> > > The "feature" of \\server\homes doesn't work properly, and since this is a
> > > Windows bug not a Samba one, there's nothing that can be done. Either
> > > change to using \\server\username (which should be transparent, at least
> > > if you're using something like NET USE /HOME) or put up with Windows
> > > occasionally getting different users mixed up.
> >
> > These are NOT domain logons, they are file-share connects from NT
> > machines in a compleatly different administrative domain.
> >
> > In any case, the problem with the \homes thing was the the previous
> > connection would NOT allow users to access their new profile due to
> > permissions.
> 
> Or rather, Windows would access the previous user's files (and fail),
> because it would have cached the previous user's \\server\homes
> connection.
> 
> > There is no permissions error in this case, the files
> > appear contary to a mode 0700 directory.
> 
> Hrm. Yes, that's a little different from the symptoms cited as reasons
> never to use \\server\homes - but since this "feature" doesn't work
> anyway, it isn't thoroughly understood :-)
> 

The feature is quite simple, the code in reply.c simply places
'username' in the place of 'homes' and recalls the function, it only
gets interesting when windows starts making assumptions.  In any case, I
don't think the bug lies here.

Andrew Bartlett
abartlet at pcug.org.au

-- 
Andrew Bartlett
abartlet at pcug.org.au




More information about the samba-technical mailing list