Commit df179381 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Anna Schumaker

sunrpc/auth_gss: nfsd: fix encoder callback prototypes

Declare the p_encode callbacks with the proper prototype instead of
casting to kxdreproc_t and losing all type safety.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
Acked-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 843efb7d
...@@ -55,7 +55,7 @@ enum { ...@@ -55,7 +55,7 @@ enum {
#define PROC(proc, name) \ #define PROC(proc, name) \
[GSSX_##proc] = { \ [GSSX_##proc] = { \
.p_proc = GSSX_##proc, \ .p_proc = GSSX_##proc, \
.p_encode = (kxdreproc_t)gssx_enc_##name, \ .p_encode = gssx_enc_##name, \
.p_decode = (kxdrdproc_t)gssx_dec_##name, \ .p_decode = (kxdrdproc_t)gssx_dec_##name, \
.p_arglen = GSSX_ARG_##name##_sz, \ .p_arglen = GSSX_ARG_##name##_sz, \
.p_replen = GSSX_RES_##name##_sz, \ .p_replen = GSSX_RES_##name##_sz, \
......
...@@ -44,7 +44,7 @@ static int gssx_dec_bool(struct xdr_stream *xdr, u32 *v) ...@@ -44,7 +44,7 @@ static int gssx_dec_bool(struct xdr_stream *xdr, u32 *v)
} }
static int gssx_enc_buffer(struct xdr_stream *xdr, static int gssx_enc_buffer(struct xdr_stream *xdr,
gssx_buffer *buf) const gssx_buffer *buf)
{ {
__be32 *p; __be32 *p;
...@@ -56,7 +56,7 @@ static int gssx_enc_buffer(struct xdr_stream *xdr, ...@@ -56,7 +56,7 @@ static int gssx_enc_buffer(struct xdr_stream *xdr,
} }
static int gssx_enc_in_token(struct xdr_stream *xdr, static int gssx_enc_in_token(struct xdr_stream *xdr,
struct gssp_in_token *in) const struct gssp_in_token *in)
{ {
__be32 *p; __be32 *p;
...@@ -130,7 +130,7 @@ static int gssx_dec_option(struct xdr_stream *xdr, ...@@ -130,7 +130,7 @@ static int gssx_dec_option(struct xdr_stream *xdr,
} }
static int dummy_enc_opt_array(struct xdr_stream *xdr, static int dummy_enc_opt_array(struct xdr_stream *xdr,
struct gssx_option_array *oa) const struct gssx_option_array *oa)
{ {
__be32 *p; __be32 *p;
...@@ -348,7 +348,7 @@ static int gssx_dec_status(struct xdr_stream *xdr, ...@@ -348,7 +348,7 @@ static int gssx_dec_status(struct xdr_stream *xdr,
} }
static int gssx_enc_call_ctx(struct xdr_stream *xdr, static int gssx_enc_call_ctx(struct xdr_stream *xdr,
struct gssx_call_ctx *ctx) const struct gssx_call_ctx *ctx)
{ {
struct gssx_option opt; struct gssx_option opt;
__be32 *p; __be32 *p;
...@@ -733,8 +733,9 @@ static int gssx_enc_cb(struct xdr_stream *xdr, struct gssx_cb *cb) ...@@ -733,8 +733,9 @@ static int gssx_enc_cb(struct xdr_stream *xdr, struct gssx_cb *cb)
void gssx_enc_accept_sec_context(struct rpc_rqst *req, void gssx_enc_accept_sec_context(struct rpc_rqst *req,
struct xdr_stream *xdr, struct xdr_stream *xdr,
struct gssx_arg_accept_sec_context *arg) const void *data)
{ {
const struct gssx_arg_accept_sec_context *arg = data;
int err; int err;
err = gssx_enc_call_ctx(xdr, &arg->call_ctx); err = gssx_enc_call_ctx(xdr, &arg->call_ctx);
......
...@@ -179,7 +179,7 @@ struct gssx_res_accept_sec_context { ...@@ -179,7 +179,7 @@ struct gssx_res_accept_sec_context {
#define gssx_dec_init_sec_context NULL #define gssx_dec_init_sec_context NULL
void gssx_enc_accept_sec_context(struct rpc_rqst *req, void gssx_enc_accept_sec_context(struct rpc_rqst *req,
struct xdr_stream *xdr, struct xdr_stream *xdr,
struct gssx_arg_accept_sec_context *args); const void *data);
int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp, int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
struct xdr_stream *xdr, struct xdr_stream *xdr,
struct gssx_res_accept_sec_context *res); struct gssx_res_accept_sec_context *res);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment