Antoni,
You've got it right. It's legal if you are looking to split hours (common purpose--two guys want to fly somewhere to build hours), but not legal if you are just looking for a passenger who wants to go somewhere.
Hope you find someone and that you both understand the rules about logging time.