89d9d4d5f7
heavily reworked here and probably broke. Tomorrow I need to set up a copy of samba to test against. (This compiles, I make no promises beyond that.)