s3: smbd: Use FCHMOD call, not FCHMOD_ACL call if mode bits reset needed.
authorJeremy Allison <jra@samba.org>
Thu, 17 May 2018 17:38:34 +0000 (10:38 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 25 May 2018 16:39:24 +0000 (18:39 +0200)
commitaaed6b4e995bb95fdc3ca6e768e84d14b3a3e446
tree52a825a2dbf05822f175acebdf87890acdaa16d6
parent2f4e581c3d103633c96cdec35b0a9e7c9d2ae042
s3: smbd: Use FCHMOD call, not FCHMOD_ACL call if mode bits reset needed.

This is a behavior change, it will modify the POSIX ACL mask
from a value of rwx instead of modifying the existing ACE
entries to be ANDed with the passed in mode. However it
will have no effect on the underlying permissions, and
better reflects the proper use of POSIX ACLs (i.e. I
didn't understand the use of the mask entry in the
ACL when I first wrote the POSIX ACL code).

In addition, the vfs_acl_common.c module already
filters these calls for all but POSIX opens, which
means the only place this change is exposed to the
client would be a cifsfs unix extensions client doing
posix acl calls (and they would expect the mask to
be set like this on chmod).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/open.c