From 9a54ba471986b994f10ad332f27639059c18e7e1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 11 Mar 2017 16:52:00 -0400 Subject: don't propagate DNS info from DiskImage chroots * DiskImage building properties used to propagate DNS info out from the chroot used to build the disk image to the Host. That is no longer done, since that chroot only exists as a side effect of the disk image creation and servers will not be running in it. * The IsInfo types class's propagateInfo function changed to use a PropagateInfo data type. (API change) This is particularly important when using hostChroot, since the host could well have DNS settings then. This commit was sponsored by Ole-Morten Duesund on Patreon. --- src/Propellor/Property/DiskImage.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property/DiskImage.hs') diff --git a/src/Propellor/Property/DiskImage.hs b/src/Propellor/Property/DiskImage.hs index c7868c47..06d0694e 100644 --- a/src/Propellor/Property/DiskImage.hs +++ b/src/Propellor/Property/DiskImage.hs @@ -130,7 +130,7 @@ imageBuilt' rebuild img mkchroot tabletype final partspec = | otherwise = doNothing chrootdir = img ++ ".chroot" chroot = - let c = mkchroot chrootdir + let c = propprivdataonly $ mkchroot chrootdir in setContainerProps c $ containerProps c -- Before ensuring any other properties of the chroot, -- avoid starting services. Reverted by imageFinalized. @@ -138,6 +138,9 @@ imageBuilt' rebuild img mkchroot tabletype final partspec = -- First stage finalization. & fst final & cachesCleaned + -- Only propagate privdata Info from this chroot, nothing else. + propprivdataonly (Chroot.Chroot d b ip h) = + Chroot.Chroot d b (const $ ip onlyPrivData) h -- | This property is automatically added to the chroot when building a -- disk image. It cleans any caches of information that can be omitted; -- cgit v1.2.3