The Reply to a Rejected Request

A call message can be rejected by the server for two reasons: either the server is not running a compatible version of the RPC protocol, or there is an authentication failure.

An RPC reply message for a request rejected by the network server has the following structure:

struct rejected_reply rreply {
union switch (enum reject_stat stat) {
     case RPC_MISMATCH: 
          struct {
               unsigned int low;
               unsigned int high;
          } mismatch_info;
     case AUTH_ERROR: 
          enum auth_stat stat;
};
The enum reject_stat discriminant acts as a switch between RPC_MISMATCH and AUTH_ERROR. The rejected call message returns one of the following status conditions:

enum reject_stat {
     RPC_MISMATCH   = 0, /* RPC version number is not 2       */
     AUTH_ERROR     = 1, /* remote cannot authenticate caller */
};
Item Description
RPC_MISMATCH The server is not running a compatible version of the RPC protocol. The server returns the lowest and highest version numbers available.
AUTH_ERROR The server refuses to authenticate the caller and returns a failure status with the value enum auth_stat. Authentication may fail because of bad or rejected credentials, bad or rejected verifier, expired or replayed verifier, or security problems.
If the server does not authenticate the caller, AUTH_ERROR returns one of the following conditions as the failure status:

enum auth_stat {
     AUTH_BADCRED      = 1, /* bad credentials      */
     AUTH_REJECTEDCRED = 2, /* begin new session    */
     AUTH_BADVERF      = 3, /* bad verifier         */
     AUTH_REJECTEDVERF = 4, /* expired or replayed  */
     AUTH_TOOWEAK      = 5, /* rejected for security*/
};