Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367333
b: refs/heads/master
c: 1c74a24
h: refs/heads/master
i:
  367331: cd51266
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Apr 4, 2013
1 parent 62d7302 commit cd08c8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: 4edaa308888b4bd629fa025cc6d5b2bf1a2a51db
refs/heads/master: 1c74a244fcb61e6e1983d5725b8ccd5d3f51889c
5 changes: 4 additions & 1 deletion trunk/net/sunrpc/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ MODULE_PARM_DESC(auth_hashtable_size, "RPC credential cache hashtable size");

static u32
pseudoflavor_to_flavor(u32 flavor) {
if (flavor >= RPC_AUTH_MAXFLAVOR)
if (flavor > RPC_AUTH_MAXFLAVOR)
return RPC_AUTH_GSS;
return flavor;
}
Expand Down Expand Up @@ -173,6 +173,9 @@ rpcauth_get_gssinfo(rpc_authflavor_t pseudoflavor, struct rpcsec_gss_info *info)
const struct rpc_authops *ops;
int result;

if (flavor >= RPC_AUTH_MAXFLAVOR)
return -EINVAL;

ops = auth_flavors[flavor];
if (ops == NULL)
request_module("rpc-auth-%u", flavor);
Expand Down

0 comments on commit cd08c8c

Please sign in to comment.