Allow to enforce permissions at the server side

This commit is contained in:
Vitaliy Filippov
2025-08-24 16:20:19 +03:00
parent fb1c3e00f4
commit fbf14fb0cb
16 changed files with 225 additions and 27 deletions
+7
View File
@@ -70,6 +70,13 @@ int kv_nfs3_lookup_proc(void *opaque, rpc_op_t *rop)
rpc_queue_reply(rop);
return;
}
else if (self->parent->enforce_perms && ientry["type"] != "link" &&
!kv_is_accessible(rop->auth_sys, ientry, ACCESS3_LOOKUP))
{
*reply = (LOOKUP3res){ .status = NFS3ERR_ACCES };
rpc_queue_reply(rop);
return;
}
*reply = (LOOKUP3res){
.status = NFS3_OK,
.resok = (LOOKUP3resok){