diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-05-20 12:24:03 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-06-06 16:24:37 -0400 |
commit | 4f0b429df104c8ab41fa1b3013e13e0f95f3da52 (patch) | |
tree | 52da695dd1c1e334ebb6c84ae880412507ee09c4 /fs/nfs | |
parent | cd5875fefe09b1921ea5845890009c9b2386d566 (diff) | |
download | op-kernel-dev-4f0b429df104c8ab41fa1b3013e13e0f95f3da52.zip op-kernel-dev-4f0b429df104c8ab41fa1b3013e13e0f95f3da52.tar.gz |
NFSv4.1: Enable state protection
Use the EXCHGID4_FLAG_BIND_PRINC_STATEID exchange_id flag to enable
stateid protection. This means that if we create a stateid using a
particular principal, then we must use the same principal if we
want to change that state.
IOW: if we OPEN a file using a particular credential, then we have
to use the same credential in subsequent OPEN_DOWNGRADE, CLOSE,
or DELEGRETURN operations that use that stateid.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 98f0df3..7490359 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -5528,7 +5528,8 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred) struct nfs41_exchange_id_args args = { .verifier = &verifier, .client = clp, - .flags = EXCHGID4_FLAG_SUPP_MOVED_REFER, + .flags = EXCHGID4_FLAG_SUPP_MOVED_REFER | + EXCHGID4_FLAG_BIND_PRINC_STATEID, }; struct nfs41_exchange_id_res res = { 0 |