[FYI] Experimenting replacing cwrap with namespaces in selftest

Andreas Schneider asn at samba.org
Sun Feb 10 10:40:25 UTC 2019


On Friday, 8 February 2019 05:00:40 CET Tim Beale via samba-technical wrote:
> Hi,

Hi,
 
> Just FYI, something we've been experimenting with in the background is
> replacing some of the cwrap usage in selftest. We've tried removing
> socket-wrapper/resolv-wrapper and using containerization via linux
> namespaces instead.
> 
> Namespaces mean that each testenv can have its own /etc/resolv.conf and
> have its own unique hostname, etc.


NSS_WRAPPER_HOSTNAME=my_favorite_hostname

if you want your own /etc/resolv.conf then implmement support for hosts 
modules in nss_wrapper and write a module which uses resolv_wrapper. Problem 
solved.

namespaces need privileges, cwrap doesn't. It just works in every container or 
CI environment ...



	Andreas





More information about the samba-technical mailing list