Setting the container domain name via the kernel.domainname sysctl
does not work with user namespaces (including rootless mode), as
/proc/sys/kernel/domainname is owned by the global root and thus
can't be written to from inside a user namespace:
write sysctl key kernel.domainname: open /proc/sys/kernel/domainname: permission denied
Since runtime-spec v1.1.0, there is a dedicated domainname field,
which is implemented by OCI runtimes (runc >= v1.2.0, crun >= 1.7,
youki) using setdomainname(2), which works with user namespaces.
Use it instead of the sysctl. An explicit kernel.domainname sysctl
(set via --sysctl) is still passed to the runtime as is.
Enable TestNISDomainname for rootless and user namespaces.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>