lkml.org 
[lkml]   [2005]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Keys: Fix request_key default keyring handling
Date

The attached patch fixes the way request_key handles the default destination
key when it's the group keyring. It also removes the check for the no-change
default keyring spec, which shouldn't appear in the task_struct::jit_keyring
member (it's purely for getting the old value from the keyctl function).

Signed-Off-By: Benoit Boissinot <benoit.boissinot@ens-lyon.org>
Signed-Off-By: David Howells <dhowells@redhat.com>
---
warthog>diffstat -p1 /tmp/keys.patch
security/keys/keyctl.c | 2 +-
security/keys/request_key.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)

--- ./security/keys/request_key.c.orig 2005-03-31 21:23:43.000000000 +0200
+++ ./security/keys/request_key.c 2005-03-31 21:41:03.000000000 +0200
@@ -335,8 +335,7 @@ static void request_key_link(struct key
dest_keyring = current->user->uid_keyring;
break;

- case KEY_REQKEY_DEFL_NO_CHANGE:
- case KEY_SPEC_GROUP_KEYRING:
+ case KEY_REQKEY_DEFL_GROUP_KEYRING:
default:
BUG();
}
--- ./security/keys/keyctl.c.orig 2005-03-31 21:41:35.000000000 +0200
+++ ./security/keys/keyctl.c 2005-03-31 21:42:01.000000000 +0200
@@ -951,7 +951,7 @@ long keyctl_set_reqkey_keyring(int reqke
case KEY_REQKEY_DEFL_NO_CHANGE:
return current->jit_keyring;

- case KEY_SPEC_GROUP_KEYRING:
+ case KEY_REQKEY_DEFL_GROUP_KEYRING:
default:
return -EINVAL;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-04-06 13:31    [W:0.082 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site