]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/sunrpc/auth_gss/auth_gss.c
[PATCH] RPC,NFS: new rpc_pipefs patch
[mv-sheeva.git] / net / sunrpc / auth_gss / auth_gss.c
index 2f7b867161d254cc6251dbe994fa90017a02e7a8..bd2555139fa9172cff0dad6586952000495ecba5 100644 (file)
@@ -42,8 +42,6 @@
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/slab.h>
-#include <linux/socket.h>
-#include <linux/in.h>
 #include <linux/sched.h>
 #include <linux/sunrpc/clnt.h>
 #include <linux/sunrpc/auth.h>
@@ -89,7 +87,6 @@ struct gss_auth {
        struct list_head upcalls;
        struct rpc_clnt *client;
        struct dentry *dentry;
-       char path[48];
        spinlock_t lock;
 };
 
@@ -692,10 +689,8 @@ gss_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor)
        if (err)
                goto err_put_mech;
 
-       snprintf(gss_auth->path, sizeof(gss_auth->path), "%s/%s",
-                       clnt->cl_pathname,
-                       gss_auth->mech->gm_name);
-       gss_auth->dentry = rpc_mkpipe(gss_auth->path, clnt, &gss_upcall_ops, RPC_PIPE_WAIT_FOR_OPEN);
+       gss_auth->dentry = rpc_mkpipe(clnt->cl_dentry, gss_auth->mech->gm_name,
+                       clnt, &gss_upcall_ops, RPC_PIPE_WAIT_FOR_OPEN);
        if (IS_ERR(gss_auth->dentry)) {
                err = PTR_ERR(gss_auth->dentry);
                goto err_put_mech;
@@ -720,7 +715,7 @@ gss_destroy(struct rpc_auth *auth)
                auth, auth->au_flavor);
 
        gss_auth = container_of(auth, struct gss_auth, rpc_auth);
-       rpc_unlink(gss_auth->path);
+       rpc_unlink(gss_auth->dentry);
        gss_mech_put(gss_auth->mech);
 
        rpcauth_free_credcache(auth);
@@ -846,10 +841,8 @@ gss_marshal(struct rpc_task *task, u32 *p)
 
        /* We compute the checksum for the verifier over the xdr-encoded bytes
         * starting with the xid and ending at the end of the credential: */
-       iov.iov_base = req->rq_snd_buf.head[0].iov_base;
-       if (task->tk_client->cl_xprt->stream)
-               /* See clnt.c:call_header() */
-               iov.iov_base += 4;
+       iov.iov_base = xprt_skip_transport_header(task->tk_xprt,
+                                       req->rq_snd_buf.head[0].iov_base);
        iov.iov_len = (u8 *)p - (u8 *)iov.iov_base;
        xdr_buf_from_iov(&iov, &verf_buf);