smbd: Use smbd_check_access_rights in reply_setatr()
authorVolker Lendecke <vl@samba.org>
Sun, 14 Apr 2019 09:39:31 +0000 (11:39 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 3 May 2019 22:34:16 +0000 (22:34 +0000)
That was the only caller of check_access outside of trans2.c, and it
passed an explicit NULL for fsp. Use the lower-level call, so we can
make check_access() static to trans2.c

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

index 2cef4d01a0100a7c9022c213a170fb9fd1e122e6..ace0d71dbbeb1e4cd7816fe874cdfc56fcb8585c 100644 (file)
@@ -1539,8 +1539,8 @@ void reply_setatr(struct smb_request *req)
                else
                        mode &= ~FILE_ATTRIBUTE_DIRECTORY;
 
-               status = check_access(conn, NULL, smb_fname,
-                                       FILE_WRITE_ATTRIBUTES);
+               status = smbd_check_access_rights(
+                       conn, smb_fname, false, FILE_WRITE_ATTRIBUTES);
                if (!NT_STATUS_IS_OK(status)) {
                        reply_nterror(req, status);
                        goto out;