I closed small light leaks in my D with bits of black gaffer tape. I mitigated to the degree possible the leaks around the negative carrier by taping pieces of black mat board onto the sides and back of the light source, letting them hang down past the carrier and at least keeping some of that light from bouncing around. Some light still leaks out the front of the negative carrier but it has been greatly reduced. I also refrain from wearing a light colored shirt when printing to avoid bouncing leaking light onto my paper.

By the way, I use a cold light head so heat from the bulb is not a concern with blocking vent holes and taping combustibles onto the light source. If you are using a condenser head remain aware of heat transfer to paper or mat board, and especially when blocking up holes that might otherwise dissipate heat from the enlarger bulb.