X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fsunrpc%2Fauth_gss%2Fsvcauth_gss.c;h=81ae3d62a0cc9010d4cc1b6e5de130ae64ca2a57;hb=af5329cdf51cdd208a323e521faa46800a16d2ec;hp=481f984e9a22278bc9ef1993bc3064c77fc65a51;hpb=ae9458d6a0956aa21cb49e1251e35a8d4dacbe6e;p=linux-2.6 diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 481f984e9a..81ae3d62a0 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -1144,20 +1144,20 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp) case RPC_GSS_SVC_NONE: break; case RPC_GSS_SVC_INTEGRITY: - if (unwrap_integ_data(&rqstp->rq_arg, - gc->gc_seq, rsci->mechctx)) - goto auth_err; /* placeholders for length and seq. number: */ svc_putnl(resv, 0); svc_putnl(resv, 0); + if (unwrap_integ_data(&rqstp->rq_arg, + gc->gc_seq, rsci->mechctx)) + goto garbage_args; break; case RPC_GSS_SVC_PRIVACY: - if (unwrap_priv_data(rqstp, &rqstp->rq_arg, - gc->gc_seq, rsci->mechctx)) - goto auth_err; /* placeholders for length and seq. number: */ svc_putnl(resv, 0); svc_putnl(resv, 0); + if (unwrap_priv_data(rqstp, &rqstp->rq_arg, + gc->gc_seq, rsci->mechctx)) + goto garbage_args; break; default: goto auth_err; @@ -1169,6 +1169,9 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp) ret = SVC_OK; goto out; } +garbage_args: + ret = SVC_GARBAGE; + goto out; auth_err: /* Restore write pointer to its original value: */ xdr_ressize_check(rqstp, reject_stat);