smbd: do not disable "store dos attributes" on-the-fly
authorUri Simchoni <uri@samba.org>
Thu, 24 Dec 2015 06:10:11 +0000 (08:10 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 25 Dec 2015 12:20:58 +0000 (13:20 +0100)
commitd4c2395e6428312854b8570064bddab3a7f188ff
tree1b68e3f4aeaa18023c573b11fc3239d04f6ce9c1
parent5b1a87e344f192ae6c43e11c5e62e5cabf8520d3
smbd: do not disable "store dos attributes" on-the-fly

Smbd would disable "store dos attributes" on-the-fly if the
attempt to set/get user.DOSATTRIB fails with ENOTSUP or ENOSYS.
The rationale behind it was that the file system does not support
extended attributes, so there's no need to fill up the log with
failure messages.

However, a "wide symlink" could point to a spot that doesn't support
extended attributes. Even with the default banned wide links, we
currenly allow stat'ing those files and follow the symlink, and this
in turn would disable "store dos attributes" for the whole share.
The user.DOSATTRIB attribute also stores file creation time,
so that is also affected.

Another case where this behavior would turn storage of DOS attributes
off is that of the ".." entry at the root of the share, if the parent
folder for the share's root path does not support extended attributes.

On the other hand, the information on the file system and its support
of extended attributes is readily available, so the fix for explosion
of the log should be not to configure "store dos attributes" on
such a share.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11649

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Dec 25 13:20:58 CET 2015 on sn-devel-144
source3/include/proto.h
source3/param/loadparm.c
source3/smbd/dosmode.c