diff options
author | David Howells <dhowells@redhat.com> | 2019-06-26 21:02:33 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-06-27 23:02:12 +0100 |
commit | a58946c158a040068e7c94dc1d58bbd273258068 (patch) | |
tree | e655258b700359cdfd9f762c099b7587dc0eed9b /fs/afs/dynroot.c | |
parent | 9b242610514fe387ef957bce05e1fdd3efd60359 (diff) | |
download | linux-a58946c158a040068e7c94dc1d58bbd273258068.tar.gz linux-a58946c158a040068e7c94dc1d58bbd273258068.tar.bz2 linux-a58946c158a040068e7c94dc1d58bbd273258068.zip |
keys: Pass the network namespace into request_key mechanism
Create a request_key_net() function and use it to pass the network
namespace domain tag into DNS revolver keys and rxrpc/AFS keys so that keys
for different domains can coexist in the same 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 'fs/afs/dynroot.c')
-rw-r--r-- | fs/afs/dynroot.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c index af1689d1f32e..b075605b0c45 100644 --- a/fs/afs/dynroot.c +++ b/fs/afs/dynroot.c @@ -28,6 +28,7 @@ const struct file_operations afs_dynroot_file_operations = { static int afs_probe_cell_name(struct dentry *dentry) { struct afs_cell *cell; + struct afs_net *net = afs_d2net(dentry); const char *name = dentry->d_name.name; size_t len = dentry->d_name.len; int ret; @@ -40,13 +41,14 @@ static int afs_probe_cell_name(struct dentry *dentry) len--; } - cell = afs_lookup_cell_rcu(afs_d2net(dentry), name, len); + cell = afs_lookup_cell_rcu(net, name, len); if (!IS_ERR(cell)) { - afs_put_cell(afs_d2net(dentry), cell); + afs_put_cell(net, cell); return 0; } - ret = dns_query("afsdb", name, len, "srv=1", NULL, NULL, false); + ret = dns_query(net->net, "afsdb", name, len, "srv=1", + NULL, NULL, false); if (ret == -ENODATA) ret = -EDESTADDRREQ; return ret; |