i'm not sure if this patch is of general use. i needed it for rangboom, where the agent posts the imported shared ns in /srv. i have regression-tested it for some common cases.