vserver 1.9.5.x5
[linux-2.6.git] / net / sunrpc / auth_gss / svcauth_gss.c
index 55b2fd1..1b4a111 100644 (file)
@@ -448,7 +448,7 @@ static struct cache_detail rsc_cache = {
 
 static DefineSimpleCacheLookup(rsc, 0);
 
-struct rsc *
+static struct rsc *
 gss_svc_searchbyctx(struct xdr_netobj *handle)
 {
        struct rsc rsci;
@@ -503,7 +503,7 @@ static inline u32 round_up_to_quad(u32 i)
 }
 
 static inline int
-svc_safe_getnetobj(struct iovec *argv, struct xdr_netobj *o)
+svc_safe_getnetobj(struct kvec *argv, struct xdr_netobj *o)
 {
        int l;
 
@@ -520,7 +520,7 @@ svc_safe_getnetobj(struct iovec *argv, struct xdr_netobj *o)
 }
 
 static inline int
-svc_safe_putnetobj(struct iovec *resv, struct xdr_netobj *o)
+svc_safe_putnetobj(struct kvec *resv, struct xdr_netobj *o)
 {
        u32 *p;
 
@@ -548,8 +548,8 @@ gss_verify_header(struct svc_rqst *rqstp, struct rsc *rsci,
        struct xdr_buf          rpchdr;
        struct xdr_netobj       checksum;
        u32                     flavor = 0;
-       struct iovec            *argv = &rqstp->rq_arg.head[0];
-       struct iovec            iov;
+       struct kvec             *argv = &rqstp->rq_arg.head[0];
+       struct kvec             iov;
 
        /* data to compute the checksum over: */
        iov.iov_base = rpcstart;
@@ -595,7 +595,7 @@ gss_write_verf(struct svc_rqst *rqstp, struct gss_ctx *ctx_id, u32 seq)
        struct xdr_buf          verf_data;
        struct xdr_netobj       mic;
        u32                     *p;
-       struct iovec            iov;
+       struct kvec             iov;
 
        svc_putu32(rqstp->rq_res.head, htonl(RPC_AUTH_GSS));
        xdr_seq = htonl(seq);
@@ -643,7 +643,6 @@ svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name)
        if (!new)
                goto out;
        cache_init(&new->h.h);
-       atomic_inc(&new->h.h.refcnt);
        new->h.name = kmalloc(strlen(name) + 1, GFP_KERNEL);
        if (!new->h.name)
                goto out_free_dom;
@@ -651,7 +650,6 @@ svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name)
        new->h.flavour = RPC_AUTH_GSS;
        new->pseudoflavor = pseudoflavor;
        new->h.h.expiry_time = NEVER;
-       new->h.h.flags = 0;
 
        test = auth_domain_lookup(&new->h, 1);
        if (test == &new->h) {
@@ -743,8 +741,8 @@ struct gss_svc_data {
 static int
 svcauth_gss_accept(struct svc_rqst *rqstp, u32 *authp)
 {
-       struct iovec    *argv = &rqstp->rq_arg.head[0];
-       struct iovec    *resv = &rqstp->rq_res.head[0];
+       struct kvec     *argv = &rqstp->rq_arg.head[0];
+       struct kvec     *resv = &rqstp->rq_res.head[0];
        u32             crlen;
        struct xdr_netobj tmpobj;
        struct gss_svc_data *svcdata = rqstp->rq_auth_data;
@@ -763,7 +761,7 @@ svcauth_gss_accept(struct svc_rqst *rqstp, u32 *authp)
        if (!svcdata)
                goto auth_err;
        rqstp->rq_auth_data = svcdata;
-       svcdata->body_start = 0;
+       svcdata->body_start = NULL;
        svcdata->rsci = NULL;
        gc = &svcdata->clcred;
 
@@ -952,7 +950,7 @@ svcauth_gss_release(struct svc_rqst *rqstp)
        struct xdr_buf *resbuf = &rqstp->rq_res;
        struct xdr_buf integ_buf;
        struct xdr_netobj mic;
-       struct iovec *resv;
+       struct kvec *resv;
        u32 *p;
        int integ_offset, integ_len;
        int stat = -EINVAL;
@@ -960,7 +958,7 @@ svcauth_gss_release(struct svc_rqst *rqstp)
        if (gc->gc_proc != RPC_GSS_PROC_DATA)
                goto out;
        /* Release can be called twice, but we only wrap once. */
-       if (gsd->body_start == 0)
+       if (gsd->body_start == NULL)
                goto out;
        /* normally not set till svc_send, but we need it here: */
        resbuf->len = resbuf->head[0].iov_len
@@ -970,7 +968,7 @@ svcauth_gss_release(struct svc_rqst *rqstp)
                break;
        case RPC_GSS_SVC_INTEGRITY:
                p = gsd->body_start;
-               gsd->body_start = 0;
+               gsd->body_start = NULL;
                /* move accept_stat to right place: */
                memcpy(p, p + 2, 4);
                /* don't wrap in failure case: */
@@ -1047,7 +1045,7 @@ svcauth_gss_domain_release(struct auth_domain *dom)
        kfree(gd);
 }
 
-struct auth_ops svcauthops_gss = {
+static struct auth_ops svcauthops_gss = {
        .name           = "rpcsec_gss",
        .owner          = THIS_MODULE,
        .flavour        = RPC_AUTH_GSS,