Initial import of 'sdb_hook' api and some fixes in ls.c