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
+6
View File
@@ -786,6 +786,12 @@ resume_1:
cb(st->res == 0 ? -EINVAL : st->res);
return;
}
if (st->proxy->enforce_perms && !kv_is_accessible(st->rop->auth_sys, st->ientry, ACCESS3_MODIFY))
{
auto cb = std::move(st->cb);
cb(-EACCES);
return;
}
st->was_immediate = st->proxy->cli->get_immediate_commit(st->ino);
st->new_size = st->ientry["size"].uint64_value();
if (st->new_size < st->offset + st->size)