default values for unsupported fileinfo levels

Sam Liddicott sam at liddicott.com
Wed Jul 1 13:54:18 GMT 2009


I'm coding the mappings between the different fileinfo levels.

Samba advertises CAP_W2K_SMBS, but may proxy to a server which does not.
I will have advertised to the client that this information will be
available so the Samba proxy will have to map the clients higher
"passthrough" >1000 infolevels to the lower levels as it proxies, but
apart from RAW_FILEINFO_NETWORK_OPEN_INFORMATION the rest require
information that I can't be had from the CAP_W2K_SMBS non server.

RAW_FILEINFO_NETWORK_OPEN_INFORMATION
The info here is a subset of RAW_FILEINFO_ALL_INFO so I can just map the
response.

RAW_FILEINFO_INTERNAL_INFORMATION
returns 64 bit file_id, only available in
RAW_FILEINFO_SMB2_ALL_INFORMATION which is surely not available where
even CAP_W2K_SMBS is not set.
I suppose I could implement my own kind of file_id mechanism as long as
it didn't have to be persistent over (or shared between) sessions.

RAW_FILEINFO_ATTRIBUTE_TAG_INFORMATION
returns an attribute and reparse_tag not available anywhere else.
I suppose I could put default values of zero here.

RAW_FILEINFO_POSITION_INFORMATION
returns a position, also available in RAW_FILEINFO_SMB2_ALL_INFORMATION

RAW_FILEINFO_ATTRIBUTE_TAG_INFORMATION
As there is no pathinfo equivalent I guess this is to check the current
offset for read/write within the file. UGH. Why introduce a concept like
this at such a late stage? I don't know any calls that take this as an
implicit argument.

RAW_FILEINFO_ACCESS_INFORMATION
access flags not available anywhere else, maybe return 0 is fine.

RAW_FILEINFO_MODE_INFORMATION
returns a 32 bit mode also available in RAW_FILEINFO_SMB2_ALL_INFORMATION.
What might this mode refer to?

RAW_FILEINFO_ALIGNMENT_INFORMATION
returns a 32 bit alignment also in RAW_FILEINFO_SMB2_ALL_INFORMATION.
I suppose I can return a default alignment? Would "1" do?

Sam


More information about the samba-technical mailing list