Behaviour mismatch between "store dos attributes" and "map archive" from man smb.conf(5)
Jeremy Allison
jra at samba.org
Thu May 14 16:36:42 UTC 2020
On Thu, May 14, 2020 at 01:40:06PM +0530, Anoop C S wrote:
> On Wed, 2020-05-13 at 17:55 -0700, Jeremy Allison via samba-technical
> wrote:
> > On Thu, May 14, 2020 at 01:36:12AM +0200, Michael Adam wrote:
> > > Right, and this is done unconditionally in open_file_ntcreate(),
> > > I mean without checking lp_store_dos_attributes() first. So the
> > > manpage is clearly wrong. store-dos-attributes disables none of
> > > the map options. We only see the effect for map archive since
> > > the other three default to "no" anyway...
> >
> > Yep.
> >
> > > What I am wondering is this:
> > > If the file is created with SEC_RIGHTS_FILE_ALL, shouldn't it
> > > get execute permissions, even if "map archive = no"?
> > > After all, "map archive = no" does not prevent execute from
> > > being set, it just doesn't set it because of archive...
> >
> > No. SEC_RIGHTS_FILE_ALL is only to do with the access permissions
> > on the handle, not the permissions on the file.
>
> But what if file does not exist and is being created? Consider
> smb2.read.position where it starts with an already existing file. If we
> remove the file prior to executing this sub-test, it passes even with
> "map archive = no"(of course without execute bit set). What does that
> mean?
This is only the case where files are being created. Remember,
SEC_RIGHTS_FILE_ALL is *nothing* to do with the permission on
the file being created, it *only* concerns the rights on the
handle (the fd).
More information about the samba-technical
mailing list