From: Benoit Boissinot 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: Andrew Morton --- 25-akpm/security/keys/keyctl.c | 2 +- 25-akpm/security/keys/request_key.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff -puN security/keys/keyctl.c~keys-make-request-key-create-an-authorisation-key-fix security/keys/keyctl.c --- 25/security/keys/keyctl.c~keys-make-request-key-create-an-authorisation-key-fix Thu Mar 31 14:58:20 2005 +++ 25-akpm/security/keys/keyctl.c Thu Mar 31 14:58:20 2005 @@ -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; } diff -puN security/keys/request_key.c~keys-make-request-key-create-an-authorisation-key-fix security/keys/request_key.c --- 25/security/keys/request_key.c~keys-make-request-key-create-an-authorisation-key-fix Thu Mar 31 14:58:20 2005 +++ 25-akpm/security/keys/request_key.c Thu Mar 31 14:58:20 2005 @@ -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(); } _