]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
nfsd: support callbacks with gss flavors
authorOlga Kornievskaia <aglo@citi.umich.edu>
Tue, 23 Dec 2008 21:19:00 +0000 (16:19 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 23 Dec 2008 21:19:00 +0000 (16:19 -0500)
This patch adds server-side support for callbacks other than AUTH_SYS.

Signed-off-by: Olga Kornievskaia <aglo@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfsd/nfs4callback.c
fs/nfsd/nfs4state.c
include/linux/nfsd/state.h
net/sunrpc/rpc_pipe.c

index 3ca141782145a15ac97a31ff6707976773e3849b..6d7d8c02c19711a38d4100f99eb539fb95e4daa4 100644 (file)
@@ -358,6 +358,7 @@ static struct rpc_program cb_program = {
                .nrvers         = ARRAY_SIZE(nfs_cb_version),
                .version        = nfs_cb_version,
                .stats          = &cb_stats,
+               .pipe_dir_name  = "/nfsd4_cb",
 };
 
 /* Reference counting, callback cleanup, etc., all look racy as heck.
@@ -382,7 +383,7 @@ static int do_probe_callback(void *data)
                .program        = &cb_program,
                .prognumber     = cb->cb_prog,
                .version        = nfs_cb_version[1]->number,
-               .authflavor     = RPC_AUTH_UNIX, /* XXX: need AUTH_GSS... */
+               .authflavor     = clp->cl_flavor,
                .flags          = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET),
                .client_name    = clp->cl_principal,
        };
index f3b9a8d064f353383d94f68c287d7fad7d484804..07db31568ac90ab7e1340629efea0f12299cfed5 100644 (file)
@@ -786,6 +786,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
        }
        copy_verf(new, &clverifier);
        new->cl_addr = sin->sin_addr.s_addr;
+       new->cl_flavor = rqstp->rq_flavor;
        princ = svc_gss_principal(rqstp);
        if (princ) {
                new->cl_principal = kstrdup(princ, GFP_KERNEL);
index ce7cbf4b7c930d543b2b9bf2e423615746ea15f8..128298c0362d488e113ab34649dfd3643e319fa3 100644 (file)
@@ -124,6 +124,7 @@ struct nfs4_client {
        nfs4_verifier           cl_verifier;    /* generated by client */
        time_t                  cl_time;        /* time of last lease renewal */
        __be32                  cl_addr;        /* client ipaddress */
+       u32                     cl_flavor;      /* setclientid pseudoflavor */
        char                    *cl_principal;  /* setclientid principal name */
        struct svc_cred         cl_cred;        /* setclientid principal */
        clientid_t              cl_clientid;    /* generated by server */
index 3105efbb182d463eed47a03f4771820bd889c3ed..19245324887011f358adab5baa5a28d38811549f 100644 (file)
@@ -407,6 +407,7 @@ enum {
        RPCAUTH_nfs,
        RPCAUTH_portmap,
        RPCAUTH_statd,
+       RPCAUTH_nfsd4_cb,
        RPCAUTH_RootEOF
 };
 
@@ -440,6 +441,10 @@ static struct rpc_filelist files[] = {
                .name = "statd",
                .mode = S_IFDIR | S_IRUGO | S_IXUGO,
        },
+       [RPCAUTH_nfsd4_cb] = {
+               .name = "nfsd4_cb",
+               .mode = S_IFDIR | S_IRUGO | S_IXUGO,
+       },
 };
 
 enum {