Skip to contentSkip to conversation

NFS: Make keys writable on the idmap keyring.

PATCH In review Steve Dickson 3 participants 4 messages Feb 7, 2012 – Feb 8, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFS: Make keys writable on the idmap keyring.

To take advantage of the "Allow special keyrings to be cleared" keyring patch the NFS keyring has to be writeable.

---
 fs/nfs/idmap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfs/idmap.c +1 -1
index a1bbf77..1d88cdb 100644
@@ -269,7 +269,7 @@ static ssize_t nfs_idmap_request_key(const char *name, size_t namelen,
 	}
 
 	rcu_read_lock();
-	rkey->perm |= KEY_USR_VIEW;
+	rkey->perm |= KEY_USR_VIEW|KEY_USR_WRITE;
 
 	ret = key_validate(rkey);
 	if (ret < 0)
Signature · 1 line
1.7.7.5
#1 lore raw

Should this go in via the NFS tree? I can put it into the security tree otherwise.

Quoted 24 lines · Steve Dickson

To take advantage of the "Allow special keyrings to be cleared" keyring patch the NFS keyring has to be writeable.

---
 fs/nfs/idmap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfs/idmap.c +1 -1
index a1bbf77..1d88cdb 100644
@@ -269,7 +269,7 @@ static ssize_t nfs_idmap_request_key(const char *name, size_t namelen,
 	}
 
 	rcu_read_lock();
-	rkey->perm |= KEY_USR_VIEW;
+	rkey->perm |= KEY_USR_VIEW|KEY_USR_WRITE;
 
 	ret = key_validate(rkey);
 	if (ret < 0)
Signature · 1 line
1.7.7.5
Signature · 2 lines
James Morris
<[email protected]>
#2 lore raw

I'm indifferent... as long as it gets in...

Personally I thought it should been be part of David's "KEYS: Allow special keyrings to be cleared" patch since NFS can not use that feature unless the key is writable...

steved.

Quoted 31 lines · James Morris

Should this go in via the NFS tree? I can put it into the security tree otherwise.

Quoted 24 lines · Steve Dickson

To take advantage of the "Allow special keyrings to be cleared" keyring patch the NFS keyring has to be writeable.

---
 fs/nfs/idmap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfs/idmap.c +1 -1
index a1bbf77..1d88cdb 100644
@@ -269,7 +269,7 @@ static ssize_t nfs_idmap_request_key(const char *name, size_t namelen,
 	}
 
 	rcu_read_lock();
-	rkey->perm |= KEY_USR_VIEW;
+	rkey->perm |= KEY_USR_VIEW|KEY_USR_WRITE;
 
 	ret = key_validate(rkey);
 	if (ret < 0)
Signature · 1 line
1.7.7.5
#3 lore raw
In reply to Steve Dickson
Quoted 2 lines · Steve Dickson

To take advantage of the "Allow special keyrings to be cleared" keyring patch the NFS keyring has to be writeable.

That's not true.

I'll push the "Allow special keyrings to be cleared" keyring patch to James now.

David