X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=security%2Fkeys%2Fkeyring.c;fp=security%2Fkeys%2Fkeyring.c;h=bffa924c1f88240b088e5c30ee7d9363849c45e2;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=e8d02acc51e7180f23a31b849ccce820418fd55c;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/security/keys/keyring.c b/security/keys/keyring.c index e8d02acc5..bffa924c1 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c @@ -49,7 +49,6 @@ static inline unsigned keyring_hash(const char *desc) static int keyring_instantiate(struct key *keyring, const void *data, size_t datalen); static int keyring_match(const struct key *keyring, const void *criterion); -static void keyring_revoke(struct key *keyring); static void keyring_destroy(struct key *keyring); static void keyring_describe(const struct key *keyring, struct seq_file *m); static long keyring_read(const struct key *keyring, @@ -60,7 +59,6 @@ struct key_type key_type_keyring = { .def_datalen = sizeof(struct keyring_list), .instantiate = keyring_instantiate, .match = keyring_match, - .revoke = keyring_revoke, .destroy = keyring_destroy, .describe = keyring_describe, .read = keyring_read, @@ -242,16 +240,15 @@ static long keyring_read(const struct key *keyring, * allocate a keyring and link into the destination keyring */ struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, - struct task_struct *ctx, unsigned long flags, - struct key *dest) + int not_in_quota, struct key *dest) { struct key *keyring; int ret; keyring = key_alloc(&key_type_keyring, description, - uid, gid, ctx, + uid, gid, (KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_ALL, - flags); + not_in_quota); if (!IS_ERR(keyring)) { ret = key_instantiate_and_link(keyring, NULL, 0, dest, NULL); @@ -955,22 +952,3 @@ int keyring_clear(struct key *keyring) } /* end keyring_clear() */ EXPORT_SYMBOL(keyring_clear); - -/*****************************************************************************/ -/* - * dispose of the links from a revoked keyring - * - called with the key sem write-locked - */ -static void keyring_revoke(struct key *keyring) -{ - struct keyring_list *klist = keyring->payload.subscriptions; - - /* adjust the quota */ - key_payload_reserve(keyring, 0); - - if (klist) { - rcu_assign_pointer(keyring->payload.subscriptions, NULL); - call_rcu(&klist->rcu, keyring_clear_rcu_disposal); - } - -} /* end keyring_revoke() */