Someone (David Fetter?) mentioned long ago that contrib/userlock could
not be moved into core because it is GPLed, and the author couldn't be
contacted to ask about re-licensing.
Andrew(@supernews) wrote a specification for the userlock functionality,
and I implemented the attached code based on his specification, without
consulting the existing source.
It's available under a BSD license, if there's any use for it.
-- ams