there are places in the samba3 code that don't check properly for