diff options
| author | Chuck Lever <cel@citi.umich.edu> | 2002-09-17 20:17:23 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-09-17 20:17:23 -0700 |
| commit | b9239fb2e7a4e6d771e74631da4aafcc01e67bb8 (patch) | |
| tree | 57e32c96a61a866558154638b4e197eccbdfdbdf /net/sunrpc/auth_null.c | |
| parent | 1e04f496f8d6c2237b554b6b049ea4eb803e54b1 (diff) | |
[PATCH] stricter type checking for rpc auth flavors
This implements stricter type checking for rpc auth flavors. it is a
prerequisite for RPC GSSAPI and its authentication pseudoflavors.
please apply it.
Diffstat (limited to 'net/sunrpc/auth_null.c')
| -rw-r--r-- | net/sunrpc/auth_null.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/net/sunrpc/auth_null.c b/net/sunrpc/auth_null.c index 8f71439adca2..dbad46309b66 100644 --- a/net/sunrpc/auth_null.c +++ b/net/sunrpc/auth_null.c @@ -1,5 +1,5 @@ /* - * linux/net/sunrpc/rpcauth_null.c + * linux/net/sunrpc/auth_null.c * * AUTH_NULL authentication. Really :-) * @@ -106,14 +106,18 @@ nul_refresh(struct rpc_task *task) static u32 * nul_validate(struct rpc_task *task, u32 *p) { - u32 n = ntohl(*p++); + rpc_authflavor_t flavor; + u32 size; - if (n != RPC_AUTH_NULL) { - printk("RPC: bad verf flavor: %ld\n", (unsigned long) n); + flavor = ntohl(*p++); + if (flavor != RPC_AUTH_NULL) { + printk("RPC: bad verf flavor: %u\n", flavor); return NULL; } - if ((n = ntohl(*p++)) != 0) { - printk("RPC: bad verf size: %ld\n", (unsigned long) n); + + size = ntohl(*p++); + if (size != 0) { + printk("RPC: bad verf size: %u\n", size); return NULL; } |
