You don't need to go landside to make this connection (you don't pass through passport control). All arriving passengers get dumped to the arrivals level, you go through security and up to the departures level.
I don't think there's much between CMN and Marrakech if you drive .