[PATCH 2/2] nfs: don't return expired keys from nfs_idmap_request_key()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Call request_valid_key_with_auxdata() from nfs_idmap_request_key()
so that the keys code asks userspace for an updated key if one
has expired.  Without this, nfs_idmap_request_key() can return an
expired key which causes incorrect uid/gid mappings.

Signed-off-by: Carl Hetherington <cth@xxxxxxxxx>
---
 fs/nfs/idmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index 567983d..744e40f 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -278,8 +278,8 @@ static struct key *nfs_idmap_request_key(const char *name, size_t namelen,
 	rkey = request_key(&key_type_id_resolver, desc, "");
 	if (IS_ERR(rkey)) {
 		mutex_lock(&idmap->idmap_mutex);
-		rkey = request_key_with_auxdata(&key_type_id_resolver_legacy,
-						desc, "", 0, idmap);
+		rkey = request_valid_key_with_auxdata(&key_type_id_resolver_legacy,
+						      desc, "", 0, idmap);
 		mutex_unlock(&idmap->idmap_mutex);
 	}
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux