Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240827213435.GG10433@brightrain.aerifal.cx>
Date: Tue, 27 Aug 2024 17:34:36 -0400
From: Rich Felker <dalias@...c.org>
To: Ryan Ward <rwardd@...look.com.au>
Cc: Szabolcs Nagy <nsz@...t70.net>,
	"musl@...ts.openwall.com" <musl@...ts.openwall.com>
Subject: Re: Adding dns/resolver tests to libc-test

On Tue, Aug 27, 2024 at 03:30:37PM +0000, Ryan Ward wrote:
> Hello,
> 
> I have made an attempt at fleshing out the resolver tests, please
> see the file attached. It still needs some polishing, and I am keen
> to keep building out the necessary tests, attached is a simple
> rudimentary res_query() test.. I need to improve the packet and RR
> parsing, but sending this out to get some early feedback before I
> build out more tests.
> 
> I have just been building the test and the unshare-ns.c framework
> with the libc-test build system, executing unshare-ns.exe and
> passing in resolv_query.exe as intended.

My intent was that you call enter_dns_test_ns from the test process
itself, not from a separate wrapper to exec it. This is so you don't
end up having a program in the tests dir that, when executed
independently as root, clobbers the host system's resolv.conf or hosts
file (which would be really really bad). By entering the namespace in
the same process and testing for error, you can bail out before doing
anything if the namespace setup failed. This also avoids the need to
add extra control machinery to run the tests.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.