return value of the underlying function and handle errors more consistently. noted by Sam Hartman <hartmans@mit.edu> git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10767 ec53bebd-3082-4978-b11e-865c3cabbd6b