tear's changes, samba support