SUNRPC: Fix RPCAUTH_LOOKUP_ROOTCREDS

The current RPCAUTH_LOOKUP_ROOTCREDS flag only works for AUTH_SYS
authentication, and then only as a special case in the code. This patch
removes the auth_sys special casing, and replaces it with generic code.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust
2008-03-12 12:12:16 -04:00
parent 25337fdc85
commit af09383577
4 changed files with 48 additions and 49 deletions

View File

@@ -821,8 +821,10 @@ static void rpc_init_task(struct rpc_task *task, const struct rpc_task_setup *ta
/* Bind the user cred */
if (task->tk_msg.rpc_cred != NULL)
rpcauth_holdcred(task);
else
else if (!(task_setup_data->flags & RPC_TASK_ROOTCREDS))
rpcauth_bindcred(task);
else
rpcauth_bind_root_cred(task);
if (task->tk_action == NULL)
rpc_call_start(task);
}