s3/smbd: fix access checks in set_ea_dos_attribute()
authorRalph Boehme <slow@samba.org>
Tue, 29 Aug 2017 13:55:19 +0000 (15:55 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 17 Oct 2017 05:46:20 +0000 (07:46 +0200)
commit143d26283dad8422fba557de311c304f0093d647
tree4d395c1363c98e56591722267ced366cc6bb3a8b
parentfbad64200e0199acb644d83073234b2f6c200fce
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>
source3/smbd/dosmode.c