[Samba] Using SMB_VFS_IS_OFFLINE for directories.

Dean Roehrich dean.roehrich at quantum.com
Fri Jul 18 14:53:37 MDT 2014

On 07/18/2014 12:41 PM, Jeremy Allison wrote:
> On Thu, Jul 17, 2014 at 01:18:41PM -0500, Dean Roehrich wrote:
>> I made a small change to source3/smbd/dosmode.c to let my plugin on
>> my linux box return FILE_ATTRIBUTE_OFFLINE for directories, and so
>> far Windows (2008) seems okay with it.  It displays the folder icon
>> with the "X" over it and it navigates the folder hierarchy without
>> trouble (so far).
>> I can see that the SMB_VFS_IS_OFFLINE code went in originally for
>> DMAPI support (Bokovoy, Jan 2008, commit d86fc3ec) and that DMAPI
>> doesn't have the concept of punching a directory like it does for
>> files.  So that would explain the limitation in the original code.
>> But, has anyone used this for directories?
> Not that I know of. Can you post your patch so
> we can take a look ?
> Do you have any test code that will allow us to
> ensure this doesn't break anything (preferably
> something that runs against Windows first :-) ?
> Jeremy.

I've attached the patch.

Right now the only testing I've done is to have a plugin that always 
returns 'true' to the SMB_VFS_IS_OFFLINE() op and then on the windows 
box I manually navigate through the folder hierarchy.


The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum. Quantum reserves the right to have electronic communications, including email and attachments, sent across its networks filtered through anti virus and spam software programs and retain such messages in order to comply with applicable data security and retention requirements. Quantum is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.

More information about the samba mailing list