dosmode.c:get_ea_dos_attributes switches off lp_store_dos_attributes in cases when it shouldn't
Volker Lendecke
Volker.Lendecke at SerNet.DE
Wed Aug 7 00:47:09 MDT 2013
On Thu, Jul 11, 2013 at 03:48:19PM -0700, Richard Sharpe wrote:
> Hi folks,
>
> In source3/smbd/dosmode.c:get_ea_dos_attributes we see this:
>
> if (!lp_store_dos_attributes(SNUM(conn))) {
> return False;
> }
>
> /* Don't reset pattr to zero as we may already have
> filename-based attributes we
> need to preserve. */
>
> sizeret = SMB_VFS_GETXATTR(conn, smb_fname->base_name,
> SAMBA_XATTR_DOS_ATTRIB, attrstr,
> sizeof(attrstr));
> if (sizeret == -1) {
> if (errno == ENOSYS
> #if defined(ENOTSUP)
> || errno == ENOTSUP) {
> #else
> ) {
> #endif
> DEBUG(1,("get_ea_dos_attribute: Cannot get attribute "
> "from EA on file %s: Error = %s\n",
> smb_fname_str_dbg(smb_fname),
> strerror(errno)));
> set_store_dos_attributes(SNUM(conn), False);
> }
> return False;
> }
>
> Imagine if you will Samba running on a system with multiple file
> systems all of which have shares on them. If one of those file systems
> does not support XATTRs, and we stumble across it, we will switch off
> DOS attributes in XATTRs for all of them and the user will be
> scratching his head about why DOS attributes no longer works
> sometimes.
If I read that correctly, this is at least per share. It
does not help if you have submounts within a share with
different behaviour, but it will not globally disable xattrs
I believe.
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical
mailing list