Get Samba version or capability information from Windows
corinna at vinschen.de
Thu Jan 17 16:50:38 GMT 2008
as I mentioned in my previous mail to this list, I'm core developer for
Cygwin. Over the time, there were some bugs or strange behaviour in
Samba which required to implement Samba specific workarounds.
Of course this is quite normal when developing complex projects as Samba
certainly is. However, the more situations I have to find a workaround
for, the more I'm desperately missing a *reliable* way to find out
- if the share is a Samba share or a native NTFS and
- which version of Samba this share is provided by, or
- which bug/feature is present on this share
from Windows NT user space.
So far such a reliable way to figure out the above from Windows NT
doesn't seem to exist. So far that means I have to do some guess work,
like using the file system attributes returned by SMB_FS_ATTRIBUTE_INFORMATION.
This immediately stops working as is, as soon as Samba 3.2 is out, since
the file system attributes differ from the attributes sent by Samba
3.0.x and earlier versions. As a result, older Cygwin versions will
choke on Samba >3.2 shares in some situations.
Of course, that's nothing which could be changed retroactively for older
versions of Samba, but for upcoming versions of Samba, it would be
really cool to have this reliable information accessible from a Windows
NT user space application.
Looking for potential solutions, I came across the SMB_FS_OBJECTID_INFORMATION
(FILE_FS_OBJECTID_INFORMATION in NT user land) information class. This
information class doesn't only transport the object id of the file
system, but also 48 bytes of "extended information". Would these 48 bytes
a possible way to give..., well, extended information about Samba to
the Windows user space?
Or, does anybody know another way to make that information reliably
accessible to Windows NT apps?
More information about the samba-technical