dosmode.c:get_ea_dos_attributes switches off lp_store_dos_attributes in cases when it shouldn't
Jeremy Allison
jra at samba.org
Fri Jul 12 16:49:45 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.
Doesn't this only turn off dos attributes for the specific
share that ran into the problem ?
Jeremy.
More information about the samba-technical
mailing list