On servers with extended attributes, a server copuld be set up to
deny READ-ATTRIBUTES for the libnfs user.
This means that READDIRPLUS will no longer work since it will need to
stat() and thus READ-ATTRIBUTE in order to prepare the response.
Libnfs has READDIRPLUS emulation for the cases where this command fails
by switching to old READDIR to scan all the file names and then a LOOKUP loop for getting the file attributes.
Most of the time the purpose for this emulation is to handle the case where the server simply does not support READDIRPLUS at all, which sometimes is the case for embedded systems with userspace nfs servers.
In this case, where files just have READ-ATTRIBUTE deny for the libnfs user,
this will also fail and trigger the fallback to READDIR + LOOKUP-loop.
If the LOOKUP fails for this loop, then just ignore trying to update the attributes we have for this object, but do not fail the actual READDIRPLUS emulation.
This addresses a permissions issue reported by a XBMC user in issue #60
if (status == RPC_STATUS_CANCEL) {
rdpe_cb_data->status = RPC_STATUS_CANCEL;
}
- if (status == RPC_STATUS_SUCCESS && res->status != NFS3_OK) {
- rdpe_cb_data->status = RPC_STATUS_ERROR;
- }
if (status == RPC_STATUS_SUCCESS && res->status == NFS3_OK) {
if (res->LOOKUP3res_u.resok.obj_attributes.attributes_follow) {
fattr3 *attributes = &res->LOOKUP3res_u.resok.obj_attributes.post_op_attr_u.attributes;