Use default uid and gid from NFS AUTH_SYS when creating files

This commit is contained in:
Vitaliy Filippov
2025-08-24 16:03:40 +03:00
parent d8332171e9
commit fb1c3e00f4
6 changed files with 54 additions and 0 deletions
+10
View File
@@ -1168,6 +1168,16 @@ int nfs_client_t::handle_rpc_op(rpc_op_t *rop)
// Incoming buffer isn't needed to handle request, so return 0
return 0;
}
if (rop->in_msg.body.cbody.cred.flavor == RPC_AUTH_SYS)
{
// Parse authentication header
if (!xdr_decode(rop->xdrs, rop->in_msg.body.cbody.cred.body.data, rop->in_msg.body.cbody.cred.body.size, (xdrproc_t)xdr_authsys_parms, &rop->auth_sys))
{
rop->out_msg.body.rbody.areply.reply_data.stat = RPC_GARBAGE_ARGS;
rpc_queue_reply(rop);
return 0;
}
}
rop->out_msg.body.rbody.areply.reply_data.stat = RPC_SUCCESS;
rop->reply_fn = proc_it->resp_fn;
rop->referenced = 0;