/usr/share/lua/5.1/cqueues/dns.lua is in lua-cqueues 20161214-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | local loader = function(loader, ...)
local dns = require"_cqueues.dns"
local assert = require"cqueues".assert
--
-- NOTE: defer loading dns.resolvers as it depends on us
--
local pool = nil
function dns.setpool(p)
local o = pool
assert(require"cqueues.dns.resolvers".type(p), "not dns resolver pool")
pool = p
return o
end -- dns.setpool
function dns.getpool()
if not pool then
dns.setpool(assert(require"cqueues.dns.resolvers".stub()))
end
return pool
end -- dns.getpool
function dns.query(...)
return dns.getpool():query(...)
end -- dns.query
dns.loader = loader
return dns
end
return loader(loader, ...)
|