]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - security/keys/keyring.c
keys: skip keys from another user namespace
[linux-2.6-omap-h63xx.git] / security / keys / keyring.c
index ed851574d07301ecc07f6920ffaee5be86635efd..3dba81c2eba360a615d9116e124cb36d86e89427 100644 (file)
@@ -539,6 +539,9 @@ struct key *find_keyring_by_name(const char *name, bool skip_perm_check)
                                    &keyring_name_hash[bucket],
                                    type_data.link
                                    ) {
+                       if (keyring->user->user_ns != current_user_ns())
+                               continue;
+
                        if (test_bit(KEY_FLAG_REVOKED, &keyring->flags))
                                continue;