[PATCH] Keys: Fix request_key default keyring handling

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

 



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 <[email protected]>
Signed-Off-By: David Howells <[email protected]>
---
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux