Samba login

Jeremy Allison jeremy at
Tue Nov 7 02:39:14 GMT 2000

Kenichi Okuyama wrote:

> If you are to open file, simply call open(), open() will check
> validness for you anyway.

For the open case only, this is true. But remember, we need to
know if this open did the create or not (for the SMB flag returns).
> If you need status of that file(like getting filesize), calling
> stat() for getting information is enough, you don't need extra
> stat() call for validness checking.

Yes - hurrah ! You have got to the point I did when I re-wrote
the code in Miami :-).

For any call that does information retrieval, the stat() call in
the statcache returns the SMB_STAT_STRUCT into the main SMB
processing function, and then uses it. 

It no longer does additional stats for these calls.

> So, it's useless to check for validness of path generated by
> statcache. It is needed to re-check validness of each directory list
> cache, if you're caching. But final result don't need validness
> checking.

This would work. It would require some restructuring of the
layering in Samba - but I'll definately start looking into
this - thanks !


Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba-technical mailing list