s3-nmbd: Fix netbios name truncation.

Try and cope with truncation more intelligently.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10896

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
torture/spoolss: cleanup print_job_enum test jobs

Purge print queue on startup to ensure that the test is not affected by
jobs queued for prior tests. Also, empty the queue at the end of the
test to play nice with others.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Oct 29 14:31:52 CET 2014 on sn-devel-104