Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23865
b: refs/heads/master
c: f344f6d
h: refs/heads/master
i:
  23863: 85301a7
v: v3
  • Loading branch information
Olaf Kirch authored and Trond Myklebust committed Mar 20, 2006
1 parent 6434022 commit cea1b4c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fb374d24f225f38f13dbffb65dd7ec72daf08dba
refs/heads/master: f344f6df4b2baa3e5c553c461735dfaf92f44be7
16 changes: 14 additions & 2 deletions trunk/net/sunrpc/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,26 @@ rpcauth_create(rpc_authflavor_t pseudoflavor, struct rpc_clnt *clnt)
struct rpc_authops *ops;
u32 flavor = pseudoflavor_to_flavor(pseudoflavor);

if (flavor >= RPC_AUTH_MAXFLAVOR || !(ops = auth_flavors[flavor]))
return ERR_PTR(-EINVAL);
auth = ERR_PTR(-EINVAL);
if (flavor >= RPC_AUTH_MAXFLAVOR)
goto out;

/* FIXME - auth_flavors[] really needs an rw lock,
* and module refcounting. */
#ifdef CONFIG_KMOD
if ((ops = auth_flavors[flavor]) == NULL)
request_module("rpc-auth-%u", flavor);
#endif
if ((ops = auth_flavors[flavor]) == NULL)
goto out;
auth = ops->create(clnt, pseudoflavor);
if (IS_ERR(auth))
return auth;
if (clnt->cl_auth)
rpcauth_destroy(clnt->cl_auth);
clnt->cl_auth = auth;

out:
return auth;
}

Expand Down

0 comments on commit cea1b4c

Please sign in to comment.