mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
add rename check_access
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
This commit is contained in:
parent
991d340a0e
commit
8a29c4e939
@ -6139,6 +6139,15 @@ void Server::handle_client_rename(MDRequestRef& mdr)
|
||||
&remote_wrlocks, auth_pin_freeze))
|
||||
return;
|
||||
|
||||
if (!check_access(mdr, srcdn->get_dir()->get_inode(), MAY_WRITE))
|
||||
return;
|
||||
|
||||
if (!check_access(mdr, destdn->get_dir()->get_inode(), MAY_WRITE))
|
||||
return;
|
||||
|
||||
if (!check_access(mdr, srci, MAY_WRITE))
|
||||
return;
|
||||
|
||||
if (oldin &&
|
||||
oldin->is_dir() &&
|
||||
_dir_is_nonempty(mdr, oldin)) {
|
||||
|
Loading…
Reference in New Issue
Block a user