mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
Add mknod check_access
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
This commit is contained in:
parent
74b8f0c770
commit
5a1988673c
@ -4438,6 +4438,9 @@ void Server::handle_client_mknod(MDRequestRef& mdr)
|
||||
if (!mds->locker->acquire_locks(mdr, rdlocks, wrlocks, xlocks))
|
||||
return;
|
||||
|
||||
if (!check_access(mdr, diri, MAY_WRITE))
|
||||
return;
|
||||
|
||||
unsigned mode = req->head.args.mknod.mode;
|
||||
if ((mode & S_IFMT) == 0)
|
||||
mode |= S_IFREG;
|
||||
|
Loading…
Reference in New Issue
Block a user