smbd: Use check_access_fsp where appropriate
authorVolker Lendecke <vl@samba.org>
Tue, 17 Nov 2015 14:13:41 +0000 (15:13 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 17 Nov 2015 18:53:24 +0000 (19:53 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb2_ioctl_filesys.c

index 187deaf118818c5630978cf09efc75eb69c82178..6e4a7856b06288b82bf633eb2915755805b1d586 100644 (file)
@@ -94,8 +94,7 @@ static NTSTATUS fsctl_set_cmprn(TALLOC_CTX *mem_ctx,
        }
 
        /* WRITE_DATA permission is required, WRITE_ATTRIBUTES is not */
-       status = check_access(fsp->conn, fsp, NULL,
-                             FILE_WRITE_DATA);
+       status = check_access_fsp(fsp, FILE_WRITE_DATA);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }
@@ -141,7 +140,7 @@ static NTSTATUS fsctl_zero_data(TALLOC_CTX *mem_ctx,
        }
 
        /* WRITE_DATA permission is required */
-       status = check_access(fsp->conn, fsp, NULL, FILE_WRITE_DATA);
+       status = check_access_fsp(fsp, FILE_WRITE_DATA);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }
@@ -333,7 +332,7 @@ static NTSTATUS fsctl_qar(TALLOC_CTX *mem_ctx,
        }
 
        /* READ_DATA permission is required */
-       status = check_access(fsp->conn, fsp, NULL, FILE_READ_DATA);
+       status = check_access_fsp(fsp, FILE_READ_DATA);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }