aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc/key.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-06-26 21:02:33 +0100
committerDavid Howells <dhowells@redhat.com>2019-06-26 21:02:33 +0100
commit9b242610514fe387ef957bce05e1fdd3efd60359 (patch)
tree57917a3649c3a4b0bd66a54fbab24c4ca644ab56 /net/rxrpc/key.c
parentkeys: Garbage collect keys for which the domain has been removed (diff)
downloadlinux-dev-9b242610514fe387ef957bce05e1fdd3efd60359.tar.xz
linux-dev-9b242610514fe387ef957bce05e1fdd3efd60359.zip
keys: Network namespace domain tag
Create key domain tags for network namespaces and make it possible to automatically tag keys that are used by networked services (e.g. AF_RXRPC, AFS, DNS) with the default network namespace if not set by the caller. This allows keys with the same description but in different namespaces to coexist within a keyring. Signed-off-by: David Howells <dhowells@redhat.com> cc: netdev@vger.kernel.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: linux-afs@lists.infradead.org
Diffstat (limited to '')
-rw-r--r--net/rxrpc/key.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/rxrpc/key.c b/net/rxrpc/key.c
index e7f6b8823eb6..2722189ec273 100644
--- a/net/rxrpc/key.c
+++ b/net/rxrpc/key.c
@@ -43,6 +43,7 @@ static long rxrpc_read(const struct key *, char __user *, size_t);
*/
struct key_type key_type_rxrpc = {
.name = "rxrpc",
+ .flags = KEY_TYPE_NET_DOMAIN,
.preparse = rxrpc_preparse,
.free_preparse = rxrpc_free_preparse,
.instantiate = generic_key_instantiate,
@@ -58,6 +59,7 @@ EXPORT_SYMBOL(key_type_rxrpc);
*/
struct key_type key_type_rxrpc_s = {
.name = "rxrpc_s",
+ .flags = KEY_TYPE_NET_DOMAIN,
.vet_description = rxrpc_vet_description_s,
.preparse = rxrpc_preparse_s,
.free_preparse = rxrpc_free_preparse_s,