[PATCH] Ensure query fs attributes correctly returns values.

Jeremy Allison jra at samba.org
Tue Jun 19 22:15:26 UTC 2018


Hi Ralph & Metze,

At the plugfest Steve and I had an interesting disuccion.

SMB2 POSIX extensions can't *guearentee* case-sensitive
filesystem access, as the underlying filesystem might
itself have been mounted case-insensitive (this is
possible currently for ZFS on Linux and FreeBSD,
and XFS on Linux).

Instead, SMB2 POSIX should expose the *actual*
case-sensitivity of the filesystem mount.

Specifying this instead of always case-sensitive
also helps if the MS-Azure SMB implementation
wants to add the SMB2 POSIX extensions in future.

Unfortunately there is no way to programatically
find this out (there is a new statvfs call in
Linux that gives this information, but it won't
be in released kernels for a long, long time,
plus FreeBSD doesn't have this info in their
statvfs).

Currently, smbd SMB_QUERY_FS_ATTRIBUTE_INFO arbitrarily
adds in FILE_CASE_PRESERVED_NAMES|FILE_CASE_SENSITIVE_SEARCH
into the returned filesystem attributes, regrdless
of how "case sensitive =" or "case preserve =" are
set in the smb.conf.

This patch changes qfsinfo to return the currently
used values of these flags, not hard coding them.

Please review and push if happy !

Jeremy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s3-smbd-Correctly-return-the-used-values-for-FILE_CA.patch
Type: text/x-diff
Size: 2342 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180619/1c150bc4/0001-s3-smbd-Correctly-return-the-used-values-for-FILE_CA.diff>


More information about the samba-technical mailing list