[RFC] incorrect dosmode on stream associated with dir
jra at samba.org
Tue Apr 10 17:49:52 UTC 2018
On Tue, Apr 10, 2018 at 05:58:58AM -0400, Andrew Walker wrote:
> Hi Jeremy,
> Sorry for delay in responding. The issue was observed on FreeBSD, Samba Version
> Config details:
> ### smb.conf ###
> idmap config * : range = 3000-7999
> idmap config * : backend = tdb
> ea support = Yes
> store dos attributes = Yes
> map readonly = no
> path = "/usr/home/SAMBA"
> read only = No
> vfs objects = zfsacl streams_xattr
> ### lsextattr output ###
> root at DC00:/usr/home/SAMBA # lsextattr user Test_Dir/
> Test_Dir/ DOSATTRIB DosStream.Cats:$DATA
> _both_ DOSATTRIB and DosStream are required to reproduce bug.
> b64encoded DOSATTRIB
> b64encoded DosStream.Cats:$DATA
> ### client ###
> windows 7 enterprise, service pack 1, all patches applied
> ### workflow ###
> 1) create directory on server.
> 2) write ADS to directory.
> 3) copy directory to client desktop (note dir must not exist on client).
Problem is I can't reproduce this locally on Linux. I believe you,
and the fix seems obvious and non-intrusive, but I need
a reproducer first. Here's what I have:
smb.conf share definition:
path = /tmp/testdir
store dos attributes = yes
ea support = yes
vfs objects = streams_xattr
read only = no
guest ok = yes
bin/smbclient //127.0.0.1/tmp2 -Uuser%pass
smb: \> mkdir foo
smb: \> put look foo:bar
putting file look as \foo:bar (0.0 kb/s) (average 0.0 kb/s)
smb: \> allinfo foo:bar
create_time: Tue Apr 10 10:42:35 AM 2018 PDT
access_time: Tue Apr 10 10:42:35 AM 2018 PDT
write_time: Tue Apr 10 10:42:35 AM 2018 PDT
change_time: Tue Apr 10 10:42:35 AM 2018 PDT
attributes: A (20)
NT_STATUS_INVALID_PARAMETER getting streams for \foo:bar
(the NT_STATUS_INVALID_PARAMETER is expected as you
can't enumerate streams on a stream handle).
Note this is returning only A, not DA which
is what you are seeing.
If I look at the xattrs directly I do see the xattrs:
$ getfattr /tmp/testdir/foo
getfattr: Removing leading '/' from absolute path names
# file: tmp/testdir/foo
Can you reproduce using smbclient somehow so I can
figure out what is different between your system
and mine ?
More information about the samba-technical