Project

General

Profile

Bug #5557

rfs3_lookup() could return invalid error

Added by Marcel Telka about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
nfs - NFS server and client
Start date:
2015-01-23
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage

Description

Here in rfs3_lookup() we are trying to fail with NFS3ERR_ACCES:

495                VN_RELE(vp);
496                resp->status = NFS3ERR_ACCES;
497                error = 1;

...

505    if (error)
506        goto out;

...

553out:
554    if (curthread->t_flag & T_WOULDBLOCK) {
555        curthread->t_flag &= ~T_WOULDBLOCK;
556        resp->status = NFS3ERR_JUKEBOX;
557    } else
558        resp->status = puterrno3(error);

but at line 558 the resp->status will be changed to NFS3ERR_PERM (via puterrno3) because EPERM is defined as 1. According to RFC 1813 the proper error returned here should be NFS3ERR_ACCES.

History

#1

Updated by Marcel Telka about 5 years ago

  • Category set to nfs - NFS server and client
#2

Updated by Marcel Telka about 5 years ago

  • Status changed from In Progress to Pending RTI
#3

Updated by Electric Monk about 5 years ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 0 to 100

git commit f46abf18becdb2393d5f5bb30fa594037403c4a3

commit  f46abf18becdb2393d5f5bb30fa594037403c4a3
Author: Marcel Telka <marcel.telka@nexenta.com>
Date:   2015-01-27T06:07:15.000Z

    5557 rfs3_lookup() could return invalid error
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF