This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] resolv/resolv.h: allow alternative resolv.conf files
On 08/17/2017 06:48 PM, Szabolcs Nagy wrote:
> On 17/08/17 17:24, Florian Weimer wrote:
>> resolv/tst-resolv-res_init-skeleton.c uses the support/ framework to
>> replace /etc in the test chroot, precisely because the /etc/resolv.conf
>> path is currently hard-coded. The test does not need root permissions
>> to run on current Fedora, for instance.
> how does chroot work without root on fedora?
if (unshare (CLONE_NEWUSER | CLONE_NEWNS) == 0)
/* Even if we do not have UID zero, we have extended privileges at
this point. */
if (setuid (0) != 0)
printf ("warning: could not become root outside namespace (%m)\n");