Commit 37201e61 authored by Andy Adamson's avatar Andy Adamson Committed by Linus Torvalds

[PATCH] kNFSd: NFSv4 patch for new setclientid, setclientid_confirm

This brings the linux-2.5.42 tree up to spec WRT setclientid and
setclientid_confirm
parent a233df9b
...@@ -177,11 +177,12 @@ static inline int ...@@ -177,11 +177,12 @@ static inline int
nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclientid) nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclientid)
{ {
memset(&setclientid->se_clientid, 0, sizeof(clientid_t)); memset(&setclientid->se_clientid, 0, sizeof(clientid_t));
memset(&setclientid->se_confirm, 0, sizeof(nfs4_verifier));
return nfs_ok; return nfs_ok;
} }
static inline int static inline int
nfsd4_setclientid_confirm(struct svc_rqst *rqstp, clientid_t *clientid) nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confirm *setclientid_confirm)
{ {
return nfs_ok; return nfs_ok;
} }
......
...@@ -717,12 +717,13 @@ nfsd4_decode_setclientid(struct nfsd4_compoundargs *argp, struct nfsd4_setclient ...@@ -717,12 +717,13 @@ nfsd4_decode_setclientid(struct nfsd4_compoundargs *argp, struct nfsd4_setclient
} }
static int static int
nfsd4_decode_setclientid_confirm(struct nfsd4_compoundargs *argp, clientid_t *clientid) nfsd4_decode_setclientid_confirm(struct nfsd4_compoundargs *argp, struct nfsd4_setclientid_confirm *scd_c)
{ {
DECODE_HEAD; DECODE_HEAD;
READ_BUF(8); READ_BUF(8 + sizeof(nfs4_verifier));
COPYMEM(clientid, 8); COPYMEM(&scd_c->sc_clientid, 8);
COPYMEM(&scd_c->sc_confirm, sizeof(nfs4_verifier));
DECODE_TAIL; DECODE_TAIL;
} }
...@@ -1736,8 +1737,9 @@ nfsd4_encode_setclientid(struct nfsd4_compoundres *resp, int nfserr, struct nfsd ...@@ -1736,8 +1737,9 @@ nfsd4_encode_setclientid(struct nfsd4_compoundres *resp, int nfserr, struct nfsd
ENCODE_HEAD; ENCODE_HEAD;
if (!nfserr) { if (!nfserr) {
RESERVE_SPACE(8); RESERVE_SPACE(8 + sizeof(nfs4_verifier));
WRITEMEM(&scd->se_clientid, 8); WRITEMEM(&scd->se_clientid, 8);
WRITEMEM(&scd->se_confirm, sizeof(nfs4_verifier));
ADJUST_ARGS(); ADJUST_ARGS();
} }
else if (nfserr == nfserr_clid_inuse) { else if (nfserr == nfserr_clid_inuse) {
......
...@@ -224,6 +224,12 @@ struct nfsd4_setclientid { ...@@ -224,6 +224,12 @@ struct nfsd4_setclientid {
char * se_callback_addr_val; /* request */ char * se_callback_addr_val; /* request */
u32 se_callback_ident; /* request */ u32 se_callback_ident; /* request */
clientid_t se_clientid; /* response */ clientid_t se_clientid; /* response */
nfs4_verifier se_confirm; /* response */
};
struct nfsd4_setclientid_confirm {
clientid_t sc_clientid;
nfs4_verifier sc_confirm;
}; };
/* also used for NVERIFY */ /* also used for NVERIFY */
...@@ -267,7 +273,7 @@ struct nfsd4_op { ...@@ -267,7 +273,7 @@ struct nfsd4_op {
clientid_t renew; clientid_t renew;
struct nfsd4_setattr setattr; struct nfsd4_setattr setattr;
struct nfsd4_setclientid setclientid; struct nfsd4_setclientid setclientid;
clientid_t setclientid_confirm; struct nfsd4_setclientid_confirm setclientid_confirm;
struct nfsd4_verify verify; struct nfsd4_verify verify;
struct nfsd4_write write; struct nfsd4_write write;
} u; } u;
......
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