Changes to allow Samba to return the same error code as Windows NT.