s3/smbd: fix access checks in set_ea_dos_attribute()
commit096a3f8fdd76fc045e338da96415ba26820e68f1
authorRalph Boehme <slow@samba.org>
Tue, 29 Aug 2017 13:55:19 +0000 (29 15:55 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 25 Oct 2017 06:43:01 +0000 (25 08:43 +0200)
treee33087930abb66e737097c9781b6b7fb479c7908
parent88dfaf1e4be5ac66bf3fd82f953d3fd79a0a309f
s3/smbd: fix access checks in set_ea_dos_attribute()

We wanted to set the DOS attributes and failed with permission denied
from the VFS/kernel/filesystem. Next thing we wanna do here is override
this if either

- "dos filemode = true" is set and the security descriptor gives the
  user write access or if

- the stored security descriptor has FILE_WRITE_ATTRIBUTES

The former was working, but the latter was not implemented at all.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12995

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 143d26283dad8422fba557de311c304f0093d647)
source3/smbd/dosmode.c