Bring in some patches from OpenBSD. Stille the session is not active, but is local.